hosts/modules: put builder back in a separate file
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
		@@ -25,7 +25,7 @@
 | 
				
			|||||||
    emacs-overlay.url = github:nix-community/emacs-overlay;
 | 
					    emacs-overlay.url = github:nix-community/emacs-overlay;
 | 
				
			||||||
    nvim-overlay = {
 | 
					    nvim-overlay = {
 | 
				
			||||||
      url = github:nix-community/neovim-nightly-overlay;
 | 
					      url = github:nix-community/neovim-nightly-overlay;
 | 
				
			||||||
 #     inputs.nixpkgs.url = github:nixos/nixpkgs?rev=fad51abd42ca17a60fc1d4cb9382e2d79ae31836;
 | 
					      #     inputs.nixpkgs.url = github:nixos/nixpkgs?rev=fad51abd42ca17a60fc1d4cb9382e2d79ae31836;
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    hyprland = {
 | 
					    hyprland = {
 | 
				
			||||||
      url = github:hyprwm/Hyprland;
 | 
					      url = github:hyprwm/Hyprland;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,7 +10,7 @@ let
 | 
				
			|||||||
        use-package
 | 
					        use-package
 | 
				
			||||||
        (epkgs.tree-sitter-langs.withPlugins (_: epkgs.tree-sitter-langs.plugins))
 | 
					        (epkgs.tree-sitter-langs.withPlugins (_: epkgs.tree-sitter-langs.plugins))
 | 
				
			||||||
      ];
 | 
					      ];
 | 
				
			||||||
     /* override = {
 | 
					      /* override = {
 | 
				
			||||||
        stm32-emacs = trivialBuild rec {
 | 
					        stm32-emacs = trivialBuild rec {
 | 
				
			||||||
          pname = "stm32-emacs";
 | 
					          pname = "stm32-emacs";
 | 
				
			||||||
          version = haskellPackages.Agda.version;
 | 
					          version = haskellPackages.Agda.version;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -38,6 +38,7 @@ in
 | 
				
			|||||||
      system = "x86_64-linux";
 | 
					      system = "x86_64-linux";
 | 
				
			||||||
      modules = [
 | 
					      modules = [
 | 
				
			||||||
        ./remilia
 | 
					        ./remilia
 | 
				
			||||||
 | 
					        ./modules/x86builder.nix
 | 
				
			||||||
        inputs.mailserver.nixosModules.mailserver
 | 
					        inputs.mailserver.nixosModules.mailserver
 | 
				
			||||||
        { nixpkgs.pkgs = self.legacyPackages.${system}; }
 | 
					        { nixpkgs.pkgs = self.legacyPackages.${system}; }
 | 
				
			||||||
      ]
 | 
					      ]
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -39,16 +39,7 @@
 | 
				
			|||||||
    package = pkgs.nixUnstable;
 | 
					    package = pkgs.nixUnstable;
 | 
				
			||||||
    extraOptions = ''
 | 
					    extraOptions = ''
 | 
				
			||||||
      experimental-features = nix-command flakes
 | 
					      experimental-features = nix-command flakes
 | 
				
			||||||
      builders-use-substitutes = true
 | 
					 | 
				
			||||||
    '';
 | 
					    '';
 | 
				
			||||||
    settings.trusted-users = [ "root" ];
 | 
					    settings.trusted-users = [ "root" "spark" ];
 | 
				
			||||||
    buildMachines = [{
 | 
					 | 
				
			||||||
      hostName = "satori";
 | 
					 | 
				
			||||||
      systems = [ "x86_64-linux" "aarch64-linux" ];
 | 
					 | 
				
			||||||
      maxJobs = 4;
 | 
					 | 
				
			||||||
      speedFactor = 2;
 | 
					 | 
				
			||||||
      supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
 | 
					 | 
				
			||||||
    }];
 | 
					 | 
				
			||||||
    distributedBuilds = true;
 | 
					 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										16
									
								
								hosts/modules/x86builder.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								hosts/modules/x86builder.nix
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,16 @@
 | 
				
			|||||||
 | 
					{ config, ... }:
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  nix = {
 | 
				
			||||||
 | 
					    extraOptions = ''
 | 
				
			||||||
 | 
					      builders-use-substitutes = true
 | 
				
			||||||
 | 
					    '';
 | 
				
			||||||
 | 
					    buildMachines = [{
 | 
				
			||||||
 | 
					      hostName = "satori";
 | 
				
			||||||
 | 
					      systems = [ "x86_64-linux" "aarch64-linux" ];
 | 
				
			||||||
 | 
					      maxJobs = 4;
 | 
				
			||||||
 | 
					      speedFactor = 2;
 | 
				
			||||||
 | 
					      supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
 | 
				
			||||||
 | 
					    }];
 | 
				
			||||||
 | 
					    distributedBuilds = true;
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -56,7 +56,7 @@ in
 | 
				
			|||||||
          "vault.${domain}" = genericHttpRProxy { addr = "https://${marisa}:8800"; };
 | 
					          "vault.${domain}" = genericHttpRProxy { addr = "https://${marisa}:8800"; };
 | 
				
			||||||
          "consul.${domain}" = genericHttpRProxy { addr = "http://${marisa}:8500"; };
 | 
					          "consul.${domain}" = genericHttpRProxy { addr = "http://${marisa}:8500"; };
 | 
				
			||||||
          "f.${domain}" = genericHttpRProxy { addr = "http://${marisa}:8888"; };
 | 
					          "f.${domain}" = genericHttpRProxy { addr = "http://${marisa}:8888"; };
 | 
				
			||||||
 #         "radio.${domain}" = genericHttpRProxy { addr = "http://${satori}:8001"; };
 | 
					          #         "radio.${domain}" = genericHttpRProxy { addr = "http://${satori}:8001"; };
 | 
				
			||||||
          "radio.${domain}" = {
 | 
					          "radio.${domain}" = {
 | 
				
			||||||
            addSSL = true;
 | 
					            addSSL = true;
 | 
				
			||||||
            enableACME = true;
 | 
					            enableACME = true;
 | 
				
			||||||
@@ -68,7 +68,7 @@ in
 | 
				
			|||||||
              '';
 | 
					              '';
 | 
				
			||||||
            };
 | 
					            };
 | 
				
			||||||
            locations."= /".return = "301 /radio";
 | 
					            locations."= /".return = "301 /radio";
 | 
				
			||||||
           };
 | 
					          };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          "git.${domain}" = genericHttpRProxy {
 | 
					          "git.${domain}" = genericHttpRProxy {
 | 
				
			||||||
            addr = "http://${marisa}:5000";
 | 
					            addr = "http://${marisa}:5000";
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,26 +1,26 @@
 | 
				
			|||||||
{ lib, config, pkgs, ... }:
 | 
					{ lib, config, pkgs, ... }:
 | 
				
			||||||
let
 | 
					let
 | 
				
			||||||
 | 
					
 | 
				
			||||||
udev-cypher = pkgs.stdenv.mkDerivation {
 | 
					  udev-cypher = pkgs.stdenv.mkDerivation {
 | 
				
			||||||
  name = "udev-cypher";
 | 
					    name = "udev-cypher";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  dontBuild = true;
 | 
					    dontBuild = true;
 | 
				
			||||||
  dontConfigure = true;
 | 
					    dontConfigure = true;
 | 
				
			||||||
  dontUnpack = true;
 | 
					    dontUnpack = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  installPhase = ''
 | 
					    installPhase = ''
 | 
				
			||||||
    mkdir -p $out/lib/udev/rules.d
 | 
					          mkdir -p $out/lib/udev/rules.d
 | 
				
			||||||
    touch $out/lib/udev/rules.d/21-cypherock.rules
 | 
					          touch $out/lib/udev/rules.d/21-cypherock.rules
 | 
				
			||||||
cat << 'EOF' >> $out/lib/udev/rules.d/21-cypherock.rules
 | 
					      cat << 'EOF' >> $out/lib/udev/rules.d/21-cypherock.rules
 | 
				
			||||||
SUBSYSTEM=="input", GROUP="input", MODE="0666"
 | 
					      SUBSYSTEM=="input", GROUP="input", MODE="0666"
 | 
				
			||||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="3503", ATTRS{idProduct}=="0103", MODE="666", GROUP="plugdev"
 | 
					      SUBSYSTEM=="usb", ATTRS{idVendor}=="3503", ATTRS{idProduct}=="0103", MODE="666", GROUP="plugdev"
 | 
				
			||||||
KERNEL=="hidraw*", ATTRS{idVendor}=="3503", ATTRS{idProduct}=="0103", MODE="0666", GROUP="plugdev"
 | 
					      KERNEL=="hidraw*", ATTRS{idVendor}=="3503", ATTRS{idProduct}=="0103", MODE="0666", GROUP="plugdev"
 | 
				
			||||||
0483:374f
 | 
					      0483:374f
 | 
				
			||||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374f", MODE="666", GROUP="plugdev"
 | 
					      SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374f", MODE="666", GROUP="plugdev"
 | 
				
			||||||
KERNEL=="hidraw*", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374f", MODE="0666", GROUP="plugdev"
 | 
					      KERNEL=="hidraw*", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374f", MODE="0666", GROUP="plugdev"
 | 
				
			||||||
EOF
 | 
					      EOF
 | 
				
			||||||
  '';
 | 
					    '';
 | 
				
			||||||
};
 | 
					  };
 | 
				
			||||||
in
 | 
					in
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  services = {
 | 
					  services = {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user