move stuff into nixosModules
This commit is contained in:
		
							parent
							
								
									ecc65f071d
								
							
						
					
					
						commit
						26625c6952
					
				
					 7 changed files with 96 additions and 94 deletions
				
			
		
							
								
								
									
										28
									
								
								flake.nix
									
										
									
									
									
								
							
							
						
						
									
										28
									
								
								flake.nix
									
										
									
									
									
								
							|  | @ -100,7 +100,13 @@ | |||
|         nixpkgs.lib.nixosSystem { | ||||
|           inherit system specialArgs; | ||||
|           modules = [ | ||||
|             { networking.hostName = device; } | ||||
|             { | ||||
|               networking.hostName = device; | ||||
|               system = { | ||||
|                 stateVersion = "22.11"; | ||||
|                 autoUpgrade.flake = "git+https://git.berlin.ccc.de/vinzenz/nixos-configuration.git"; | ||||
|               }; | ||||
|             } | ||||
| 
 | ||||
|             self.nixosModules.default | ||||
| 
 | ||||
|  | @ -117,7 +123,11 @@ | |||
|           ] | ||||
|           ++ (nixpkgs.lib.optionals (builtins.elem device homeDevices) [ | ||||
|             self.nixosModules.desktopDefault | ||||
|             { home-manager.extraSpecialArgs = specialArgs; } | ||||
|             { | ||||
|               home-manager.extraSpecialArgs = specialArgs; | ||||
| 
 | ||||
|               time.timeZone = "Europe/Berlin"; | ||||
|             } | ||||
|           ]); | ||||
|         } | ||||
|       ); | ||||
|  | @ -138,6 +148,9 @@ | |||
|       nixosModules = { | ||||
|         lix = (import ./nixosModules/lix.nix); | ||||
|         kdeconnect = (import ./nixosModules/kdeconnect.nix); | ||||
|         globalinstalls = (import ./nixosModules/globalinstalls.nix); | ||||
|         autoupdate = (import ./nixosModules/autoupdate.nix); | ||||
|         en-de =  (import ./nixosModules/en-de.nix); | ||||
|         niri = { | ||||
|           imports = [ niri.nixosModules.niri ]; | ||||
|           nixpkgs.overlays = [ niri.overlays.niri ]; | ||||
|  | @ -150,17 +163,20 @@ | |||
|             self.nixosModules.pkgs-unstable | ||||
|             self.nixosModules.niri | ||||
|             self.nixosModules.kdeconnect | ||||
|             self.nixosModules.en-de | ||||
| 
 | ||||
|             home-manager.nixosModules.home-manager | ||||
|             servicepoint-simulator.nixosModules.default | ||||
|             servicepoint-cli.nixosModules.default | ||||
| 
 | ||||
|             ./modules/home-manager.nix | ||||
|             ./modules/i18n.nix | ||||
|           ]; | ||||
|         }; | ||||
|         default = { | ||||
|           imports = [ | ||||
|             self.nixosModules.lix | ||||
|             ./modules/globalinstalls.nix | ||||
|           imports = with self.nixosModules; [ | ||||
|             lix | ||||
|             globalinstalls | ||||
|             autoupdate | ||||
|             ./modules/networking.nix | ||||
|             ./modules/nixpkgs.nix | ||||
|           ]; | ||||
|  |  | |||
|  | @ -1,34 +0,0 @@ | |||
| { pkgs, ... }: | ||||
| { | ||||
|   config = { | ||||
|     environment = { | ||||
|       systemPackages = with pkgs; [ | ||||
|         ncdu | ||||
|         glances | ||||
|         iotop | ||||
| 
 | ||||
|         pciutils | ||||
|         lsof | ||||
|         dig | ||||
| 
 | ||||
|         screen | ||||
| 
 | ||||
|         tldr | ||||
|         neofetch | ||||
| 
 | ||||
|         nix-output-monitor | ||||
|       ]; | ||||
|     }; | ||||
| 
 | ||||
|     programs = { | ||||
|       zsh.enable = true; | ||||
|       htop.enable = true; | ||||
|       iotop.enable = true; | ||||
|       git.enable = true; | ||||
|       nano = { | ||||
|         enable = true; | ||||
|         syntaxHighlight = true; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  | @ -1,19 +0,0 @@ | |||
| _: { | ||||
|   config = { | ||||
|     time.timeZone = "Europe/Berlin"; | ||||
|     i18n = { | ||||
|       defaultLocale = "en_US.UTF-8"; | ||||
|       extraLocaleSettings = { | ||||
|         LC_ADDRESS = "de_DE.UTF-8"; | ||||
|         LC_IDENTIFICATION = "de_DE.UTF-8"; | ||||
|         LC_MEASUREMENT = "de_DE.UTF-8"; | ||||
|         LC_MONETARY = "de_DE.UTF-8"; | ||||
|         LC_NAME = "de_DE.UTF-8"; | ||||
|         LC_NUMERIC = "de_DE.UTF-8"; | ||||
|         LC_PAPER = "de_DE.UTF-8"; | ||||
|         LC_TELEPHONE = "de_DE.UTF-8"; | ||||
|         LC_TIME = "de_DE.UTF-8"; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  | @ -11,41 +11,23 @@ | |||
|       allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.allowedUnfreePackages; | ||||
|     }; | ||||
| 
 | ||||
|     nix = { | ||||
|       settings = { | ||||
|         substituters = [ | ||||
|           "https://cache.nixos.org/" | ||||
|           "https://nix-community.cachix.org" | ||||
|           "https://cache.lix.systems" | ||||
|           "https://niri.cachix.org" | ||||
|         ]; | ||||
|         trusted-public-keys = [ | ||||
|           "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" | ||||
|           "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" | ||||
|           "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o=" | ||||
|           "niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964=" | ||||
|         ]; | ||||
|         experimental-features = [ | ||||
|           "nix-command" | ||||
|           "flakes" | ||||
|         ]; | ||||
|       }; | ||||
|       gc = { | ||||
|         automatic = true; | ||||
|         dates = "daily"; | ||||
|         options = "--delete-older-than 7d"; | ||||
|       }; | ||||
|       optimise.automatic = true; | ||||
|     }; | ||||
| 
 | ||||
|     system = { | ||||
|       stateVersion = "22.11"; | ||||
|       # enable auto updates | ||||
|       autoUpgrade = { | ||||
|         enable = true; | ||||
|         dates = "daily"; | ||||
|         flake = "git+https://git.berlin.ccc.de/vinzenz/nixos-configuration.git"; | ||||
|       }; | ||||
|     nix.settings = { | ||||
|       substituters = [ | ||||
|         "https://cache.nixos.org/" | ||||
|         "https://nix-community.cachix.org" | ||||
|         "https://cache.lix.systems" | ||||
|         "https://niri.cachix.org" | ||||
|       ]; | ||||
|       trusted-public-keys = [ | ||||
|         "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" | ||||
|         "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" | ||||
|         "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o=" | ||||
|         "niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964=" | ||||
|       ]; | ||||
|       experimental-features = [ | ||||
|         "nix-command" | ||||
|         "flakes" | ||||
|       ]; | ||||
|     }; | ||||
| 
 | ||||
|     documentation = { | ||||
|  |  | |||
							
								
								
									
										15
									
								
								nixosModules/autoupdate.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								nixosModules/autoupdate.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| { | ||||
|   nix = { | ||||
|     optimise.automatic = true; | ||||
|     gc = { | ||||
|       automatic = true; | ||||
|       dates = "daily"; | ||||
|       options = "--delete-older-than 7d"; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   system.autoUpgrade = { | ||||
|     enable = true; | ||||
|     dates = "daily"; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										19
									
								
								nixosModules/en-de.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								nixosModules/en-de.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,19 @@ | |||
| { | ||||
|   i18n = { | ||||
|     defaultLocale = "en_US.UTF-8"; | ||||
|     extraLocales = [ | ||||
|       "de_DE.UTF-8/UTF-8" | ||||
|     ]; | ||||
|     extraLocaleSettings = { | ||||
|       LC_ADDRESS = "de_DE.UTF-8"; | ||||
|       LC_IDENTIFICATION = "de_DE.UTF-8"; | ||||
|       LC_MEASUREMENT = "de_DE.UTF-8"; | ||||
|       LC_MONETARY = "de_DE.UTF-8"; | ||||
|       LC_NAME = "de_DE.UTF-8"; | ||||
|       LC_NUMERIC = "de_DE.UTF-8"; | ||||
|       LC_PAPER = "de_DE.UTF-8"; | ||||
|       LC_TELEPHONE = "de_DE.UTF-8"; | ||||
|       LC_TIME = "de_DE.UTF-8"; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										23
									
								
								nixosModules/globalinstalls.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								nixosModules/globalinstalls.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,23 @@ | |||
| { pkgs, ... }: | ||||
| { | ||||
|   environment.systemPackages = with pkgs; [ | ||||
|     ncdu | ||||
|     glances | ||||
|     lsof | ||||
|     dig | ||||
|     screen | ||||
|     tldr | ||||
|     nix-output-monitor | ||||
|   ]; | ||||
| 
 | ||||
|   programs = { | ||||
|     zsh.enable = true; | ||||
|     htop.enable = true; | ||||
|     iotop.enable = true; | ||||
|     git.enable = true; | ||||
|     nano = { | ||||
|       enable = true; | ||||
|       syntaxHighlight = true; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Vinzenz Schroeter
						Vinzenz Schroeter