forked from jan-leila/nix-config
		
	replaced isThinInstallation with isThinUser
added util folder
This commit is contained in:
		
							parent
							
								
									8232ae338c
								
							
						
					
					
						commit
						b9431f5814
					
				
					 5 changed files with 19 additions and 13 deletions
				
			
		|  | @ -35,12 +35,13 @@ TODO: keys.txt should prob be readable by owning user only? | |||
| - graphics driver things should prob be in the hardware-configuration.nix | ||||
| - what does `boot.kernelModules = [ "sg" ]` do? | ||||
| - sops.age.keyFile should not just be hard coded to leyla? | ||||
| - isThinInstallation -> isThinUser | ||||
| - use dashes for options not camel case | ||||
| ## New Features | ||||
| - openssh configuration for server | ||||
| - VS code extensions should be installed declaratively | ||||
| - Flake templates | ||||
| - Flake templates - https://nix.dev/manual/nix/2.22/command-ref/new-cli/nix3-flake-init | ||||
| - Install all the things on the NAS | ||||
| - firefox declarative??? | ||||
| - figure out steam vr things? | ||||
| - Open GL? | ||||
| - Open GL? | ||||
| - util functions | ||||
|  | @ -16,10 +16,7 @@ | |||
| 
 | ||||
|   sops.age.keyFile = "/home/leyla/.config/sops/age/keys.txt"; | ||||
| 
 | ||||
|   users.leyla = { | ||||
|     isNormalUser = true; | ||||
|     isThinInstallation = true; | ||||
|   }; | ||||
|   users.leyla.isThinUser = true; | ||||
| 
 | ||||
|   boot.loader.grub = { | ||||
|     enable = true; | ||||
|  |  | |||
|  | @ -9,7 +9,7 @@ in | |||
| 
 | ||||
|   options.users.leyla = { | ||||
|     isNormalUser = lib.mkEnableOption "create usable leyla user"; | ||||
|     isThinInstallation = lib.mkEnableOption "are most programs going to be installed or not"; | ||||
|     isThinUser = lib.mkEnableOption "create usable user but witohut user applications"; | ||||
|     hasPiperMouse = lib.mkEnableOption "install programs for managing piper supported mouses"; | ||||
|     hasOpenRGBHardware = lib.mkEnableOption "install programs for managing openRGB supported hardware"; | ||||
|     hasViaKeyboard = lib.mkEnableOption "install programs for managing via supported keyboards"; | ||||
|  | @ -34,12 +34,12 @@ in | |||
|       } | ||||
| 
 | ||||
|       ( | ||||
|         if cfg.isNormalUser then { | ||||
|         if (cfg.isNormalUser || cfg.isThinUser) then { | ||||
|           isNormalUser = true; | ||||
|           extraGroups = lib.mkMerge [ | ||||
|             ["networkmanager" "wheel" "docker"] | ||||
|             ( | ||||
|               lib.mkIf (!cfg.isThinInstallation) [ "adbusers" ] | ||||
|               lib.mkIf (!cfg.isThinUser) [ "adbusers" ] | ||||
|             ) | ||||
|           ]; | ||||
| 
 | ||||
|  | @ -50,6 +50,6 @@ in | |||
|       ) | ||||
|     ]; | ||||
| 
 | ||||
|     home-manager.users.leyla = lib.mkIf cfg.isNormalUser (import ./home.nix); | ||||
|     home-manager.users.leyla = lib.mkIf (cfg.isNormalUser || cfg.isThinUser) (import ./home.nix); | ||||
|   }; | ||||
| } | ||||
|  | @ -22,7 +22,7 @@ in | |||
| 
 | ||||
|   programs.adb.enable = true; | ||||
| 
 | ||||
|   users.users.leyla.packages = lib.mkIf cfg.isNormalUser ( | ||||
|   users.users.leyla.packages = lib.mkIf (cfg.isNormalUser || cfg.isThinUser) ( | ||||
|     lib.mkMerge [ | ||||
|       ( | ||||
|         with pkgs; [ | ||||
|  | @ -33,7 +33,7 @@ in | |||
|         ] | ||||
|       ) | ||||
|       ( | ||||
|         lib.mkIf (!cfg.isThinInstallation) ( | ||||
|         lib.mkIf (!cfg.isThinUser) ( | ||||
|           with pkgs; [ | ||||
|             #foss platforms | ||||
|             signal-desktop | ||||
|  |  | |||
							
								
								
									
										8
									
								
								util/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								util/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,8 @@ | |||
| { lib, ... }: | ||||
| { | ||||
|   mkUnless = condition: then: (mkIf (!condition) then); | ||||
|   mkIfElse = condition: then: else: lib.mkMerge [ | ||||
|     (mkIf condition then) | ||||
|     (mkUnless condition else) | ||||
|   ]; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue