home manager impermanence things
This commit is contained in:
parent
c35ad8e623
commit
88f7974e6a
1 changed files with 28 additions and 3 deletions
|
|
@ -6,11 +6,11 @@
|
|||
}:
|
||||
|
||||
{
|
||||
imports = lib.optionals (inputs ? home-manager) [
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
|
||||
config = lib.mkIf (config.osbmModules.homeManager.enable && inputs ? home-manager) {
|
||||
config = lib.mkIf (config.osbmModules.homeManager.enable) {
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
|
|
@ -21,7 +21,32 @@
|
|||
# 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 ];
|
||||
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;
|
||||
};
|
||||
}
|
||||
];
|
||||
});
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue