mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 17:31:34 +01:00
Manage users with the option system
This commit is contained in:
parent
9386dc29d7
commit
d7070b6fb5
15 changed files with 79 additions and 71 deletions
|
|
@ -14,19 +14,11 @@ let
|
|||
"${self}/hosts/${hostName}"
|
||||
|> lib.filesystem.listFilesRecursive
|
||||
|> builtins.filter (lib.hasSuffix ".nix");
|
||||
userFiles =
|
||||
"${self}/users"
|
||||
|> builtins.readDir
|
||||
|> lib.filterAttrs (_: type: type == "directory")
|
||||
|> builtins.attrNames
|
||||
|> map (user: "${self}/users/${user}/@${hostName}")
|
||||
|> builtins.filter (path: builtins.pathExists path);
|
||||
in
|
||||
lib.flatten [
|
||||
{ networking = { inherit hostName; }; }
|
||||
"${self}/hosts/shared.nix"
|
||||
hostFiles
|
||||
userFiles
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue