-
-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathflake.nix
More file actions
210 lines (200 loc) · 7.87 KB
/
Copy pathflake.nix
File metadata and controls
210 lines (200 loc) · 7.87 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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
{
description = "Wimpy's NixOS, nix-darwin and Home Manager Configuration";
inputs = {
home-manager.url = "github:nix-community/home-manager/release-26.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nix-darwin.url = "github:LnL7/nix-darwin/nix-darwin-26.05";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
# Shared transitive inputs; most flake-utils users depend on nix-systems/default.
systems.url = "github:nix-systems/default";
flake-utils.url = "github:numtide/flake-utils";
flake-utils.inputs.systems.follows = "systems";
rust-overlay.url = "github:oxalica/rust-overlay";
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
flake-parts.url = "github:hercules-ci/flake-parts";
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
hermes-agent.url = "https://github.com/NousResearch/hermes-agent/archive/refs/tags/v2026.8.27.tar.gz";
hermes-agent.inputs.nixpkgs.follows = "nixpkgs-unstable";
hermes-agent.inputs.uv2nix.url = "github:pyproject-nix/uv2nix";
llm-agents.url = "github:numtide/llm-agents.nix";
llm-agents.inputs.nixpkgs.follows = "nixpkgs-unstable";
llm-agents.inputs.treefmt-nix.follows = "direnv-instant/treefmt-nix";
sidra.url = "github:wimpysworld/sidra";
sidra.inputs.nixpkgs.follows = "nixpkgs";
veila.url = "github:naurissteins/Veila/0.4.2";
veila.inputs.nixpkgs.follows = "nixpkgs";
concord.url = "github:chojs23/concord/v2.5.14";
concord.inputs.nixpkgs.follows = "nixpkgs-unstable";
concord.inputs.rust-overlay.follows = "rust-overlay";
concord.inputs.flake-utils.follows = "flake-utils";
paseo.url = "github:getpaseo/paseo/v0.7.0";
paseo.inputs.nixpkgs.follows = "nixpkgs-unstable";
lan-mouse.url = "github:feschber/lan-mouse/v0.11.0";
lan-mouse.inputs.nixpkgs.follows = "nixpkgs";
lan-mouse.inputs.rust-overlay.follows = "rust-overlay";
handy.url = "github:cjpais/Handy/v0.9.6";
handy.inputs.nixpkgs.follows = "nixpkgs";
catppuccin.url = "github:catppuccin/nix/release-26.05";
catppuccin.inputs.nixpkgs.follows = "nixpkgs";
direnv-instant.url = "github:Mic92/direnv-instant";
direnv-instant.inputs.nixpkgs.follows = "nixpkgs";
direnv-instant.inputs.flake-parts.follows = "flake-parts";
disko.url = "https://flakehub.com/f/nix-community/disko/1.13.0.tar.gz";
disko.inputs.nixpkgs.follows = "nixpkgs";
kolide-launcher.url = "github:/kolide/nix-agent/main";
kolide-launcher.inputs.flake-compat.follows = "determinate/nix/git-hooks-nix/flake-compat";
kolide-launcher.inputs.nixpkgs.follows = "nixpkgs";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
nix-homebrew.url = "github:zhaofengli/nix-homebrew";
nix-index-database.url = "github:Mic92/nix-index-database";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
nix-flatpak.url = "https://flakehub.com/f/gmodena/nix-flatpak/0.7.0.tar.gz";
mac-app-util.url = "github:hraban/mac-app-util";
mac-app-util.inputs.nixpkgs.follows = "nixpkgs";
mac-app-util.inputs.cl-nix-lite.inputs.nixpkgs.follows = "nixpkgs";
mac-app-util.inputs.cl-nix-lite.inputs.systems.follows = "systems";
mac-app-util.inputs.cl-nix-lite.inputs.flake-parts.follows = "flake-parts";
mac-app-util.inputs.cl-nix-lite.inputs.treefmt-nix.follows = "mac-app-util/treefmt-nix";
# Do not follow root flake-utils here; mac-app-util needs darwin-only systems
# from nix-systems/default-darwin, while our root flake-utils uses nix-systems/default.
# Sharing flake-utils would make eachDefaultSystem include Linux, causing dockutil
# (darwin-only) to be evaluated on Linux.
#mac-app-util.inputs.flake-utils.follows = "flake-utils";
mac-app-util.inputs.treefmt-nix.follows = "direnv-instant/treefmt-nix";
sops-nix.url = "github:Mic92/sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
nix-packages.url = "github:wimpysworld/nix-packages";
nix-packages.inputs.nixpkgs.follows = "nixpkgs";
xdg-override.url = "github:koiuo/xdg-override";
xdg-override.inputs.nixpkgs.follows = "nixpkgs";
xdg-override.inputs.flake-parts.follows = "flake-parts";
# Keep wildcard FlakeHub inputs last because Dependabot misparses their URL suffixes.
determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/*";
fh.url = "https://flakehub.com/f/DeterminateSystems/fh/*";
};
outputs =
{
self,
nixpkgs,
...
}@inputs:
let
inherit (self) outputs;
stateVersion = "26.05";
darwinStateVersion = 7;
users = builtins.fromTOML (builtins.readFile ./lib/registry-users.toml);
systems = builtins.fromTOML (builtins.readFile ./lib/registry-systems.toml);
builder = import ./lib {
inherit
inputs
outputs
stateVersion
darwinStateVersion
users
;
};
in
{
lib = builder;
nixosConfigurations = builder.mkAllNixos systems;
darwinConfigurations = builder.mkAllDarwin systems;
homeConfigurations = builder.mkAllHomes systems;
overlays = import ./overlays { inherit inputs; };
nixosModules = import ./modules/nixos;
packages = builder.mkPackages {
inherit (self) overlays;
localPackagesPath = ./pkgs;
linuxOnlyFlakeInputs = {
inherit (inputs)
sidra
;
};
linuxOnlyOverlaidPackages = [
"paseo"
"paseo-desktop"
];
};
checks = builder.forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
includeHostConfigurations = system == "x86_64-linux";
in
{
wayland-compositors = import ./lib/tests/wayland-compositors.nix {
inherit (nixpkgs) lib;
inherit pkgs;
enableHostIntegration = includeHostConfigurations;
nixosConfigurations = if includeHostConfigurations then self.nixosConfigurations else { };
homeConfigurations = if includeHostConfigurations then self.homeConfigurations else { };
};
wayland-session-lifecycle = import ./lib/tests/wayland-session-lifecycle.nix {
inherit pkgs;
};
}
);
formatter = builder.forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
pkgs.writeShellApplication {
name = "nix-config-formatter";
runtimeInputs = with pkgs; [
deadnix
nixfmt
nixfmt-tree
statix
];
# Keep this in lockstep with the `format` recipe in the justfile.
# `--no-lambda-pattern-names` stops deadnix stripping function
# arguments whose call sites it cannot see, which breaks strict
# `{ }:` patterns such as `mkCatppuccinPalette`.
text = ''
if [ "$#" -eq 0 ]; then
deadnix --no-lambda-pattern-names --edit .
statix fix .
exec treefmt
fi
deadnix --no-lambda-pattern-names --edit "$@"
for target in "$@"; do
statix fix "$target"
done
exec nixfmt "$@"
'';
}
);
devShells = builder.mkDevShells {
inherit (self) overlays;
shellPackages =
p: with p; [
deadnix
direnv
file
git
home-manager
jq
just
mcp-nixos
nh
nixfmt-tree
nixfmt
nix-output-monitor
nodejs
openssh
sops
sqlite
statix
taplo
zstd
];
extraFlakeInputs = with inputs; [
determinate
disko
fh
];
};
};
}