-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlib.nix
More file actions
47 lines (47 loc) · 1.01 KB
/
Copy pathlib.nix
File metadata and controls
47 lines (47 loc) · 1.01 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
{ inputs }:
let
lib = inputs.nixpkgs.lib;
in
rec {
defaultSystems = [
"aarch64-linux"
"x86_64-linux"
];
forAllSystems = lib.genAttrs defaultSystems;
mkHomeConfigurations =
user: attrs:
lib.mergeAttrsList (
map (system: {
"${system}-${user}" = inputs.home-manager.lib.homeManagerConfiguration (
attrs
// {
extraSpecialArgs = { inherit inputs; };
pkgs = import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
};
}
);
}) defaultSystems
);
mkNixos =
hosts: inputs:
lib.mergeAttrsList (
map (
{
host,
system ? "x86_64-linux",
}:
{
${host} = lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; };
modules = [
./machines/${host}
{ nixpkgs.hostPlatform = system; }
];
};
}
) hosts
);
}