forked from jan-leila/nix-config
		
	made user files
This commit is contained in:
		
							parent
							
								
									8ef437334f
								
							
						
					
					
						commit
						b60bacf752
					
				
					 7 changed files with 137 additions and 119 deletions
				
			
		
							
								
								
									
										1
									
								
								README.md
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								README.md
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1 @@ | ||||||
|  | sudo nixos-rebuild switch --flake .#horizon | ||||||
|  | @ -18,7 +18,6 @@ | ||||||
|       pkgs = nixpkgs.legacyPackages.${system}; |       pkgs = nixpkgs.legacyPackages.${system}; | ||||||
|     in |     in | ||||||
|     { |     { | ||||||
|      |  | ||||||
|       nixosConfigurations = { |       nixosConfigurations = { | ||||||
|         horizon = nixpkgs.lib.nixosSystem { |         horizon = nixpkgs.lib.nixosSystem { | ||||||
|           specialArgs = {inherit inputs;}; |           specialArgs = {inherit inputs;}; | ||||||
|  |  | ||||||
|  | @ -3,10 +3,13 @@ | ||||||
| 
 | 
 | ||||||
| { | { | ||||||
|   imports = |   imports = | ||||||
|     [ # Include the results of the hardware scan. |     [ | ||||||
|       ./hardware-configuration.nix |  | ||||||
|       inputs.home-manager.nixosModules.default |       inputs.home-manager.nixosModules.default | ||||||
|       inputs.sops-nix.nixosModules.sops |       inputs.sops-nix.nixosModules.sops | ||||||
|  | 
 | ||||||
|  |       ./hardware-configuration.nix | ||||||
|  |        | ||||||
|  |       ../../users | ||||||
|     ]; |     ]; | ||||||
| 
 | 
 | ||||||
|   sops.defaultSopsFile = ../../secrets/secrets.yaml; |   sops.defaultSopsFile = ../../secrets/secrets.yaml; | ||||||
|  | @ -22,13 +25,9 @@ | ||||||
| 
 | 
 | ||||||
|   nix.settings.experimental-features = [ "nix-command" "flakes" ]; |   nix.settings.experimental-features = [ "nix-command" "flakes" ]; | ||||||
| 
 | 
 | ||||||
|   networking.hostName = "leyla-laptop"; # Define your hostname. |   networking.hostName = "horizon"; # Define your hostname. | ||||||
|   # networking.wireless.enable = true;  # Enables wireless support via wpa_supplicant. |   # networking.wireless.enable = true;  # Enables wireless support via wpa_supplicant. | ||||||
| 
 | 
 | ||||||
|   # Configure network proxy if necessary |  | ||||||
|   # networking.proxy.default = "http://user:password@proxy:port/"; |  | ||||||
|   # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; |  | ||||||
| 
 |  | ||||||
|   # Enable networking |   # Enable networking | ||||||
|   networking.networkmanager.enable = true; |   networking.networkmanager.enable = true; | ||||||
| 
 | 
 | ||||||
|  | @ -88,14 +87,11 @@ | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|   # enabled virtualisation for docker |   # enabled virtualisation for docker | ||||||
|   virtualisation.docker.enable = true; |   # virtualisation.docker.enable = true; | ||||||
| 
 | 
 | ||||||
|   # Enable touchpad support (enabled default in most desktopManager). |   # Enable touchpad support (enabled default in most desktopManager). | ||||||
|   # services.xserver.libinput.enable = true; |   # services.xserver.libinput.enable = true; | ||||||
| 
 | 
 | ||||||
|   # Disables creating or editing users though methods not defined in this file |  | ||||||
|   users.mutableUsers = false; |  | ||||||
| 
 |  | ||||||
|   nixpkgs.config.permittedInsecurePackages = [ |   nixpkgs.config.permittedInsecurePackages = [ | ||||||
|     "electron-25.9.0" |     "electron-25.9.0" | ||||||
|   ]; |   ]; | ||||||
|  | @ -125,107 +121,6 @@ | ||||||
|     }) |     }) | ||||||
|   ]; |   ]; | ||||||
| 
 | 
 | ||||||
|   sops.secrets."passwords/leyla".neededForUsers = true; |  | ||||||
|   sops.secrets."passwords/ester".neededForUsers = true; |  | ||||||
|   sops.secrets."passwords/eve".neededForUsers = true; |  | ||||||
| 
 |  | ||||||
|   # Define user accounts |  | ||||||
|   users.users = { |  | ||||||
|     leyla = { |  | ||||||
|       isNormalUser = true; |  | ||||||
|       uid = 1000; |  | ||||||
|       description = "Leyla"; |  | ||||||
|       extraGroups = [ "networkmanager" "wheel" "docker" ]; |  | ||||||
| 
 |  | ||||||
|       hashedPasswordFile = config.sops.secrets."passwords/leyla".path; |  | ||||||
|        |  | ||||||
|       packages = with pkgs; [ |  | ||||||
|         iputils |  | ||||||
|         dnsutils |  | ||||||
|         git |  | ||||||
|         firefox |  | ||||||
|         signal-desktop |  | ||||||
|         obsidian |  | ||||||
|         bitwarden |  | ||||||
| #        vscode |  | ||||||
|         vscodium |  | ||||||
|         nextcloud-client |  | ||||||
|         inkscape |  | ||||||
|         steam |  | ||||||
|         discord |  | ||||||
|         rhythmbox |  | ||||||
|         makemkv |  | ||||||
|         protonvpn-gui |  | ||||||
|         transmission-gtk |  | ||||||
|         freecad |  | ||||||
|         mupen64plus |  | ||||||
|         dbeaver |  | ||||||
|         easytag |  | ||||||
|         cura |  | ||||||
|         kicad-small |  | ||||||
| #        jdk |  | ||||||
| #        android-tools |  | ||||||
| #        android-studio |  | ||||||
|         androidStudioPackages.canary |  | ||||||
|         jetbrains.idea-community |  | ||||||
|         ungoogled-chromium |  | ||||||
| 	      nodejs |  | ||||||
|         exiftool |  | ||||||
|         libreoffice |  | ||||||
|         # N64 Emulator |  | ||||||
|         mupen64plus |  | ||||||
|         # GameCube Emulator and Wii Emulator |  | ||||||
|         dolphin-emu |  | ||||||
|         # Switch Emulator |  | ||||||
|         yuzu-mainline |  | ||||||
|         # Atari 2600 Emulator |  | ||||||
|         stella |  | ||||||
|         # mame Emulator |  | ||||||
|         mame |  | ||||||
|         # Game Boy Advanced Emulator |  | ||||||
|         vbam |  | ||||||
|         # NES Emulator |  | ||||||
|         fceux |  | ||||||
|         # SNES Emulator |  | ||||||
|         zsnes |  | ||||||
|         # DS Emulator |  | ||||||
|         desmume |  | ||||||
|       ]; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     eve = { |  | ||||||
|       isNormalUser = true; |  | ||||||
|       uid = 1001; |  | ||||||
|       description = "Eve"; |  | ||||||
|       extraGroups = [ "networkmanager" ]; |  | ||||||
| 
 |  | ||||||
|       hashedPasswordFile = config.sops.secrets."passwords/eve".path; |  | ||||||
| 
 |  | ||||||
|       packages = with pkgs; [ |  | ||||||
|         firefox |  | ||||||
|         bitwarden |  | ||||||
|         discord |  | ||||||
|         makemkv |  | ||||||
|         signal-desktop |  | ||||||
|       ]; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     ester = { |  | ||||||
|       isNormalUser = true; |  | ||||||
|       uid = 1002; |  | ||||||
|       description = "Ester"; |  | ||||||
|       extraGroups = [ "networkmanager" ]; |  | ||||||
| 
 |  | ||||||
|       hashedPasswordFile = config.sops.secrets."passwords/ester".path; |  | ||||||
| 
 |  | ||||||
|       packages = with pkgs; [ |  | ||||||
|         firefox |  | ||||||
|         bitwarden |  | ||||||
|         discord |  | ||||||
|       ]; |  | ||||||
|     }; |  | ||||||
|   }; |  | ||||||
| 
 |  | ||||||
|   # Allow unfree packages |   # Allow unfree packages | ||||||
|   nixpkgs.config.allowUnfree = true; |   nixpkgs.config.allowUnfree = true; | ||||||
| 
 | 
 | ||||||
|  | @ -233,13 +128,13 @@ | ||||||
|   # $ nix search wget |   # $ nix search wget | ||||||
|   environment.systemPackages = with pkgs; [ |   environment.systemPackages = with pkgs; [ | ||||||
|   #  vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. |   #  vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. | ||||||
|     wget |     # wget | ||||||
|     # resilio-sync |     # resilio-sync | ||||||
|     yt-dlp |     # yt-dlp | ||||||
|     spotdl |     # spotdl | ||||||
|     ffmpeg |     # ffmpeg | ||||||
|     chromaprint |     # chromaprint | ||||||
|     docker |     # docker | ||||||
|     aileron |     aileron | ||||||
| #    sox | #    sox | ||||||
| #    songrec | #    songrec | ||||||
|  |  | ||||||
							
								
								
									
										6
									
								
								users/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								users/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,6 @@ | ||||||
|  | {...}: | ||||||
|  | { | ||||||
|  |   imports = [ ./leyla ./ester ./eve ]; | ||||||
|  | 
 | ||||||
|  |   users.mutableUsers = false; | ||||||
|  | } | ||||||
							
								
								
									
										23
									
								
								users/ester/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								users/ester/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,23 @@ | ||||||
|  | { lib, config, pkgs, ... }: | ||||||
|  | { | ||||||
|  |   sops.secrets."passwords/ester" = { | ||||||
|  |     neededForUsers = true; | ||||||
|  |     # sopsFile = ../secrets.yaml; | ||||||
|  |   }; | ||||||
|  | 
 | ||||||
|  |   # Define user accounts | ||||||
|  |   users.users.ester = { | ||||||
|  |     isNormalUser = true; | ||||||
|  |     uid = 1001; | ||||||
|  |     description = "Ester"; | ||||||
|  |     extraGroups = [ "networkmanager" ]; | ||||||
|  | 
 | ||||||
|  |     hashedPasswordFile = config.sops.secrets."passwords/ester".path; | ||||||
|  | 
 | ||||||
|  |     packages = with pkgs; [ | ||||||
|  |       firefox | ||||||
|  |       bitwarden | ||||||
|  |       discord | ||||||
|  |     ]; | ||||||
|  |   }; | ||||||
|  | } | ||||||
							
								
								
									
										25
									
								
								users/eve/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								users/eve/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,25 @@ | ||||||
|  | { lib, config, pkgs, ... }: | ||||||
|  | { | ||||||
|  |   sops.secrets."passwords/eve" = { | ||||||
|  |     neededForUsers = true; | ||||||
|  |     # sopsFile = ../secrets.yaml; | ||||||
|  |   }; | ||||||
|  | 
 | ||||||
|  |   # Define user accounts | ||||||
|  |   users.users.eve = { | ||||||
|  |     isNormalUser = true; | ||||||
|  |     uid = 1002; | ||||||
|  |     description = "Eve"; | ||||||
|  |     extraGroups = [ "networkmanager" ]; | ||||||
|  | 
 | ||||||
|  |     hashedPasswordFile = config.sops.secrets."passwords/eve".path; | ||||||
|  | 
 | ||||||
|  |     packages = with pkgs; [ | ||||||
|  |       firefox | ||||||
|  |       bitwarden | ||||||
|  |       discord | ||||||
|  |       makemkv | ||||||
|  |       signal-desktop | ||||||
|  |     ]; | ||||||
|  |   }; | ||||||
|  | } | ||||||
							
								
								
									
										69
									
								
								users/leyla/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										69
									
								
								users/leyla/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,69 @@ | ||||||
|  | { lib, config, pkgs, ... }: | ||||||
|  | { | ||||||
|  |   sops.secrets."passwords/leyla" = { | ||||||
|  |     neededForUsers = true; | ||||||
|  |     # sopsFile = ../secrets.yaml; | ||||||
|  |   }; | ||||||
|  | 
 | ||||||
|  |   # Define user accounts | ||||||
|  |   users.users.leyla = { | ||||||
|  |     isNormalUser = true; | ||||||
|  |     uid = 1000; | ||||||
|  |     description = "Leyla"; | ||||||
|  |     extraGroups = [ "networkmanager" "wheel" ]; | ||||||
|  | 
 | ||||||
|  |     hashedPasswordFile = config.sops.secrets."passwords/leyla".path; | ||||||
|  |      | ||||||
|  |     packages = with pkgs; [ | ||||||
|  |       iputils | ||||||
|  |       dnsutils | ||||||
|  |       git | ||||||
|  |       firefox | ||||||
|  |       signal-desktop | ||||||
|  |       obsidian | ||||||
|  |       bitwarden | ||||||
|  |       vscodium | ||||||
|  |       nextcloud-client | ||||||
|  |       inkscape | ||||||
|  |       steam | ||||||
|  |       discord | ||||||
|  |       rhythmbox | ||||||
|  |       makemkv | ||||||
|  |       protonvpn-gui | ||||||
|  |       transmission-gtk | ||||||
|  |       freecad | ||||||
|  |       mupen64plus | ||||||
|  |       dbeaver | ||||||
|  |       easytag | ||||||
|  |       cura | ||||||
|  |       kicad-small | ||||||
|  | #        jdk | ||||||
|  | #        android-tools | ||||||
|  | #        android-studio | ||||||
|  |       androidStudioPackages.canary | ||||||
|  |       jetbrains.idea-community | ||||||
|  |       ungoogled-chromium | ||||||
|  |       nodejs | ||||||
|  |       exiftool | ||||||
|  |       libreoffice | ||||||
|  |       # N64 Emulator | ||||||
|  |       mupen64plus | ||||||
|  |       # GameCube Emulator and Wii Emulator | ||||||
|  |       dolphin-emu | ||||||
|  |       # Switch Emulator | ||||||
|  |       yuzu-mainline | ||||||
|  |       # Atari 2600 Emulator | ||||||
|  |       stella | ||||||
|  |       # mame Emulator | ||||||
|  |       mame | ||||||
|  |       # Game Boy Advanced Emulator | ||||||
|  |       vbam | ||||||
|  |       # NES Emulator | ||||||
|  |       fceux | ||||||
|  |       # SNES Emulator | ||||||
|  |       zsnes | ||||||
|  |       # DS Emulator | ||||||
|  |       desmume | ||||||
|  |     ]; | ||||||
|  |   }; | ||||||
|  | } | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue