sys: create defaultDesktopPack for sys and move settings into it
This commit is contained in:
		
							parent
							
								
									2c4d24a33b
								
							
						
					
					
						commit
						87e96b52c3
					
				
					 6 changed files with 87 additions and 91 deletions
				
			
		|  | @ -18,5 +18,6 @@ | |||
|     ./gtklock.nix | ||||
|     ./borgsync.nix | ||||
|     ./dufs.nix | ||||
|     ./defaultDesktopPack.nix | ||||
|   ]; | ||||
| } | ||||
|  |  | |||
							
								
								
									
										45
									
								
								sys/modules/defaultDesktopPack.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								sys/modules/defaultDesktopPack.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,45 @@ | |||
| { | ||||
|   config, | ||||
|   lib, | ||||
|   pkgs, | ||||
|   ... | ||||
| }: | ||||
| with lib; let | ||||
|   cfg = config.local.sys.defaultDesktopPack; | ||||
| in { | ||||
|   options.local.sys.defaultDesktopPack = { | ||||
|     enable = mkEnableOption "common desktop programs and services"; | ||||
|   }; | ||||
|   config = mkIf cfg.enable { | ||||
|     local.sys = { | ||||
|       baseline.enable = true; | ||||
| 
 | ||||
|       audio.enable = true; | ||||
|       graphics.enable = true; | ||||
|       gtklock.enable = true; | ||||
|       steam.enable = true; | ||||
| 
 | ||||
|       users = { | ||||
|         fabian = { | ||||
|           enable = true; | ||||
|           unixId = 1002; #TODO !!!!!! | ||||
|         }; | ||||
|       }; | ||||
|     }; | ||||
| 
 | ||||
|     # trivionomicon | ||||
|     local = { | ||||
|       sway.enable = true; | ||||
|       trivionomiconMotd.enable = true; | ||||
|     }; | ||||
| 
 | ||||
|     networking = { | ||||
|       networkmanager.enable = true; | ||||
| 
 | ||||
|       #TODO | ||||
|       useDHCP = false; # The global useDHCP flag is deprecated, therefore explicitly set to false here. | ||||
|       interfaces.enp7s0.useDHCP = true; # Per-interface useDHCP will be mandatory in the future, so this generated config | ||||
|       interfaces.wlp6s0.useDHCP = true; # replicates the default behaviour. | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  | @ -35,18 +35,6 @@ in { | |||
|         unixId = mkDefault 1000; | ||||
|         admin = true; | ||||
|       }; | ||||
|       vanessa = { | ||||
|         unixId = mkDefault 1001; | ||||
|         admin = false; | ||||
|       }; | ||||
|       soto = { | ||||
|         unixId = mkDefault 1010; | ||||
|         admin = false; | ||||
|       }; | ||||
|       diaz = { | ||||
|         unixId = mkDefault 1011; | ||||
|         admin = false; | ||||
|       }; | ||||
|     }; | ||||
| 
 | ||||
|     users = let | ||||
|  | @ -66,7 +54,7 @@ in { | |||
|           shell = pkgs.zsh; | ||||
|           extraGroups = | ||||
|             ["users" "networkmanager"] | ||||
|             ++ optionals (v.admin) ["wheel" "libvirtd" "dialout" "adbusers"]; | ||||
|             ++ optionals (v.admin) ["wheel" "libvirtd" "dialout" "adbusers" "video"]; | ||||
|           openssh.authorizedKeys.keyFiles = v.sshKeyPublicFile; | ||||
|         }) | ||||
|         enabledUsers; | ||||
|  |  | |||
|  | @ -12,15 +12,11 @@ | |||
|   ]; | ||||
| 
 | ||||
|   local.sys = { | ||||
|     baseline.enable = true; | ||||
|     defaultDesktopPack.enable = true; | ||||
| 
 | ||||
|     yubikey.enable = true; | ||||
|     audio.enable = true; | ||||
|     graphics.enable = true; | ||||
|     virtualisation.enable = true; | ||||
|     androidSupport.enable = true; | ||||
|     steam.enable = true; | ||||
|     gtklock.enable = true; | ||||
|     borgsync = { | ||||
|       enable = true; | ||||
|       paths = [ | ||||
|  | @ -30,27 +26,11 @@ | |||
|       ]; | ||||
|       repoName = "posixlycorrect"; | ||||
|     }; | ||||
| 
 | ||||
|     users = { | ||||
|       fabian = { | ||||
|         enable = true; | ||||
|         unixId = 1002; | ||||
|       }; | ||||
|       vanessa.enable = true; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   local.sway.enable = true; | ||||
|   local.trivionomiconMotd.enable = true; | ||||
| 
 | ||||
|   networking = { | ||||
|     hostName = "posixlycorrect"; | ||||
|     networkmanager.enable = true; | ||||
|     hostId = "0414a727"; | ||||
| 
 | ||||
|     useDHCP = false; # The global useDHCP flag is deprecated, therefore explicitly set to false here. | ||||
|     interfaces.enp7s0.useDHCP = true; # Per-interface useDHCP will be mandatory in the future, so this generated config | ||||
|     interfaces.wlp6s0.useDHCP = true; # replicates the default behaviour. | ||||
|   }; | ||||
| 
 | ||||
|   boot = { | ||||
|  |  | |||
|  | @ -12,39 +12,27 @@ | |||
|   ]; | ||||
| 
 | ||||
|   local.sys = { | ||||
|     baseline.enable = true; | ||||
|     defaultDesktopPack.enable = true; | ||||
| 
 | ||||
|     yubikey.enable = true; | ||||
|     audio.enable = true; | ||||
|     graphics.enable = true; | ||||
|     steam.enable = true; | ||||
|     gtklock.enable = true; | ||||
|     bluetooth.enable = true; | ||||
| 
 | ||||
|     users = { | ||||
|       fabian = { | ||||
|         enable = true; | ||||
|         unixId = 1002; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   # trivionomicon | ||||
|   local = { | ||||
|     sway.enable = true; | ||||
|     trivionomiconMotd.enable = true; | ||||
|     laptop.enable = true; | ||||
|     thinkpad.enable = true; | ||||
|   }; | ||||
| 
 | ||||
|   networking = { | ||||
|     hostName = "t14"; | ||||
|     networkmanager.enable = true; | ||||
| 
 | ||||
|     useDHCP = false; # The global useDHCP flag is deprecated, therefore explicitly set to false here. | ||||
|     interfaces.enp7s0.useDHCP = true; # Per-interface useDHCP will be mandatory in the future, so this generated config | ||||
|     interfaces.wlp6s0.useDHCP = true; # replicates the default behaviour. | ||||
|   services = { | ||||
|     fwupd.enable = true; #TODO | ||||
|     pcscd.enable = true; #TODO | ||||
|   }; | ||||
| 
 | ||||
|   hardware.acpilight.enable = true; | ||||
| 
 | ||||
|   networking.hostName = "t14"; | ||||
| 
 | ||||
|   boot = { | ||||
|     loader = { | ||||
|       systemd-boot.enable = true; | ||||
|  | @ -55,10 +43,4 @@ | |||
|   }; | ||||
| 
 | ||||
|   time.timeZone = "America/Costa_Rica"; | ||||
| 
 | ||||
|   services = { | ||||
|     fwupd.enable = true;  #TODO | ||||
|     pcscd.enable = true;  #TODO | ||||
|   }; | ||||
|   hardware.acpilight.enable = true; | ||||
| } | ||||
|  |  | |||
|  | @ -17,11 +17,6 @@ with lib; { | |||
|     ./networkMap.nix | ||||
|   ]; | ||||
| 
 | ||||
|   local.soju = { | ||||
|     enable = true; | ||||
|     fullyQualifiedDomain = "soju.posixlycorrect.com"; | ||||
|   }; | ||||
| 
 | ||||
|   local.sys = { | ||||
|     baseline.enable = true; | ||||
| 
 | ||||
|  | @ -42,9 +37,10 @@ with lib; { | |||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   networking = { | ||||
|     hostName = "vps"; | ||||
|     domain = "posixlycorrect.com"; | ||||
|   # trivionomicon | ||||
|   local.soju = { | ||||
|     enable = true; | ||||
|     fullyQualifiedDomain = "soju.posixlycorrect.com"; | ||||
|   }; | ||||
| 
 | ||||
|   services.openssh = { | ||||
|  | @ -53,29 +49,13 @@ with lib; { | |||
| 
 | ||||
|   programs.mosh.enable = true; | ||||
| 
 | ||||
|   home-manager = { | ||||
|     useGlobalPkgs = true; | ||||
|     useUserPackages = true; | ||||
| 
 | ||||
|     extraSpecialArgs = { | ||||
|       inherit flakes; | ||||
|       doctrine = flakes.trivionomicon.lib.mkDoctrine { | ||||
|         inherit pkgs; | ||||
|         inherit (doctrine) prefix; | ||||
|         namespace = "home"; | ||||
|       }; | ||||
|     }; | ||||
| 
 | ||||
|     users.fabian = { | ||||
|       imports = [ | ||||
|         flakes.impermanence.nixosModules.home-manager.impermanence | ||||
|         "${flakes.self}/home/platforms/fabian@vps" | ||||
|         "${flakes.self}/home" | ||||
|       ]; | ||||
|     }; | ||||
|   networking = { | ||||
|     hostName = "vps"; | ||||
|     domain = "posixlycorrect.com"; | ||||
|     firewall.allowedUDPPorts = [51820]; #TODO | ||||
|   }; | ||||
| 
 | ||||
|   networking.firewall.allowedUDPPorts = [51820]; #TODO | ||||
|   time.timeZone = "Europe/Amsterdam"; | ||||
| 
 | ||||
|   systemd = { | ||||
|     extraConfig = '' | ||||
|  | @ -137,5 +117,25 @@ with lib; { | |||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   time.timeZone = "Europe/Amsterdam"; | ||||
|   home-manager = { | ||||
|     useGlobalPkgs = true; | ||||
|     useUserPackages = true; | ||||
| 
 | ||||
|     extraSpecialArgs = { | ||||
|       inherit flakes; | ||||
|       doctrine = flakes.trivionomicon.lib.mkDoctrine { | ||||
|         inherit pkgs; | ||||
|         inherit (doctrine) prefix; | ||||
|         namespace = "home"; | ||||
|       }; | ||||
|     }; | ||||
| 
 | ||||
|     users.fabian = { | ||||
|       imports = [ | ||||
|         flakes.impermanence.nixosModules.home-manager.impermanence | ||||
|         "${flakes.self}/home/platforms/fabian@vps" | ||||
|         "${flakes.self}/home" | ||||
|       ]; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue