-
Notifications
You must be signed in to change notification settings - Fork 67
Expand file tree
/
Copy pathdev.nix
More file actions
27 lines (24 loc) · 838 Bytes
/
dev.nix
File metadata and controls
27 lines (24 loc) · 838 Bytes
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
{flake-parts-lib, lib, inputs, ...}@topLevel:
rec {
imports = [
inputs.flake-parts.flakeModules.flakeModules
flake.flakeModules.dev
# Use file name to dogfood a flake module defined from the current flake to avoid infinite recursion
./hello.nix
];
flake.flakeModules.dev = dev: {
imports = lib.lists.optionals (topLevel.moduleLocation != dev.moduleLocation) [
# Use attributes to reference the flake module from other flakes
topLevel.config.flake.flakeModules.hello
];
config.systems = [ "x86_64-linux" "aarch64-darwin" ];
options.perSystem = flake-parts-lib.mkPerSystemOption ({pkgs, ...}@perSystem: {
devShells.default = pkgs.mkShell {
buildInputs = [ perSystem.config.packages.hello_22_11 ];
shellHook = ''
hello
'';
};
});
};
}