-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathflake.nix
138 lines (127 loc) · 3.78 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
{
#ref: https://github.com/yasunori0418/dotfiles/blob/485eee2794c2e5217823b7bba5201e9f9fe16d1e/flake.nix#L2
description = "My dotfiles, all my effort, my sword.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
# nixpkgs.url = "github:NixOS/nixpkgs/master";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
mozilla-overlay.url = "github:mozilla/nixpkgs-mozilla";
catppuccin.url = "github:catppuccin/nix";
treefmt-nix.url = "github:numtide/treefmt-nix";
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
emacs-overlay.url = "github:nix-community/emacs-overlay";
emacs.url = "github:cmacrae/emacs";
nak.url = "github:comamoca/flake-nak";
nur-packages.url = "github:Comamoca/nur-packages";
disko = {
url = "github:nix-community/disko/latest";
inputs.nixpkgs.follows = "nixpkgs";
};
xremap.url = "github:xremap/nix-flake";
sops-nix.url = "github:Mic92/sops-nix";
};
outputs =
{
self,
nixpkgs,
nixos-hardware,
home-manager,
treefmt-nix,
catppuccin,
neovim-nightly-overlay,
emacs-overlay,
emacs,
nak,
mozilla-overlay,
nur-packages,
disko,
xremap,
sops-nix,
}@inputs:
let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
treefmtEval = treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
overlays = [
neovim-nightly-overlay.overlays.default
(import emacs-overlay)
nak.overlays.default
# (import emacs.overlay)
mozilla-overlay.overlays.firefox
];
in
# code = _: s: s;
{
formatter.x86_64-linux = treefmtEval.config.build.wrapper;
checks.x86_64-linux = {
format = treefmtEval.config.build.wrapper;
};
nixosConfigurations = {
NixOS = inputs.nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
modules = [
inputs.catppuccin.nixosModules.catppuccin
home-manager.nixosModules.home-manager
xremap.nixosModules.default
# disko.nixosModules.disko
# ({ config, ... }: {
# # system.stateVersion = config.system.stateVersion;
# disko.devices.disk.main.imageSize = "10G";
# })
./configuration.nix
{
nixpkgs.overlays = overlays ++ [
(final: prev: {
xremap = xremap.packages.${system}.default;
})
];
}
];
specialArgs = {
inherit inputs;
};
};
};
homeConfigurations = {
Home = inputs.home-manager.lib.homeManagerConfiguration rec {
pkgs = import inputs.nixpkgs {
system = "x86_64-linux";
config.allowUnfree = true;
};
extraSpecialArgs = {
inherit inputs;
};
modules = [
./home.nix
inputs.catppuccin.homeManagerModules.catppuccin
inputs.sops-nix.homeManagerModules.sops
{
nixpkgs.overlays = overlays ++ [
(final: prev: {
# nak = inputs.nak.packages.x86_64-linux.default;
xremap = xremap.packages.${"x86_64-linux"}.default;
})
];
}
];
};
};
devShells.x86_64-linux.default = pkgs.mkShell {
packages = with pkgs; [
sops
age
lua-language-server
stylua
nil
];
inputsFrom = [
];
# shellHook = ''
# export DEBUG=1
# '';
};
};
}