mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-22 00:21:34 +01:00
37 lines
809 B
Nix
37 lines
809 B
Nix
{
|
|
inputs,
|
|
self,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
unstable = inputs.nixpkgs;
|
|
stable = inputs.nixpkgs-stable;
|
|
|
|
mkHost = hostname: nixpkgs: {
|
|
${hostname} = nixpkgs.lib.nixosSystem {
|
|
specialArgs = {
|
|
inherit inputs self;
|
|
};
|
|
modules =
|
|
[
|
|
{ networking.hostName = hostname; }
|
|
"${self}/hosts/${hostname}"
|
|
]
|
|
++ builtins.filter (path: builtins.pathExists path) (
|
|
map (user: "${self}/users/${user}/@${hostname}") (
|
|
builtins.attrNames (lib.filterAttrs (_: v: v == "directory") (builtins.readDir "${self}/users"))
|
|
)
|
|
);
|
|
};
|
|
};
|
|
|
|
in
|
|
{
|
|
flake.nixosConfigurations = lib.mkMerge [
|
|
(mkHost "north" unstable)
|
|
(mkHost "inspiron" unstable)
|
|
(mkHost "proxima" stable)
|
|
(mkHost "installer" stable)
|
|
];
|
|
}
|