forked from jan-leila/nix-config
		
	added thin user option to leyla
This commit is contained in:
		
							parent
							
								
									feb30a45bf
								
							
						
					
					
						commit
						0545051a1b
					
				
					 4 changed files with 64 additions and 101 deletions
				
			
		|  | @ -17,10 +17,10 @@ | ||||||
|   sops.age.keyFile = "/home/leyla/.config/sops/age/keys.txt"; |   sops.age.keyFile = "/home/leyla/.config/sops/age/keys.txt"; | ||||||
| 
 | 
 | ||||||
|   users.leyla.isNormalUser = true; |   users.leyla.isNormalUser = true; | ||||||
|  |   users.leyla.isThinInstallation = true; | ||||||
|   users.ester.isNormalUser = false; |   users.ester.isNormalUser = false; | ||||||
|   users.eve.isNormalUser = false; |   users.eve.isNormalUser = false; | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
|   boot.loader.grub = { |   boot.loader.grub = { | ||||||
|     enable = true; |     enable = true; | ||||||
|     device = "/dev/sda"; |     device = "/dev/sda"; | ||||||
|  |  | ||||||
|  | @ -9,6 +9,7 @@ in | ||||||
| 
 | 
 | ||||||
|   options.users.leyla = { |   options.users.leyla = { | ||||||
|     isNormalUser = lib.mkEnableOption "create usable leyla user"; |     isNormalUser = lib.mkEnableOption "create usable leyla user"; | ||||||
|  |     isThinInstallation = lib.mkEnableOption "are most programs going to be installed or not"; | ||||||
|     hasPiperMouse = lib.mkEnableOption "install programs for managing piper supported mouses"; |     hasPiperMouse = lib.mkEnableOption "install programs for managing piper supported mouses"; | ||||||
|     hasOpenRGBHardware = lib.mkEnableOption "install programs for managing openRGB supported hardware"; |     hasOpenRGBHardware = lib.mkEnableOption "install programs for managing openRGB supported hardware"; | ||||||
|     hasViaKeyboard = lib.mkEnableOption "install programs for managing via supported keyboards"; |     hasViaKeyboard = lib.mkEnableOption "install programs for managing via supported keyboards"; | ||||||
|  | @ -35,7 +36,12 @@ in | ||||||
|       ( |       ( | ||||||
|         if cfg.isNormalUser then { |         if cfg.isNormalUser then { | ||||||
|           isNormalUser = true; |           isNormalUser = true; | ||||||
|           extraGroups = [ "networkmanager" "wheel" "adbusers" "docker" ]; |           extraGroups = lib.mkMerge [ | ||||||
|  |             ["networkmanager" "wheel" "docker"] | ||||||
|  |             ( | ||||||
|  |               lib.mkIf (!cfg.isThinInstallation) [ "adbusers" ] | ||||||
|  |             ) | ||||||
|  |           ]; | ||||||
| 
 | 
 | ||||||
|           hashedPasswordFile = config.sops.secrets."passwords/leyla".path; |           hashedPasswordFile = config.sops.secrets."passwords/leyla".path; | ||||||
|         } else { |         } else { | ||||||
|  |  | ||||||
|  | @ -120,33 +120,4 @@ | ||||||
|       }; |       }; | ||||||
|     }; |     }; | ||||||
|   }; |   }; | ||||||
| 
 |  | ||||||
|   # dconf.settings = { |  | ||||||
|   #   "org/gnome/settings-daemon/plugins/media-keys" = { |  | ||||||
|   #     custom-keybindings = [ |  | ||||||
|   #       "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/" |  | ||||||
|   #     ]; |  | ||||||
|   #   }; |  | ||||||
|   # }; |  | ||||||
| 
 |  | ||||||
|   # "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = { |  | ||||||
|   #   binding = "<Super>t"; |  | ||||||
|   #   command = "kgx"; |  | ||||||
|   #   name = "Open Terminal"; |  | ||||||
|   # }; |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|   # services.xserver.desktopManager.gnome3 = { |  | ||||||
|   #   extraGSettingsOverridePackages = with pkgs; [ gnome3.gnome-settings-daemon ]; |  | ||||||
|   #   extraGSettingsOverrides = '' |  | ||||||
|   #     [org.gnome.settings-daemon.plugins.media-keys] |  | ||||||
|   #     custom-keybindings=['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/'] |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|   #     [org.gnome.settings-daemon.plugins.media-keys.custom-keybindings.custom0] |  | ||||||
|   #     binding='<Super>t' |  | ||||||
|   #     command='kgx' |  | ||||||
|   #     name='Open terminal' |  | ||||||
|   #   ''; |  | ||||||
|   # } |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -27,6 +27,17 @@ in | ||||||
|   ]; |   ]; | ||||||
| 
 | 
 | ||||||
|   users.users.leyla.packages = lib.mkIf cfg.isNormalUser ( |   users.users.leyla.packages = lib.mkIf cfg.isNormalUser ( | ||||||
|  |     lib.mkMerge [ | ||||||
|  |       ( | ||||||
|  |         with pkgs; [ | ||||||
|  |           # comand line tools | ||||||
|  |           yt-dlp | ||||||
|  |           ffmpeg | ||||||
|  |           imagemagick | ||||||
|  |         ] | ||||||
|  |       ) | ||||||
|  |       ( | ||||||
|  |         lib.mkIf (!cfg.isThinInstallation) ( | ||||||
|           with pkgs; [ |           with pkgs; [ | ||||||
|             #foss platforms |             #foss platforms | ||||||
|             signal-desktop |             signal-desktop | ||||||
|  | @ -50,11 +61,6 @@ in | ||||||
|             # rpi-imager |             # rpi-imager | ||||||
|             # fritzing |             # fritzing | ||||||
| 
 | 
 | ||||||
|       # comand line tools |  | ||||||
|       yt-dlp |  | ||||||
|       ffmpeg |  | ||||||
|       imagemagick |  | ||||||
| 
 |  | ||||||
|             # proprietary platforms |             # proprietary platforms | ||||||
|             discord |             discord | ||||||
|             obsidian |             obsidian | ||||||
|  | @ -77,29 +83,9 @@ in | ||||||
|             (lib.mkIf cfg.hasPiperMouse piper) |             (lib.mkIf cfg.hasPiperMouse piper) | ||||||
|             (lib.mkIf cfg.hasOpenRGBHardware openrgb) |             (lib.mkIf cfg.hasOpenRGBHardware openrgb) | ||||||
|             (lib.mkIf cfg.hasViaKeyboard via) |             (lib.mkIf cfg.hasViaKeyboard via) | ||||||
| 
 |           ] | ||||||
|       # # gaming |         ) | ||||||
|       # # emulators |       ) | ||||||
|       # # nintendo |  | ||||||
|       # # TODO: replace this with self hosted flake |  | ||||||
|       # # (lib.mkIf cfg.hasGPU yuzu-mainline) # Switch Emulator |  | ||||||
|       # # TODO: replace this with self hosted flake |  | ||||||
|       # # citra-canary # 3DS emulator |  | ||||||
|       # (lib.mkIf cfg.hasGPU cemu) # Wii-U emulator |  | ||||||
|       # dolphin-emu # GameCube and Wii Emulator |  | ||||||
|       # desmume # DS Emulator |  | ||||||
|       # mupen64plus # N64 Emulator |  | ||||||
|       # zsnes # SNES Emulator |  | ||||||
|       # vbam # Game Boy Advanced Emulator |  | ||||||
|       # fceux # NES Emulator |  | ||||||
|       # # play station |  | ||||||
|       # rpcs3 # PS3 Emulator |  | ||||||
|       # pcsx2 # PS2 Emulator |  | ||||||
|       # pcsxr # PS1 Emulator |  | ||||||
|       # # TODO: more play station emulators here when they come out |  | ||||||
|       # #misc |  | ||||||
|       # stella # Atari 2600 Emulator |  | ||||||
|       # mame # mame Emulator |  | ||||||
|     ] |     ] | ||||||
|   ); |   ); | ||||||
| } | } | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue