30 lines
781 B
Nix
30 lines
781 B
Nix
{
|
|
inputs,
|
|
tree,
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
with lib; {
|
|
options.home-manager.users = mkOption {
|
|
type = types.attrsOf (types.submoduleWith {
|
|
modules = [];
|
|
specialArgs = {
|
|
inherit inputs tree;
|
|
nixos = config;
|
|
};
|
|
});
|
|
};
|
|
config = {
|
|
home-manager = {
|
|
useGlobalPkgs = true;
|
|
useUserPackages = true;
|
|
sharedModules = with tree; [modules.home.vscode-mod-module];
|
|
};
|
|
systemd.tmpfiles.rules = lib.mkIf config.boot.isContainer (lib.flatten (lib.forEach (builtins.attrNames config.home-manager.users) (user: [
|
|
"d /nix/var/nix/profiles/per-user/${user} - ${config.users.users."${user}".group} - - -"
|
|
"d /nix/var/nix/gcroots/per-user/${user} - ${config.users.users."${user}".group} - - -"
|
|
])));
|
|
};
|
|
}
|