mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 17:31:34 +01:00
Refactor user configuration
This commit is contained in:
parent
4785c99ea4
commit
9ecc4cf9ea
15 changed files with 72 additions and 75 deletions
|
|
@ -15,12 +15,21 @@ let
|
|||
"${self}/hosts/${hostName}"
|
||||
|> lib.filesystem.listFilesRecursive
|
||||
|> lib.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
|
||||
[
|
||||
{ networking = { inherit hostName; }; }
|
||||
"${self}/hosts/shared.nix"
|
||||
]
|
||||
++ hostFiles;
|
||||
++ hostFiles
|
||||
++ userFiles;
|
||||
};
|
||||
|
||||
mkDeployNode = hostname: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue