dotfiles/modules/nixos/homelab/nasDirs/default.nix

39 lines
863 B
Nix
Raw Normal View History

2025-12-09 17:58:22 -06:00
let
2025-12-09 18:07:15 -06:00
inherit (import ../helpers.nix) labHelpers nasUsers;
2025-12-09 17:58:22 -06:00
inherit (labHelpers)
guestPath
mediaPath
docsPath
homePath
miscPath
userPath
groupPath
mntPath
;
nasDirs = user: [
"d ${userPath user} 0751 microvm wheel - -"
"d ${homePath user} 0751 microvm wheel - -"
"d ${guestPath user} 0751 microvm wheel - -"
"d ${docsPath user} 0751 microvm wheel - -"
"d ${mediaPath user} 0751 microvm wheel - -"
"d ${miscPath user} 0751 microvm wheel - -"
];
nasUserList = [
nasUsers.nasUser0
nasUsers.nasUser1
nasUsers.nasUser2
];
nasDirBuilder = builtins.concatLists (builtins.map (user: nasDirs user) nasUserList);
defaultDirs = [
"d ${mntPath} 0751 microvm wheel - -"
"d ${groupPath} 0751 microvm wheel - -"
];
in
{
systemd.tmpfiles.rules = defaultDirs ++ nasDirBuilder;
}