is it working

This commit is contained in:
Osman Faruk Bayram 2025-10-21 10:23:38 +03:00
parent 7d261138d9
commit e7bb5b4245

View file

@ -10,44 +10,54 @@
inputs.home-manager.nixosModules.home-manager
];
config = lib.mkIf (config.osbmModules.homeManager.enable) {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
config = lib.mkMerge [
(lib.mkIf (config.osbmModules.homeManager.enable) {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
# Pass inputs and outputs to home-manager modules
extraSpecialArgs = { inherit inputs; };
# Pass inputs and outputs to home-manager modules
extraSpecialArgs = { inherit inputs; };
# Configure home-manager for each user (excluding root)
users = lib.genAttrs (builtins.filter (u: u != "root") config.osbmModules.users) (username: {
home.stateVersion = lib.mkDefault "24.05";
imports = [
../../home-manager
] ++ lib.optionals config.osbmModules.hardware.disko.zfs.impermanence.enable [
# if impermanence is enabled, configure persistence
{
home.persistence."/persist/home/${username}" = {
directories = [
"Pictures"
"Documents"
"Videos"
".gnupg"
".ssh"
".local/share/keyrings"
".local/share/direnv"
# {
# directory = ".local/share/Steam";
# method = "symlink";
# }
];
files = [
".screenrc"
];
allowOther = true;
};
}
];
});
};
};
# Configure home-manager for each user (excluding root)
users =
let
# Capture the NixOS system config before entering the home-manager scope
systemConfig = config;
in
lib.genAttrs (builtins.filter (u: u != "root") config.osbmModules.users) (username: {
home.stateVersion = lib.mkDefault "24.05";
imports = [
../../home-manager
]
++ lib.optionals systemConfig.osbmModules.hardware.disko.zfs.root.impermanenceRoot [
# Import impermanence home-manager module when impermanence is enabled
inputs.impermanence.homeManagerModules.impermanence
# Configure persistence
{
home.persistence."/persist/home/${username}" = {
directories = [
"Pictures"
"Documents"
"Videos"
".gnupg"
".ssh"
".local/share/keyrings"
".local/share/direnv"
# {
# directory = ".local/share/Steam";
# method = "symlink";
# }
];
files = [
".screenrc"
];
allowOther = true;
};
}
];
});
};
})
];
}