is it working
This commit is contained in:
parent
7d261138d9
commit
e7bb5b4245
1 changed files with 48 additions and 38 deletions
|
|
@ -10,44 +10,54 @@
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
];
|
];
|
||||||
|
|
||||||
config = lib.mkIf (config.osbmModules.homeManager.enable) {
|
config = lib.mkMerge [
|
||||||
home-manager = {
|
(lib.mkIf (config.osbmModules.homeManager.enable) {
|
||||||
useGlobalPkgs = true;
|
home-manager = {
|
||||||
useUserPackages = true;
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
|
||||||
# Pass inputs and outputs to home-manager modules
|
# Pass inputs and outputs to home-manager modules
|
||||||
extraSpecialArgs = { inherit inputs; };
|
extraSpecialArgs = { inherit inputs; };
|
||||||
|
|
||||||
# Configure home-manager for each user (excluding root)
|
# Configure home-manager for each user (excluding root)
|
||||||
users = lib.genAttrs (builtins.filter (u: u != "root") config.osbmModules.users) (username: {
|
users =
|
||||||
home.stateVersion = lib.mkDefault "24.05";
|
let
|
||||||
imports = [
|
# Capture the NixOS system config before entering the home-manager scope
|
||||||
../../home-manager
|
systemConfig = config;
|
||||||
] ++ lib.optionals config.osbmModules.hardware.disko.zfs.impermanence.enable [
|
in
|
||||||
# if impermanence is enabled, configure persistence
|
lib.genAttrs (builtins.filter (u: u != "root") config.osbmModules.users) (username: {
|
||||||
{
|
home.stateVersion = lib.mkDefault "24.05";
|
||||||
home.persistence."/persist/home/${username}" = {
|
imports = [
|
||||||
directories = [
|
../../home-manager
|
||||||
"Pictures"
|
]
|
||||||
"Documents"
|
++ lib.optionals systemConfig.osbmModules.hardware.disko.zfs.root.impermanenceRoot [
|
||||||
"Videos"
|
# Import impermanence home-manager module when impermanence is enabled
|
||||||
".gnupg"
|
inputs.impermanence.homeManagerModules.impermanence
|
||||||
".ssh"
|
# Configure persistence
|
||||||
".local/share/keyrings"
|
{
|
||||||
".local/share/direnv"
|
home.persistence."/persist/home/${username}" = {
|
||||||
# {
|
directories = [
|
||||||
# directory = ".local/share/Steam";
|
"Pictures"
|
||||||
# method = "symlink";
|
"Documents"
|
||||||
# }
|
"Videos"
|
||||||
];
|
".gnupg"
|
||||||
files = [
|
".ssh"
|
||||||
".screenrc"
|
".local/share/keyrings"
|
||||||
];
|
".local/share/direnv"
|
||||||
allowOther = true;
|
# {
|
||||||
};
|
# directory = ".local/share/Steam";
|
||||||
}
|
# method = "symlink";
|
||||||
];
|
# }
|
||||||
});
|
];
|
||||||
};
|
files = [
|
||||||
};
|
".screenrc"
|
||||||
|
];
|
||||||
|
allowOther = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
});
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue