passing all tests for all systems
This commit is contained in:
		
							parent
							
								
									07b611690e
								
							
						
					
					
						commit
						4f2bb9479e
					
				
							
								
								
									
										155
									
								
								flake.nix
									
									
									
									
									
								
							
							
						
						
									
										155
									
								
								flake.nix
									
									
									
									
									
								
							|  | @ -16,11 +16,16 @@ | |||
|     agenix.inputs.nixpkgs.follows = "nixpkgs"; | ||||
|     deploy-rs.url = "github:serokell/deploy-rs"; | ||||
|     deploy-rs.inputs.nixpkgs.follows = "nixpkgs"; | ||||
| 
 | ||||
|     # Packages | ||||
|     poonam.url = "git+ssh://gitea@git.sealight.xyz/aynish/kitaab?ref=main"; | ||||
|     basant.url = "git+ssh://gitea@git.sealight.xyz/aynish/basant?ref=main"; | ||||
|     basant.inputs.nixpkgs.follows = "nixpkgs"; | ||||
|     basant.inputs.poonam.follows = "poonam"; | ||||
|     grasp.url = "git+ssh://gitea@git.sealight.xyz/aynish/grasp.git?ref=main"; | ||||
|     grasp.inputs.nixpkgs.follows = "nixpkgs"; | ||||
|     # Others | ||||
|     nur.url = "github:nix-community/NUR"; | ||||
|     rust-overlay = { | ||||
|       url = "github:oxalica/rust-overlay"; | ||||
|       inputs.nixpkgs.follows = "nixpkgs"; | ||||
|  | @ -30,13 +35,10 @@ | |||
|       inputs.nixpkgs.follows = "nixpkgs"; | ||||
|       inputs.rust-overlay.follows = "rust-overlay"; | ||||
|     }; | ||||
|     nur.url = "github:nix-community/NUR"; | ||||
|     grasp.url = "git+ssh://gitea@git.sealight.xyz/aynish/grasp.git?ref=main"; | ||||
|     grasp.inputs.nixpkgs.follows = "nixpkgs"; | ||||
|     tidalcycles.url = "github:mitchmindtree/tidalcycles.nix"; | ||||
|     tidalcycles.inputs.nixpkgs.follows = "unstable"; | ||||
|     # TODO hundred rabbits software | ||||
|     # TODO not quite useful yet, since it needs secrets | ||||
|     # TODO needs secrets | ||||
|     # dhyan.url = "git+ssh://gitea@git.sealight.xyz/aynish/dhyan?ref=main"; | ||||
|     # dhyan.inputs.nixpkgs.follows = "nixpkgs"; | ||||
|     # TODO needs secrets | ||||
|  | @ -131,54 +133,78 @@ | |||
|             } | ||||
|           ]; | ||||
|         }; | ||||
|         # helix = pkgs.lib.nixosSystem { | ||||
|         #   specialArgs = { inherit inputs outputs; }; | ||||
|         #   modules = [ | ||||
|         #     ./hosts/helix | ||||
|         #     home-manager.nixosModules.home-manager | ||||
|         #     { | ||||
|         #       home-manager.useGlobalPkgs = true; | ||||
|         #       home-manager.useUserPackages = true; | ||||
|         #       home-manager.users.anish = import ./home/core; | ||||
|         #     } | ||||
|         #   ]; | ||||
|         # }; | ||||
|         # lituus = pkgs.lib.nixosSystem { | ||||
|         #   specialArgs = { inherit inputs outputs; }; | ||||
|         #   modules = [ | ||||
|         #     ./hosts/lituus | ||||
|         #     home-manager.nixosModules.home-manager | ||||
|         #     { | ||||
|         #       home-manager.useGlobalPkgs = true; | ||||
|         #       home-manager.useUserPackages = true; | ||||
|         #       home-manager.users.anish = import ./home/core; | ||||
|         #     } | ||||
|         #   ]; | ||||
|         # }; | ||||
|         # cube = pkgs.lib.nixosSystem { | ||||
|         #   specialArgs = { inherit inputs outputs; }; | ||||
|         #   modules = [ | ||||
|         #     ./hosts/cube | ||||
|         #     home-manager.nixosModules.home-manager | ||||
|         #     { | ||||
|         #       home-manager.useGlobalPkgs = true; | ||||
|         #       home-manager.useUserPackages = true; | ||||
|         #       home-manager.users.anish = import ./home/core; | ||||
|         #     } | ||||
|         #   ]; | ||||
|         # }; | ||||
|         # box = pkgs.lib.nixosSystem { | ||||
|         #   specialArgs = { inherit inputs outputs; }; | ||||
|         #   modules = [ | ||||
|         #     ./hosts/box | ||||
|         #     home-manager.nixosModules.home-manager | ||||
|         #     { | ||||
|         #       home-manager.useGlobalPkgs = true; | ||||
|         #       home-manager.useUserPackages = true; | ||||
|         #       home-manager.users.anish = import ./home/core; | ||||
|         #     } | ||||
|         #   ]; | ||||
|         # }; | ||||
|         helix = nixpkgs.lib.nixosSystem rec { | ||||
|           specialArgs = { inherit inputs self; }; | ||||
|           system = "x86_64-linux"; | ||||
|           pkgs = nixpkgsFor.${system}; | ||||
|           modules = [ | ||||
|             ./hosts/helix | ||||
|             agenix.nixosModules.age | ||||
|             self.nixosModules.backup | ||||
|             self.nixosModules.hesienbridge | ||||
|             home-manager.nixosModules.home-manager | ||||
|             { | ||||
|               home-manager.useGlobalPkgs = true; | ||||
|               home-manager.useUserPackages = true; | ||||
|               home-manager.users.anish = import ./home/core; | ||||
|             } | ||||
|           ]; | ||||
|         }; | ||||
|         lituus = nixpkgs.lib.nixosSystem rec { | ||||
|           specialArgs = { inherit inputs self; }; | ||||
|           system = "x86_64-linux"; | ||||
|           pkgs = nixpkgsFor.${system}; | ||||
|           modules = [ | ||||
|             ./hosts/lituus | ||||
|             agenix.nixosModules.age | ||||
|             self.nixosModules.backup | ||||
|             self.nixosModules.wireguard | ||||
|             home-manager.nixosModules.home-manager | ||||
|             { | ||||
|               home-manager.useGlobalPkgs = true; | ||||
|               home-manager.useUserPackages = true; | ||||
|               home-manager.users.anish = import ./home/core; | ||||
|             } | ||||
|           ]; | ||||
|         }; | ||||
|         cube = nixpkgs.lib.nixosSystem rec { | ||||
|           specialArgs = { inherit inputs self; }; | ||||
|           system = "x86_64-linux"; | ||||
|           pkgs = nixpkgsFor.${system}; | ||||
|           modules = [ | ||||
|             ./hosts/cube | ||||
|             agenix.nixosModules.age | ||||
|             self.nixosModules.backup | ||||
|             self.nixosModules.wireguard | ||||
|             basant.nixosModule | ||||
|             home-manager.nixosModules.home-manager | ||||
|             { | ||||
|               home-manager.useGlobalPkgs = true; | ||||
|               home-manager.useUserPackages = true; | ||||
|               home-manager.users.anish = import ./home/core; | ||||
|             } | ||||
|           ]; | ||||
|         }; | ||||
|         box = nixpkgs.lib.nixosSystem rec { | ||||
|           specialArgs = { inherit inputs self; }; | ||||
|           system = "x86_64-linux"; | ||||
|           pkgs = nixpkgsFor.${system}; | ||||
|           modules = [ | ||||
|             ./hosts/box | ||||
|             agenix.nixosModules.age | ||||
|             self.nixosModules.backup | ||||
|             self.nixosModules.wireguard | ||||
|             self.nixosModules.wallabag | ||||
|             self.nixosModules.gonic | ||||
|             grasp.nixosModule | ||||
|             home-manager.nixosModules.home-manager | ||||
|             { | ||||
|               home-manager.useGlobalPkgs = true; | ||||
|               home-manager.useUserPackages = true; | ||||
|               home-manager.users.anish = import ./home/core; | ||||
|             } | ||||
|           ]; | ||||
|         }; | ||||
|       }; | ||||
| 
 | ||||
|       # Standalone home-manager configuration entrypoint | ||||
|  | @ -189,17 +215,38 @@ | |||
|           extraSpecialArgs = { inherit inputs; }; | ||||
|           modules = [ | ||||
|             ./home/core.nix | ||||
|             ./home/profiles/firefox | ||||
|           ]; | ||||
|         }; | ||||
|       }; | ||||
| 
 | ||||
|       deploy.nodes = { | ||||
|         curve.profiles.system = { | ||||
|           user = "root"; | ||||
|           user = "anish"; | ||||
|           path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.curve; | ||||
|         }; | ||||
|         box.profiles.system = { | ||||
|           user = "anish"; | ||||
|           hostname = "mossnet.lan"; | ||||
|           path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.box; | ||||
|         }; | ||||
|         helix.profiles.system = { | ||||
|           user = "anish"; | ||||
|           hostname = "sealight.xyz"; | ||||
|           path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.helix; | ||||
|         }; | ||||
|         lituus.profiles.system = { | ||||
|           user = "anish"; | ||||
|           hostname = "git.sealight.xyz"; | ||||
|           path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.lituus; | ||||
|         }; | ||||
|         cube.profiles.system = { | ||||
|           user = "anish"; | ||||
|           hostname = "anish.lakhwara.com"; | ||||
|           path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.cube; | ||||
|         }; | ||||
|       }; | ||||
| 
 | ||||
|       # checks = builtins.mapAttrs (system: deploy-rsLib: deployLib.deployChecks self.deploy) deploy.lib; | ||||
|       checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib; | ||||
|     }; | ||||
| } | ||||
|  |  | |||
|  | @ -7,4 +7,5 @@ | |||
|     ../profiles/git | ||||
|     ../profiles/task | ||||
|   ]; | ||||
|   home.stateVersion = "22.05"; | ||||
| } | ||||
|  |  | |||
|  | @ -2,7 +2,6 @@ | |||
| { | ||||
|   imports = [ | ||||
|     ./configuration.nix | ||||
|     ../users/anish | ||||
|     ../profiles/core | ||||
|     ../profiles/server | ||||
|     ../profiles/taskd | ||||
|  |  | |||
|  | @ -49,4 +49,5 @@ | |||
| 
 | ||||
|   powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; | ||||
|   hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; | ||||
|   nixpkgs.hostPlatform = "x86_64-linux"; | ||||
| } | ||||
|  |  | |||
|  | @ -5,7 +5,8 @@ | |||
| 
 | ||||
| { | ||||
|   imports = | ||||
|     [ (modulesPath + "/profiles/qemu-guest.nix") | ||||
|     [ | ||||
|       (modulesPath + "/profiles/qemu-guest.nix") | ||||
|     ]; | ||||
| 
 | ||||
|   boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ]; | ||||
|  | @ -14,16 +15,19 @@ | |||
|   boot.extraModulePackages = [ ]; | ||||
| 
 | ||||
|   fileSystems."/" = | ||||
|     { device = "/dev/disk/by-uuid/9233d8be-539f-43c8-9b83-84b5b4d72a93"; | ||||
|     { | ||||
|       device = "/dev/disk/by-uuid/9233d8be-539f-43c8-9b83-84b5b4d72a93"; | ||||
|       fsType = "ext4"; | ||||
|     }; | ||||
| 
 | ||||
|   fileSystems."/boot" = | ||||
|     { device = "/dev/disk/by-uuid/E00D-9070"; | ||||
|     { | ||||
|       device = "/dev/disk/by-uuid/E00D-9070"; | ||||
|       fsType = "vfat"; | ||||
|     }; | ||||
| 
 | ||||
|   swapDevices = [ ]; | ||||
| 
 | ||||
|   hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; | ||||
|   nixpkgs.hostPlatform = "x86_64-linux"; | ||||
| } | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| { self, inputs, pkgs, ... }: | ||||
| { self, pkgs, ... }: | ||||
| { | ||||
|   imports = [ | ||||
|     ./configuration.nix | ||||
|  |  | |||
|  | @ -47,4 +47,5 @@ | |||
| 
 | ||||
|   powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; | ||||
|   hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; | ||||
|   nixpkgs.hostPlatform = "x86_64-linux"; | ||||
| } | ||||
|  |  | |||
|  | @ -10,18 +10,6 @@ | |||
|     ../profiles/wireguard-server | ||||
|   ]; | ||||
| 
 | ||||
|   # Capsul specific | ||||
|   users.users.cyberian = { | ||||
|     isNormalUser = true; | ||||
|     extraGroups = [ "wheel" ]; | ||||
|   }; | ||||
| 
 | ||||
|   mossnet.wg = { | ||||
|     enable = true; | ||||
|     ips = [ "10.0.69.5/24" ]; | ||||
|     privateKeyFile = "/home/anish/wg/wg-priv"; | ||||
|   }; | ||||
| 
 | ||||
|   # mossnet.backup = { | ||||
|   #   enable = false; | ||||
|   #   name = "sealight"; | ||||
|  | @ -34,4 +22,5 @@ | |||
|   #   databases = [ "matrix-synapse" "gitea" ]; | ||||
|   #   location = "/var/backup/postgresql"; | ||||
|   # }; | ||||
| 
 | ||||
| } | ||||
|  |  | |||
|  | @ -23,4 +23,5 @@ | |||
|   swapDevices = [ ]; | ||||
| 
 | ||||
|   hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; | ||||
|   nixpkgs.hostPlatform = "x86_64-linux"; | ||||
| } | ||||
|  |  | |||
|  | @ -2,7 +2,6 @@ | |||
| { | ||||
|   imports = [ | ||||
|     ./configuration.nix | ||||
|     ../users/anish | ||||
|     ../profiles/core | ||||
|     ../profiles/server | ||||
|     ../profiles/metrics | ||||
|  | @ -12,4 +11,16 @@ | |||
|     ../profiles/freshrss | ||||
|   ]; | ||||
| 
 | ||||
|   # Capsul specific | ||||
|   users.users.cyberian = { | ||||
|     isNormalUser = true; | ||||
|     extraGroups = [ "wheel" ]; | ||||
|   }; | ||||
| 
 | ||||
|   mossnet.wg = { | ||||
|     enable = true; | ||||
|     ips = [ "10.0.69.5/24" ]; | ||||
|     privateKeyFile = "/home/anish/wg/wg-priv"; | ||||
|   }; | ||||
| 
 | ||||
| } | ||||
|  |  | |||
|  | @ -23,4 +23,5 @@ | |||
|   swapDevices = [ ]; | ||||
| 
 | ||||
|   nix.maxJobs = lib.mkDefault 1; | ||||
|   nixpkgs.hostPlatform = "x86_64-linux"; | ||||
| } | ||||
|  |  | |||
|  | @ -2,7 +2,7 @@ | |||
| let inherit (lib) fileContents; | ||||
| in | ||||
| { | ||||
|   imports = [ ../cachix ]; | ||||
|   imports = [ ../../users/anish ]; | ||||
| 
 | ||||
| 
 | ||||
|   fonts = { | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| { config, lib, pkgs, ... }: | ||||
| { self, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| { | ||||
|   age.secrets.freshrss-dbpass.file = "${self}/secrets/freshrss-dbpass.age"; | ||||
|  | @ -7,6 +7,7 @@ | |||
|     enable = true; | ||||
|     virtualHost = "rss.sealight.xyz"; | ||||
|     baseUrl = "https://rss.sealight.xyz/"; | ||||
|     passwordFile = "/run/agenix/freshrss-dbpass"; | ||||
|     database = { | ||||
|       type = "pgsql"; | ||||
|       passFile = "/run/agenix/freshrss-dbpass"; | ||||
|  |  | |||
|  | @ -2,9 +2,11 @@ | |||
|   # grafana configuration | ||||
|   services.grafana = { | ||||
|     enable = true; | ||||
|     domain = "stats.mossnet.lan"; | ||||
|     port = 2342; | ||||
|     addr = "127.0.0.1"; | ||||
|     settings.server = { | ||||
|       domain = "stats.mossnet.lan"; | ||||
|       http_port = 2342; | ||||
|       http_addr = "127.0.0.1"; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   # nginx reverse proxy | ||||
|  | @ -26,7 +28,7 @@ | |||
|         port = 9002; | ||||
|       }; | ||||
|       dnsmasq = { | ||||
|         enable = true; | ||||
|         enable = false; | ||||
|         port = 9153; | ||||
|       }; | ||||
|     }; | ||||
|  |  | |||
|  | @ -5,6 +5,7 @@ | |||
|     serviceConfig.Type = "oneshot"; | ||||
|     path = [ | ||||
|       pkgs.git | ||||
|       pkgs.openssh | ||||
|       pkgs.coreutils | ||||
|     ]; | ||||
|     script = '' | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| { pkgs, inputs, ... }: | ||||
| { pkgs, ... }: | ||||
| 
 | ||||
| { | ||||
|   systemd.services.website-deploy = { | ||||
|  | @ -8,7 +8,7 @@ | |||
|       pkgs.coreutils | ||||
|       pkgs.nixUnstable | ||||
|       pkgs.openssh | ||||
|       inputs.deploy.packages.${pkgs.system}.deploy-rs | ||||
|       pkgs.deploy | ||||
|     ]; | ||||
|     script = '' | ||||
|       cd /etc/nixos/ # TODO make variable | ||||
|  |  | |||
|  | @ -1,8 +1,6 @@ | |||
| { hmUsers, pkgs, ... }: | ||||
| { pkgs, ... }: | ||||
| 
 | ||||
| { | ||||
|   #home-manager.users = { inherit (hmUsers) anish; }; | ||||
| 
 | ||||
|   users.users.anish = { | ||||
|     description = "Personal user for Anish"; | ||||
|     hashedPassword = "$y$j9T$y3DPt/dWaPE.gRazQqw1w0$1RMH5sl/Nu8kW3ZMywYCPRniHD/jF5qRh0VKrdJ.bV2"; | ||||
|  | @ -16,16 +14,4 @@ | |||
|       "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDtU2GMYjXj6RGO1+mwM4TDGOo0qrKLTL4Di8+QgDX0p5vUEsnE1PS9wnuqCmSu75U8g0XIAMtvtdYyGk1N+Bx01erAZpT8DLYtIXFCyaiN28PVu5T1D0T+TQ7xgIH1qenXZR2DOQdf6kpvKEfm7+7bWhCo0N/KFMpmReubyzHDQcq/1qQasxTL+YALQFOjwKqsOTBXbHwZ103AEAcQX4ftBFEOfVli4/1aKIK4dNSZYB7J9Htq707YnsEqo9RLAMh0aOTTYgTx9AoSUDeqGuh/AGkcB7NcS7EEtI6d5YUGylwZh/gF6hqE0jl8kn2m5jMKXL3CRohZvjifue8x/GIjpu5WRabUuhBEbrfTQQaC7taHnt5rvYCGzKZx09TexUzhuz2CL480DRoxSG+P+lCNm1dIg/EZrnGEzXCSr36PlOqS5t5gm8tPkzCmZf2wU15A3ZIYUPmnYLqsn4WmIV7rKmdqt2ctWELUXow3PPiZXBucP9P3xpsYEfF1SB2SGNc= u0_a139@localhost" | ||||
|     ]; | ||||
|   }; | ||||
| 
 | ||||
|   home-manager.users.anish.home.stateVersion = "22.05"; | ||||
| 
 | ||||
|   # home-manager.users.anish.programs.git = { | ||||
|   #   userName = "Anish Lakhwara"; | ||||
|   #   userEmail = "anish+git@lakhwara.com"; | ||||
|   #   delta.enable = true; | ||||
|   # }; | ||||
| 
 | ||||
|   #home-manager.users.anish = { suites, ... }: { | ||||
|   #  imports = suites.gui; | ||||
|   #}; | ||||
| } | ||||
|  |  | |||
|  | @ -89,7 +89,7 @@ in | |||
|     services.phpfpm.pools."${poolName}" = { | ||||
|       user = "${cfg.user}"; | ||||
|       group = "nginx"; | ||||
|       phpPackage = pkgs.php74; | ||||
|       phpPackage = pkgs.php; | ||||
|       settings = { | ||||
|         "listen.owner" = "nginx"; | ||||
|         "listen.group" = "nginx"; | ||||
|  | @ -155,7 +155,7 @@ in | |||
|       wantedBy = [ "multi-user.target" ]; | ||||
|       before = [ "phpfpm-wallabag.service" ]; | ||||
|       after = [ "mysql.service" "postgresql.service" ]; | ||||
|       path = with pkgs; [ coreutils php74 php74Packages.composer ]; | ||||
|       path = with pkgs; [ coreutils php phpPackages.composer ]; | ||||
| 
 | ||||
|       serviceConfig = { | ||||
|         User = cfg.user; | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue