-
Notifications
You must be signed in to change notification settings - Fork 1
/
configurations.nix
34 lines (28 loc) · 1.17 KB
/
configurations.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
inputs: withSystem:
# DESIGN: This library only works when the build's `shajra-provision` attribute
# has been set as the flake's `legacyPackages`.
{
nixosConfiguration = { system, path, privateModule ? {} }:
withSystem system ({ config, ... }:
config.legacyPackages.infra.np.nixpkgs.system.nixos {
_module.args.build = config.legacyPackages;
imports = [ path privateModule ];
}
);
darwinConfiguration = { system, path, privateModule ? {} }:
withSystem system ({ config, ... }:
inputs.nix-darwin.lib.darwinSystem {
pkgs = config.legacyPackages.infra.np.nixpkgs.system;
specialArgs.build = config.legacyPackages;
modules = [ path privateModule ];
}
);
homeConfiguration = { system, path, privateModule ? {} }:
withSystem system ({ config, ... }:
inputs.home-manager.lib.homeManagerConfiguration {
pkgs = config.legacyPackages.infra.np.nixpkgs.home;
extraSpecialArgs.build = config.legacyPackages;
modules = [ path privateModule ];
}
);
}