mirror of
				https://github.com/Jokiller230/puzzlevision.git
				synced 2025-10-31 13:50:04 +00:00 
			
		
		
		
	feat(modules): add server archetype
feat: WIP add "absolutesolver" system and "cyn" user *wink wink* refactor: clean up some comments and remove empty lines
This commit is contained in:
		
							parent
							
								
									0c1476ce83
								
							
						
					
					
						commit
						57d067d501
					
				
					 10 changed files with 111 additions and 29 deletions
				
			
		
							
								
								
									
										20
									
								
								homes/x86_64-linux/cyn@absolutesolver/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								homes/x86_64-linux/cyn@absolutesolver/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,20 @@ | ||||||
|  | { | ||||||
|  |   lib, | ||||||
|  |   pkgs, | ||||||
|  |   inputs, | ||||||
|  |   namespace, | ||||||
|  |   ... | ||||||
|  | }: with lib; with lib.${namespace}; | ||||||
|  | { | ||||||
|  |   # Declare user packages. | ||||||
|  |   home.packages = with pkgs; [ | ||||||
|  |     ### Runtimes | ||||||
|  |     nodejs_22 | ||||||
|  |     bun | ||||||
|  | 
 | ||||||
|  |     ### Tools | ||||||
|  |     git | ||||||
|  |   ]; | ||||||
|  | 
 | ||||||
|  |   home.stateVersion = "24.05"; | ||||||
|  | } | ||||||
|  | @ -7,7 +7,7 @@ | ||||||
|   ... |   ... | ||||||
| }: with lib; with lib.${namespace}; | }: with lib; with lib.${namespace}; | ||||||
| let | let | ||||||
|   cfg = config.${namespace}.apps.zed-editor; |   cfg = config.${namespace}.apps.development.zed-editor; | ||||||
| 
 | 
 | ||||||
|   zed-fhs = pkgs.buildFHSUserEnv { |   zed-fhs = pkgs.buildFHSUserEnv { | ||||||
|     name = "zed"; |     name = "zed"; | ||||||
							
								
								
									
										5
									
								
								modules/home/services/vaultwarden/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								modules/home/services/vaultwarden/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,5 @@ | ||||||
|  | { | ||||||
|  |   ... | ||||||
|  | }: { | ||||||
|  |   # Todo: implement example service structure which should be re-usable for any future services. | ||||||
|  | } | ||||||
|  | @ -1,16 +1,4 @@ | ||||||
| { | { | ||||||
|   lib, |  | ||||||
|   pkgs, |  | ||||||
|   inputs, |  | ||||||
| 
 |  | ||||||
|   namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal". |  | ||||||
|   system, |  | ||||||
|   target, # The Snowfall Lib target for this home (eg. `x86_64-home`). |  | ||||||
|   format, # A normalized name for the home target (eg. `home`). |  | ||||||
|   virtual, # A boolean to determine whether this home is a virtual target using nixos-generators. |  | ||||||
|   host, # The host name for this home. |  | ||||||
| 
 |  | ||||||
|   config, |  | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   catppuccin = { |   catppuccin = { | ||||||
|  |  | ||||||
|  | @ -1,16 +1,4 @@ | ||||||
| { | { | ||||||
|   lib, |  | ||||||
|   pkgs, |  | ||||||
|   inputs, |  | ||||||
| 
 |  | ||||||
|   namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal". |  | ||||||
|   system, |  | ||||||
|   target, # The Snowfall Lib target for this home (eg. `x86_64-home`). |  | ||||||
|   format, # A normalized name for the home target (eg. `home`). |  | ||||||
|   virtual, # A boolean to determine whether this home is a virtual target using nixos-generators. |  | ||||||
|   host, # The host name for this home. |  | ||||||
| 
 |  | ||||||
|   config, |  | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   gtk = { |   gtk = { | ||||||
|  |  | ||||||
							
								
								
									
										33
									
								
								modules/nixos/archetypes/server/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								modules/nixos/archetypes/server/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,33 @@ | ||||||
|  | { | ||||||
|  |   lib, | ||||||
|  |   pkgs, | ||||||
|  |   namespace, | ||||||
|  |   config, | ||||||
|  |   ... | ||||||
|  | }: with lib; with lib.${namespace}; | ||||||
|  | let | ||||||
|  |   cfg = config.${namespace}.archetypes.server; | ||||||
|  | in { | ||||||
|  |   options.${namespace}.archetypes.server = { enable = mkEnableOption "Enable the server archetype for your current system"; }; | ||||||
|  | 
 | ||||||
|  |   config = mkIf cfg.enable { | ||||||
|  |     # Enable modules | ||||||
|  |     puzzlevision = { | ||||||
|  |       common = { | ||||||
|  |         nix = { | ||||||
|  |           enable = true; | ||||||
|  |           use-lix = true; | ||||||
|  |         }; | ||||||
|  |         grub.enable = true; | ||||||
|  |         networking.enable = true; | ||||||
|  |         kernel.enable = true; | ||||||
|  |         shell.enable = true; | ||||||
|  |         hardware.enable = true; | ||||||
|  |         locale.enable = true; | ||||||
|  |       }; | ||||||
|  |     }; | ||||||
|  |   }; | ||||||
|  | 
 | ||||||
|  |   # Enable SSH for remote login | ||||||
|  |   services.openssh.enable = true; | ||||||
|  | } | ||||||
|  | @ -12,7 +12,6 @@ in { | ||||||
| 
 | 
 | ||||||
|   config = mkIf cfg.enable { |   config = mkIf cfg.enable { | ||||||
|     hardware.sensor.iio.enable = true; # Enable iio-sensor for automatic screen rotation and similar features. |     hardware.sensor.iio.enable = true; # Enable iio-sensor for automatic screen rotation and similar features. | ||||||
| 
 |  | ||||||
|     hardware.flipperzero.enable = true; # Enable support for the flipperzero device. |     hardware.flipperzero.enable = true; # Enable support for the flipperzero device. | ||||||
|   }; |   }; | ||||||
| } | } | ||||||
|  |  | ||||||
							
								
								
									
										50
									
								
								systems/x86_64-linux/absolutesolver/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								systems/x86_64-linux/absolutesolver/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,50 @@ | ||||||
|  | { | ||||||
|  |   lib, | ||||||
|  |   pkgs, | ||||||
|  |   inputs, | ||||||
|  |   namespace, | ||||||
|  |   config, | ||||||
|  |   ... | ||||||
|  | }: | ||||||
|  | with lib; | ||||||
|  | with lib.${namespace}; | ||||||
|  | { | ||||||
|  |   imports = [ | ||||||
|  |     ./hardware-configuration.nix | ||||||
|  |     inputs.hardware.nixosModules.common-pc-laptop | ||||||
|  |     inputs.hardware.nixosModules.common-cpu-intel | ||||||
|  |     inputs.hardware.nixosModules.common-pc-laptop-ssd | ||||||
|  |   ]; | ||||||
|  | 
 | ||||||
|  |   # Set hostname | ||||||
|  |   # Todo: move to common/networking module | ||||||
|  |   networking.hostName = "absolutesolver"; | ||||||
|  | 
 | ||||||
|  |   # Set timezone. | ||||||
|  |   time.timeZone = "Europe/Berlin"; | ||||||
|  | 
 | ||||||
|  |   # Enable docker | ||||||
|  |   virtualisation.docker.enable = true; | ||||||
|  | 
 | ||||||
|  |   # Set system Type | ||||||
|  |   puzzlevision.archetypes.server.enable = true; | ||||||
|  | 
 | ||||||
|  |   # Configure users. | ||||||
|  |   snowfallorg.users.jo.admin = true; | ||||||
|  |   users.users.jo.isNormalUser = true; | ||||||
|  |   users.users.jo.extraGroups = [ "dialout" "docker" ]; | ||||||
|  | 
 | ||||||
|  |   # Configure home-manager | ||||||
|  |   home-manager = { | ||||||
|  |     backupFileExtension = "homeManagerBackup"; | ||||||
|  |   }; | ||||||
|  | 
 | ||||||
|  |   # Provide users with some sane default packages. | ||||||
|  |   environment.systemPackages = with pkgs; [ | ||||||
|  |     ### General | ||||||
|  |     nano | ||||||
|  |     vim | ||||||
|  |   ]; | ||||||
|  | 
 | ||||||
|  |   system.stateVersion = "24.05"; | ||||||
|  | } | ||||||
|  | @ -51,13 +51,12 @@ with lib.${namespace}; | ||||||
| 
 | 
 | ||||||
|   # Configure users. |   # Configure users. | ||||||
|   snowfallorg.users.jo.admin = true; |   snowfallorg.users.jo.admin = true; | ||||||
| 
 |  | ||||||
|   users.users.jo.isNormalUser = true; |   users.users.jo.isNormalUser = true; | ||||||
|   users.users.jo.extraGroups = [ "dialout" "docker" ]; |   users.users.jo.extraGroups = [ "dialout" "docker" ]; | ||||||
| 
 | 
 | ||||||
|   # Configure home-manager |   # Configure home-manager | ||||||
|   home-manager = { |   home-manager = { | ||||||
|     backupFileExtension = "homeManagerBackupFile"; |     backupFileExtension = "homeManagerBackup"; | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|   # Provide users with some sane default packages. |   # Provide users with some sane default packages. | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue