Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
154 lines (141 loc) · 3.69 KB
/
Copy pathflake.nix
File metadata and controls
154 lines (141 loc) · 3.69 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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05";
home-manager.url = "github:nix-community/home-manager/release-26.05";
agenix.url = "github:ryantm/agenix";
disko.url = "github:nix-community/disko/latest";
fel.url = "github:zabot/fel";
mandlebrot = {
url = "github:zabot/mandlebrot";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
nur.url = "github:nix-community/NUR";
lanzaboote = {
url = "github:nix-community/lanzaboote/v1.0.0";
inputs.nixpkgs.follows = "nixpkgs";
};
nixgl.url = "github:nix-community/nixGL";
secrets = {
url = "git+ssh://de4910@de4910.rsync.net/~/secrets?shallow=1";
};
};
outputs =
{
self,
nixpkgs,
home-manager,
nixos-hardware,
...
}@inputs:
let
user = {
unixname = "zach";
name = "Zach Anderson";
email = "zach@zabot.dev";
};
pkgs = (import nixpkgs) {
system = "x86_64-linux";
};
in
rec {
packages.x86_64-linux = {
offline-installer-iso = nixosConfigurations.installer.config.system.build.isoImage;
keyboard = pkgs.callPackage ./keyboard { };
};
homeConfigurations = let
config = {withSecrets}: (home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
./home
{
home.packages = [
# Nix built applications don't get along with non nixos libgl
# nixgl is a wrapper for launching them.
inputs.nixgl.packages.x86_64-linux.default
];
}
];
extraSpecialArgs = {
inherit inputs withSecrets;
system = {
system.stateVersion = "25.11";
global.user = user;
};
};
});
in {
"zach" = config {
withSecrets = true;
};
"public" = config {
withSecrets = false;
};
};
devShells.x86_64-linux.default = pkgs.mkShellNoCC {
packages = with pkgs; [
git-annex
nixfmt
nixfmt-tree
yubikey-manager
age
age-plugin-tpm
age-plugin-yubikey
inputs.agenix.packages.x86_64-linux.default
nil
sbctl
];
};
nixosConfigurations =
let
common =
{
host,
withSecrets ? true,
modules ? [ ],
}:
nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
]
++ modules;
specialArgs = {
inherit inputs withSecrets;
global = {
inherit user host;
};
};
};
diskoSystems = {
zach-replit-framework = common {
host = "replit-framework";
modules = [
nixos-hardware.nixosModules.framework-13-7040-amd
];
};
};
in
{
installer = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./installer
];
specialArgs = {
configurations = diskoSystems;
};
};
zach-xps = common {
host = "xps";
};
zach-framework = common {
host = "framework";
};
zach-desktop = common {
host = "desktop";
};
}
// diskoSystems;
};
}