-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
executable file
·176 lines (163 loc) · 5.3 KB
/
flake.nix
File metadata and controls
executable file
·176 lines (163 loc) · 5.3 KB
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
{
description = "Nixos config flake";
inputs = {
#nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.darwin.follows = "";
};
agenix-rekey = {
url = "github:oddlama/agenix-rekey";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
url = "github:nix-community/stylix/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
minegrub-theme.url = "github:Lxtharia/minegrub-theme";
nix-easyroam.url = "github:0x5a4/nix-easyroam/592540d50149d5ccc2e2ff5105d141ed710dad57";
};
outputs =
inputs@{
self,
nixpkgs,
#nixpkgs-unstable,
nixos-hardware,
agenix,
agenix-rekey,
home-manager,
flake-utils,
disko,
stylix,
minegrub-theme,
nix-easyroam,
...
}:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
overlays = [ agenix-rekey.overlays.default ];
};
#pkgs-unstable = import nixpkgs-unstable {
# inherit system;
# config.allowUnfree = true;
# overlays = [ agenix-rekey.overlays.default ];
#};
defaultModules = [
agenix.nixosModules.default
agenix-rekey.nixosModules.default
minegrub-theme.nixosModules.default
stylix.nixosModules.stylix
];
in
{
nixosConfigurations = {
default = self.outputs.nixosConfigurations.nix-laptop;
nix-laptop = nixpkgs.lib.nixosSystem rec {
specialArgs = {
inherit inputs;
#inherit pkgs-unstable;
inherit agenix;
};
modules = defaultModules ++ [
./hosts/laptop/configuration.nix
nixos-hardware.nixosModules.framework-12th-gen-intel
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.backupFileExtension = "backup";
home-manager.users.robin = import ./home/robin.nix;
# Optionally, use home-manager.extraSpecialArgs to pass
# arguments to home.nix
home-manager.extraSpecialArgs = {
inherit inputs;
};
}
#minesddm.nixosModules.default
nix-easyroam.nixosModules.nix-easyroam
];
};
friendlynas = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
specialArgs = {
inherit inputs;
#inherit pkgs-unstable;
};
modules = defaultModules ++ [
./hosts/friendlynas/configuration.nix
];
};
nix-prox = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = defaultModules ++ [
./hosts/proxmox/configuration.nix
];
};
nix-desktop = nixpkgs.lib.nixosSystem rec {
specialArgs = {
inherit inputs;
#inherit pkgs-unstable;
inherit agenix;
};
modules = defaultModules ++ [
./hosts/desktop/configuration.nix
nixos-hardware.nixosModules.common-cpu-amd
nixos-hardware.nixosModules.common-gpu-nvidia-nonprime
nixos-hardware.nixosModules.common-pc
nixos-hardware.nixosModules.common-pc-ssd
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.backupFileExtension = "backup";
home-manager.users.robin = import ./home/robin.nix;
# Optionally, use home-manager.extraSpecialArgs to pass
# arguments to home.nix
home-manager.extraSpecialArgs = {
inherit inputs;
};
}
#minesddm.nixosModules.default
];
};
};
# Expose the necessary information in your flake so agenix-rekey
# knows where it has to look for secrets and paths.
# Make sure that the pkgs passed here comes from the same nixpkgs version as
# the pkgs used on your hosts in `nixosConfigurations`, otherwise the rekeyed
# derivations will not be found!
agenix-rekey = agenix-rekey.configure {
userFlake = self;
nixosConfigurations = self.nixosConfigurations;
};
devShells.${system}.default = pkgs.mkShell {
buildInputs = [
pkgs.nh
pkgs.lix
pkgs.nix-tree
pkgs.nixd
pkgs.git
pkgs.agenix-rekey
pkgs.age-plugin-fido2-hmac
];
shellHook = ''
echo "Hello there! This is robin's NixOS-configuration shell!"
'';
};
formatter.${system} = nixpkgs.legacyPackages.${system}.nixfmt-tree;
};
}