forked from jan-leila/nix-config
		
	feat: refactored impermanence to be enableable for users on a system
This commit is contained in:
		
							parent
							
								
									337f03b4e7
								
							
						
					
					
						commit
						6d5a07e08f
					
				
					 31 changed files with 61 additions and 56 deletions
				
			
		|  | @ -1,10 +1,9 @@ | ||||||
| { | { | ||||||
|   lib, |   lib, | ||||||
|   config, |   config, | ||||||
|   osConfig, |  | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   config = lib.mkIf osConfig.host.impermanence.enable { |   config = lib.mkIf (config.impermanence.enable) { | ||||||
|     home.persistence."/persist/home/leyla" = { |     home.persistence."/persist/home/leyla" = { | ||||||
|       directories = [ |       directories = [ | ||||||
|         "desktop" |         "desktop" | ||||||
|  |  | ||||||
|  | @ -5,6 +5,7 @@ | ||||||
|     ./user.nix |     ./user.nix | ||||||
|     ./flipperzero.nix |     ./flipperzero.nix | ||||||
|     ./i18n.nix |     ./i18n.nix | ||||||
|  |     ./impermanence.nix | ||||||
|     ./openssh.nix |     ./openssh.nix | ||||||
|     ./gnome.nix |     ./gnome.nix | ||||||
|     ./programs |     ./programs | ||||||
|  |  | ||||||
							
								
								
									
										31
									
								
								modules/home-manager-modules/impermanence.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								modules/home-manager-modules/impermanence.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,31 @@ | ||||||
|  | { | ||||||
|  |   config, | ||||||
|  |   lib, | ||||||
|  |   osConfig, | ||||||
|  |   ... | ||||||
|  | }: let | ||||||
|  |   cfg = config.impermanence; | ||||||
|  | in { | ||||||
|  |   options.impermanence = { | ||||||
|  |     enable = lib.mkEnableOption "impermanence for home directory"; | ||||||
|  |   }; | ||||||
|  | 
 | ||||||
|  |   config = lib.mkMerge [ | ||||||
|  |     (lib.mkIf config.impermanence.enable { | ||||||
|  |       assertions = [ | ||||||
|  |         { | ||||||
|  |           assertion = osConfig.impermanence.enable; | ||||||
|  |           message = "impermanence can not be enabled for a user when it is not enabled for a configuration"; | ||||||
|  |         } | ||||||
|  |       ]; | ||||||
|  |     }) | ||||||
|  |     (lib.mkIf osConfig.host.impermanence.enable { | ||||||
|  |       # If impermanence is not enabled for this user but system impermanence is enabled, | ||||||
|  |       # persist the entire home directory as fallback | ||||||
|  |       home.persistence."/persist/home/${config.home.username}" = lib.mkIf (!cfg.enable) { | ||||||
|  |         directories = ["."]; | ||||||
|  |         allowOther = true; | ||||||
|  |       }; | ||||||
|  |     }) | ||||||
|  |   ]; | ||||||
|  | } | ||||||
|  | @ -95,7 +95,7 @@ | ||||||
|           ); |           ); | ||||||
|         } |         } | ||||||
|       ) |       ) | ||||||
|       (lib.mkIf osConfig.host.impermanence.enable { |       (lib.mkIf config.impermanence.enable { | ||||||
|         home.persistence."/persist${config.home.homeDirectory}" = { |         home.persistence."/persist${config.home.homeDirectory}" = { | ||||||
|           files = lib.lists.flatten ( |           files = lib.lists.flatten ( | ||||||
|             builtins.map (hostKey: [".ssh/${hostKey.path}" ".ssh/${hostKey.path}.pub"]) config.programs.openssh.hostKeys |             builtins.map (hostKey: [".ssh/${hostKey.path}" ".ssh/${hostKey.path}.pub"]) config.programs.openssh.hostKeys | ||||||
|  |  | ||||||
|  | @ -2,7 +2,6 @@ | ||||||
|   lib, |   lib, | ||||||
|   pkgs, |   pkgs, | ||||||
|   config, |   config, | ||||||
|   osConfig, |  | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   options.programs.bitwarden = { |   options.programs.bitwarden = { | ||||||
|  | @ -16,7 +15,7 @@ | ||||||
|       ]; |       ]; | ||||||
|     } |     } | ||||||
|     ( |     ( | ||||||
|       lib.mkIf osConfig.host.impermanence.enable { |       lib.mkIf config.impermanence.enable { | ||||||
|         home.persistence."/persist${config.home.homeDirectory}" = { |         home.persistence."/persist${config.home.homeDirectory}" = { | ||||||
|           directories = [ |           directories = [ | ||||||
|             "${config.xdg.configHome}/Bitwarden" |             "${config.xdg.configHome}/Bitwarden" | ||||||
|  |  | ||||||
|  | @ -2,7 +2,6 @@ | ||||||
|   lib, |   lib, | ||||||
|   pkgs, |   pkgs, | ||||||
|   config, |   config, | ||||||
|   osConfig, |  | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   options.programs.bruno = { |   options.programs.bruno = { | ||||||
|  | @ -16,7 +15,7 @@ | ||||||
|       ]; |       ]; | ||||||
|     } |     } | ||||||
|     ( |     ( | ||||||
|       lib.mkIf osConfig.host.impermanence.enable { |       lib.mkIf config.impermanence.enable { | ||||||
|         home.persistence."/persist${config.home.homeDirectory}" = { |         home.persistence."/persist${config.home.homeDirectory}" = { | ||||||
|           directories = [ |           directories = [ | ||||||
|             "${config.xdg.configHome}/bruno/" |             "${config.xdg.configHome}/bruno/" | ||||||
|  |  | ||||||
|  | @ -2,7 +2,6 @@ | ||||||
|   lib, |   lib, | ||||||
|   pkgs, |   pkgs, | ||||||
|   config, |   config, | ||||||
|   osConfig, |  | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   options.programs.calibre = { |   options.programs.calibre = { | ||||||
|  | @ -16,7 +15,7 @@ | ||||||
|       ]; |       ]; | ||||||
|     } |     } | ||||||
|     ( |     ( | ||||||
|       lib.mkIf osConfig.host.impermanence.enable { |       lib.mkIf config.impermanence.enable { | ||||||
|         home.persistence."/persist${config.home.homeDirectory}" = { |         home.persistence."/persist${config.home.homeDirectory}" = { | ||||||
|           directories = [ |           directories = [ | ||||||
|             "${config.xdg.configHome}/calibre" |             "${config.xdg.configHome}/calibre" | ||||||
|  |  | ||||||
|  | @ -2,7 +2,6 @@ | ||||||
|   lib, |   lib, | ||||||
|   pkgs, |   pkgs, | ||||||
|   config, |   config, | ||||||
|   osConfig, |  | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   options.programs.davinci-resolve = { |   options.programs.davinci-resolve = { | ||||||
|  | @ -16,7 +15,7 @@ | ||||||
|       ]; |       ]; | ||||||
|     } |     } | ||||||
|     ( |     ( | ||||||
|       lib.mkIf osConfig.host.impermanence.enable { |       lib.mkIf config.impermanence.enable { | ||||||
|         home.persistence."/persist${config.home.homeDirectory}" = { |         home.persistence."/persist${config.home.homeDirectory}" = { | ||||||
|           directories = [ |           directories = [ | ||||||
|             "${config.xdg.dataHome}/DaVinciResolve" |             "${config.xdg.dataHome}/DaVinciResolve" | ||||||
|  |  | ||||||
|  | @ -2,7 +2,6 @@ | ||||||
|   lib, |   lib, | ||||||
|   pkgs, |   pkgs, | ||||||
|   config, |   config, | ||||||
|   osConfig, |  | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   options.programs.dbeaver-bin = { |   options.programs.dbeaver-bin = { | ||||||
|  | @ -16,7 +15,7 @@ | ||||||
|       ]; |       ]; | ||||||
|     } |     } | ||||||
|     ( |     ( | ||||||
|       lib.mkIf osConfig.host.impermanence.enable { |       lib.mkIf config.impermanence.enable { | ||||||
|         home.persistence."/persist${config.home.homeDirectory}" = { |         home.persistence."/persist${config.home.homeDirectory}" = { | ||||||
|           directories = [ |           directories = [ | ||||||
|             "${config.xdg.dataHome}/DBeaverData/" |             "${config.xdg.dataHome}/DBeaverData/" | ||||||
|  |  | ||||||
|  | @ -2,7 +2,6 @@ | ||||||
|   lib, |   lib, | ||||||
|   pkgs, |   pkgs, | ||||||
|   config, |   config, | ||||||
|   osConfig, |  | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   options.programs.discord = { |   options.programs.discord = { | ||||||
|  | @ -16,7 +15,7 @@ | ||||||
|       ]; |       ]; | ||||||
|     } |     } | ||||||
|     ( |     ( | ||||||
|       lib.mkIf osConfig.host.impermanence.enable { |       lib.mkIf config.impermanence.enable { | ||||||
|         home.persistence."/persist${config.home.homeDirectory}" = { |         home.persistence."/persist${config.home.homeDirectory}" = { | ||||||
|           directories = [ |           directories = [ | ||||||
|             "${config.xdg.configHome}/discord/" |             "${config.xdg.configHome}/discord/" | ||||||
|  |  | ||||||
|  | @ -1,7 +1,6 @@ | ||||||
| { | { | ||||||
|   lib, |   lib, | ||||||
|   config, |   config, | ||||||
|   osConfig, |  | ||||||
|   ... |   ... | ||||||
| }: let | }: let | ||||||
|   buildProfilePersistence = profile: { |   buildProfilePersistence = profile: { | ||||||
|  | @ -26,7 +25,7 @@ | ||||||
|     allowOther = true; |     allowOther = true; | ||||||
|   }; |   }; | ||||||
| in { | in { | ||||||
|   config = lib.mkIf (config.programs.firefox.enable && osConfig.host.impermanence.enable) { |   config = lib.mkIf (config.programs.firefox.enable && config.impermanence.enable) { | ||||||
|     home.persistence."/persist${config.home.homeDirectory}" = lib.mkMerge ( |     home.persistence."/persist${config.home.homeDirectory}" = lib.mkMerge ( | ||||||
|       ( |       ( | ||||||
|         lib.attrsets.mapAttrsToList |         lib.attrsets.mapAttrsToList | ||||||
|  |  | ||||||
|  | @ -2,7 +2,6 @@ | ||||||
|   lib, |   lib, | ||||||
|   pkgs, |   pkgs, | ||||||
|   config, |   config, | ||||||
|   osConfig, |  | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   options.programs.freecad = { |   options.programs.freecad = { | ||||||
|  | @ -16,7 +15,7 @@ | ||||||
|       ]; |       ]; | ||||||
|     } |     } | ||||||
|     ( |     ( | ||||||
|       lib.mkIf osConfig.host.impermanence.enable { |       lib.mkIf config.impermanence.enable { | ||||||
|         home.persistence."/persist${config.home.homeDirectory}" = { |         home.persistence."/persist${config.home.homeDirectory}" = { | ||||||
|           directories = [ |           directories = [ | ||||||
|             "${config.xdg.configHome}/FreeCAD" |             "${config.xdg.configHome}/FreeCAD" | ||||||
|  |  | ||||||
|  | @ -2,7 +2,6 @@ | ||||||
|   lib, |   lib, | ||||||
|   pkgs, |   pkgs, | ||||||
|   config, |   config, | ||||||
|   osConfig, |  | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   options.programs.gimp = { |   options.programs.gimp = { | ||||||
|  | @ -16,7 +15,7 @@ | ||||||
|       ]; |       ]; | ||||||
|     } |     } | ||||||
|     ( |     ( | ||||||
|       lib.mkIf osConfig.host.impermanence.enable { |       lib.mkIf config.impermanence.enable { | ||||||
|         home.persistence."/persist${config.home.homeDirectory}" = { |         home.persistence."/persist${config.home.homeDirectory}" = { | ||||||
|           directories = [ |           directories = [ | ||||||
|             "${config.xdg.configHome}/GIMP" |             "${config.xdg.configHome}/GIMP" | ||||||
|  |  | ||||||
|  | @ -16,7 +16,7 @@ | ||||||
|       ]; |       ]; | ||||||
|     } |     } | ||||||
|     ( |     ( | ||||||
|       lib.mkIf osConfig.host.impermanence.enable { |       lib.mkIf config.impermanence.enable { | ||||||
|         home.persistence."/persist${config.home.homeDirectory}" = { |         home.persistence."/persist${config.home.homeDirectory}" = { | ||||||
|           directories = [ |           directories = [ | ||||||
|             # configuration |             # configuration | ||||||
|  |  | ||||||
|  | @ -2,7 +2,6 @@ | ||||||
|   lib, |   lib, | ||||||
|   pkgs, |   pkgs, | ||||||
|   config, |   config, | ||||||
|   osConfig, |  | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   options.programs.inkscape = { |   options.programs.inkscape = { | ||||||
|  | @ -16,7 +15,7 @@ | ||||||
|       ]; |       ]; | ||||||
|     } |     } | ||||||
|     ( |     ( | ||||||
|       lib.mkIf osConfig.host.impermanence.enable { |       lib.mkIf config.impermanence.enable { | ||||||
|         home.persistence."/persist${config.home.homeDirectory}" = { |         home.persistence."/persist${config.home.homeDirectory}" = { | ||||||
|           directories = [ |           directories = [ | ||||||
|             "${config.xdg.configHome}/inkscape" |             "${config.xdg.configHome}/inkscape" | ||||||
|  |  | ||||||
|  | @ -2,7 +2,6 @@ | ||||||
|   lib, |   lib, | ||||||
|   pkgs, |   pkgs, | ||||||
|   config, |   config, | ||||||
|   osConfig, |  | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   options.programs.krita = { |   options.programs.krita = { | ||||||
|  | @ -16,7 +15,7 @@ | ||||||
|       ]; |       ]; | ||||||
|     } |     } | ||||||
|     ( |     ( | ||||||
|       lib.mkIf osConfig.host.impermanence.enable { |       lib.mkIf config.impermanence.enable { | ||||||
|         home.persistence."/persist${config.home.homeDirectory}" = { |         home.persistence."/persist${config.home.homeDirectory}" = { | ||||||
|           directories = [ |           directories = [ | ||||||
|             "${config.xdg.configHome}/kritarc" |             "${config.xdg.configHome}/kritarc" | ||||||
|  |  | ||||||
|  | @ -2,7 +2,6 @@ | ||||||
|   lib, |   lib, | ||||||
|   pkgs, |   pkgs, | ||||||
|   config, |   config, | ||||||
|   osConfig, |  | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   options.programs.libreoffice = { |   options.programs.libreoffice = { | ||||||
|  | @ -16,7 +15,7 @@ | ||||||
|       ]; |       ]; | ||||||
|     } |     } | ||||||
|     ( |     ( | ||||||
|       lib.mkIf osConfig.host.impermanence.enable { |       lib.mkIf config.impermanence.enable { | ||||||
|         home.persistence."/persist${config.home.homeDirectory}" = { |         home.persistence."/persist${config.home.homeDirectory}" = { | ||||||
|           directories = [ |           directories = [ | ||||||
|             "${config.xdg.configHome}/libreoffice" |             "${config.xdg.configHome}/libreoffice" | ||||||
|  |  | ||||||
|  | @ -2,7 +2,6 @@ | ||||||
|   lib, |   lib, | ||||||
|   pkgs, |   pkgs, | ||||||
|   config, |   config, | ||||||
|   osConfig, |  | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   options.programs.makemkv = { |   options.programs.makemkv = { | ||||||
|  | @ -30,7 +29,7 @@ | ||||||
|       home.file.".MakeMKV/settings.conf".source = config.lib.file.mkOutOfStoreSymlink config.sops.templates."MakeMKV.settings.conf".path; |       home.file.".MakeMKV/settings.conf".source = config.lib.file.mkOutOfStoreSymlink config.sops.templates."MakeMKV.settings.conf".path; | ||||||
|     } |     } | ||||||
|     ( |     ( | ||||||
|       lib.mkIf osConfig.host.impermanence.enable { |       lib.mkIf config.impermanence.enable { | ||||||
|         home.persistence."/persist${config.home.homeDirectory}" = { |         home.persistence."/persist${config.home.homeDirectory}" = { | ||||||
|           directories = [ |           directories = [ | ||||||
|             ".MakeMKV" |             ".MakeMKV" | ||||||
|  |  | ||||||
|  | @ -1,12 +1,11 @@ | ||||||
| { | { | ||||||
|   lib, |   lib, | ||||||
|   config, |   config, | ||||||
|   osConfig, |  | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   config = lib.mkIf config.programs.obs-studio.enable (lib.mkMerge [ |   config = lib.mkIf config.programs.obs-studio.enable (lib.mkMerge [ | ||||||
|     ( |     ( | ||||||
|       lib.mkIf osConfig.host.impermanence.enable { |       lib.mkIf config.impermanence.enable { | ||||||
|         # TODO: map impermanence for obs |         # TODO: map impermanence for obs | ||||||
|       } |       } | ||||||
|     ) |     ) | ||||||
|  |  | ||||||
|  | @ -1,12 +1,11 @@ | ||||||
| { | { | ||||||
|   lib, |   lib, | ||||||
|   config, |   config, | ||||||
|   osConfig, |  | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   config = lib.mkIf config.programs.obsidian.enable (lib.mkMerge [ |   config = lib.mkIf config.programs.obsidian.enable (lib.mkMerge [ | ||||||
|     ( |     ( | ||||||
|       lib.mkIf osConfig.host.impermanence.enable { |       lib.mkIf config.impermanence.enable { | ||||||
|         home.persistence."/persist${config.home.homeDirectory}" = { |         home.persistence."/persist${config.home.homeDirectory}" = { | ||||||
|           directories = [ |           directories = [ | ||||||
|             "${config.xdg.configHome}/obsidian" |             "${config.xdg.configHome}/obsidian" | ||||||
|  |  | ||||||
|  | @ -2,7 +2,6 @@ | ||||||
|   lib, |   lib, | ||||||
|   pkgs, |   pkgs, | ||||||
|   config, |   config, | ||||||
|   osConfig, |  | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   options.programs.picard = { |   options.programs.picard = { | ||||||
|  | @ -16,7 +15,7 @@ | ||||||
|       ]; |       ]; | ||||||
|     } |     } | ||||||
|     ( |     ( | ||||||
|       lib.mkIf osConfig.host.impermanence.enable { |       lib.mkIf config.impermanence.enable { | ||||||
|         home.persistence."/persist${config.home.homeDirectory}" = { |         home.persistence."/persist${config.home.homeDirectory}" = { | ||||||
|           directories = [ |           directories = [ | ||||||
|             "${config.xdg.configHome}/MusicBrainz" |             "${config.xdg.configHome}/MusicBrainz" | ||||||
|  |  | ||||||
|  | @ -2,7 +2,6 @@ | ||||||
|   lib, |   lib, | ||||||
|   pkgs, |   pkgs, | ||||||
|   config, |   config, | ||||||
|   osConfig, |  | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   options.programs.polycule = { |   options.programs.polycule = { | ||||||
|  | @ -17,7 +16,7 @@ | ||||||
|       ]; |       ]; | ||||||
|     } |     } | ||||||
|     ( |     ( | ||||||
|       lib.mkIf osConfig.host.impermanence.enable { |       lib.mkIf config.impermanence.enable { | ||||||
|         home.persistence."/persist${config.home.homeDirectory}" = { |         home.persistence."/persist${config.home.homeDirectory}" = { | ||||||
|           # TODO: check that these are actually the correct folders |           # TODO: check that these are actually the correct folders | ||||||
|           # directories = [ |           # directories = [ | ||||||
|  |  | ||||||
|  | @ -2,7 +2,6 @@ | ||||||
|   lib, |   lib, | ||||||
|   pkgs, |   pkgs, | ||||||
|   config, |   config, | ||||||
|   osConfig, |  | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   options.programs.prostudiomasters = { |   options.programs.prostudiomasters = { | ||||||
|  | @ -16,7 +15,7 @@ | ||||||
|       ]; |       ]; | ||||||
|     } |     } | ||||||
|     ( |     ( | ||||||
|       lib.mkIf osConfig.host.impermanence.enable { |       lib.mkIf config.impermanence.enable { | ||||||
|         home.persistence."/persist${config.home.homeDirectory}" = { |         home.persistence."/persist${config.home.homeDirectory}" = { | ||||||
|           directories = [ |           directories = [ | ||||||
|             "${config.xdg.configHome}/ProStudioMasters" |             "${config.xdg.configHome}/ProStudioMasters" | ||||||
|  |  | ||||||
|  | @ -2,7 +2,6 @@ | ||||||
|   lib, |   lib, | ||||||
|   pkgs, |   pkgs, | ||||||
|   config, |   config, | ||||||
|   osConfig, |  | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   options.programs.protonvpn-gui = { |   options.programs.protonvpn-gui = { | ||||||
|  | @ -16,7 +15,7 @@ | ||||||
|       ]; |       ]; | ||||||
|     } |     } | ||||||
|     ( |     ( | ||||||
|       lib.mkIf osConfig.host.impermanence.enable { |       lib.mkIf config.impermanence.enable { | ||||||
|         home.persistence."/persist${config.home.homeDirectory}" = { |         home.persistence."/persist${config.home.homeDirectory}" = { | ||||||
|           directories = [ |           directories = [ | ||||||
|             "${config.xdg.configHome}/protonvpn" |             "${config.xdg.configHome}/protonvpn" | ||||||
|  |  | ||||||
|  | @ -2,7 +2,6 @@ | ||||||
|   lib, |   lib, | ||||||
|   pkgs, |   pkgs, | ||||||
|   config, |   config, | ||||||
|   osConfig, |  | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   options.programs.qbittorrent = { |   options.programs.qbittorrent = { | ||||||
|  | @ -16,7 +15,7 @@ | ||||||
|       ]; |       ]; | ||||||
|     } |     } | ||||||
|     ( |     ( | ||||||
|       lib.mkIf osConfig.host.impermanence.enable { |       lib.mkIf config.impermanence.enable { | ||||||
|         home.persistence."/persist${config.home.homeDirectory}" = { |         home.persistence."/persist${config.home.homeDirectory}" = { | ||||||
|           directories = [ |           directories = [ | ||||||
|             "${config.xdg.configHome}/qBittorrent" |             "${config.xdg.configHome}/qBittorrent" | ||||||
|  |  | ||||||
|  | @ -2,7 +2,6 @@ | ||||||
|   lib, |   lib, | ||||||
|   pkgs, |   pkgs, | ||||||
|   config, |   config, | ||||||
|   osConfig, |  | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   options.programs.qflipper = { |   options.programs.qflipper = { | ||||||
|  | @ -16,7 +15,7 @@ | ||||||
|       ]; |       ]; | ||||||
|     } |     } | ||||||
|     ( |     ( | ||||||
|       lib.mkIf osConfig.host.impermanence.enable { |       lib.mkIf config.impermanence.enable { | ||||||
|         home.persistence."/persist${config.home.homeDirectory}" = { |         home.persistence."/persist${config.home.homeDirectory}" = { | ||||||
|           directories = [ |           directories = [ | ||||||
|             "${config.xdg.configHome}/qFlipper" |             "${config.xdg.configHome}/qFlipper" | ||||||
|  |  | ||||||
|  | @ -2,7 +2,6 @@ | ||||||
|   lib, |   lib, | ||||||
|   pkgs, |   pkgs, | ||||||
|   config, |   config, | ||||||
|   osConfig, |  | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   options.programs.signal-desktop-bin = { |   options.programs.signal-desktop-bin = { | ||||||
|  | @ -16,7 +15,7 @@ | ||||||
|       ]; |       ]; | ||||||
|     } |     } | ||||||
|     ( |     ( | ||||||
|       lib.mkIf osConfig.host.impermanence.enable { |       lib.mkIf config.impermanence.enable { | ||||||
|         home.persistence."/persist${config.home.homeDirectory}" = { |         home.persistence."/persist${config.home.homeDirectory}" = { | ||||||
|           directories = [ |           directories = [ | ||||||
|             "${config.xdg.configHome}/Signal" |             "${config.xdg.configHome}/Signal" | ||||||
|  |  | ||||||
|  | @ -2,7 +2,6 @@ | ||||||
|   lib, |   lib, | ||||||
|   pkgs, |   pkgs, | ||||||
|   config, |   config, | ||||||
|   osConfig, |  | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   options.programs.steam = { |   options.programs.steam = { | ||||||
|  | @ -18,7 +17,7 @@ | ||||||
|         ]; |         ]; | ||||||
|       } |       } | ||||||
|       ( |       ( | ||||||
|         lib.mkIf osConfig.host.impermanence.enable { |         lib.mkIf config.impermanence.enable { | ||||||
|           home.persistence."/persist${config.home.homeDirectory}" = { |           home.persistence."/persist${config.home.homeDirectory}" = { | ||||||
|             directories = [ |             directories = [ | ||||||
|               { |               { | ||||||
|  |  | ||||||
|  | @ -2,7 +2,6 @@ | ||||||
|   lib, |   lib, | ||||||
|   pkgs, |   pkgs, | ||||||
|   config, |   config, | ||||||
|   osConfig, |  | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   options.programs.tor-browser = { |   options.programs.tor-browser = { | ||||||
|  | @ -16,7 +15,7 @@ | ||||||
|       ]; |       ]; | ||||||
|     } |     } | ||||||
|     ( |     ( | ||||||
|       lib.mkIf osConfig.host.impermanence.enable { |       lib.mkIf config.impermanence.enable { | ||||||
|         home.persistence."/persist${config.home.homeDirectory}" = { |         home.persistence."/persist${config.home.homeDirectory}" = { | ||||||
|           directories = [ |           directories = [ | ||||||
|             "${config.xdg.dataHome}/torbrowser" |             "${config.xdg.dataHome}/torbrowser" | ||||||
|  |  | ||||||
|  | @ -2,7 +2,6 @@ | ||||||
|   lib, |   lib, | ||||||
|   pkgs, |   pkgs, | ||||||
|   config, |   config, | ||||||
|   osConfig, |  | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   options.programs.ungoogled-chromium = { |   options.programs.ungoogled-chromium = { | ||||||
|  | @ -16,7 +15,7 @@ | ||||||
|       ]; |       ]; | ||||||
|     } |     } | ||||||
|     ( |     ( | ||||||
|       lib.mkIf osConfig.host.impermanence.enable { |       lib.mkIf config.impermanence.enable { | ||||||
|         home.persistence."/persist${config.home.homeDirectory}" = { |         home.persistence."/persist${config.home.homeDirectory}" = { | ||||||
|           directories = [ |           directories = [ | ||||||
|             "${config.xdg.configHome}/chromium" |             "${config.xdg.configHome}/chromium" | ||||||
|  |  | ||||||
|  | @ -1,10 +1,9 @@ | ||||||
| { | { | ||||||
|   lib, |   lib, | ||||||
|   config, |   config, | ||||||
|   osConfig, |  | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   config = lib.mkIf (config.services.panoramax.enable && osConfig.host.impermanence.enable) { |   config = lib.mkIf (config.services.panoramax.enable && config.host.impermanence.enable) { | ||||||
|     # TODO: configure impermanence for panoramax data |     # TODO: configure impermanence for panoramax data | ||||||
|     # This would typically include directories like: |     # This would typically include directories like: | ||||||
|     # - /var/lib/panoramax |     # - /var/lib/panoramax | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue