hosts/modules: put builder back in a separate file

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2023-06-24 16:25:48 +05:30
parent f88702525b
commit 8f7781f293
7 changed files with 40 additions and 32 deletions

View File

@@ -38,6 +38,7 @@ in
system = "x86_64-linux";
modules = [
./remilia
./modules/x86builder.nix
inputs.mailserver.nixosModules.mailserver
{ nixpkgs.pkgs = self.legacyPackages.${system}; }
]

View File

@@ -39,16 +39,7 @@
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command flakes
builders-use-substitutes = true
'';
settings.trusted-users = [ "root" ];
buildMachines = [{
hostName = "satori";
systems = [ "x86_64-linux" "aarch64-linux" ];
maxJobs = 4;
speedFactor = 2;
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
}];
distributedBuilds = true;
settings.trusted-users = [ "root" "spark" ];
};
}

View 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;
};
}

View File

@@ -56,7 +56,7 @@ in
"vault.${domain}" = genericHttpRProxy { addr = "https://${marisa}:8800"; };
"consul.${domain}" = genericHttpRProxy { addr = "http://${marisa}:8500"; };
"f.${domain}" = genericHttpRProxy { addr = "http://${marisa}:8888"; };
# "radio.${domain}" = genericHttpRProxy { addr = "http://${satori}:8001"; };
# "radio.${domain}" = genericHttpRProxy { addr = "http://${satori}:8001"; };
"radio.${domain}" = {
addSSL = true;
enableACME = true;
@@ -68,7 +68,7 @@ in
'';
};
locations."= /".return = "301 /radio";
};
};
"git.${domain}" = genericHttpRProxy {
addr = "http://${marisa}:5000";

View File

@@ -1,26 +1,26 @@
{ lib, config, pkgs, ... }:
let
udev-cypher = pkgs.stdenv.mkDerivation {
name = "udev-cypher";
udev-cypher = pkgs.stdenv.mkDerivation {
name = "udev-cypher";
dontBuild = true;
dontConfigure = true;
dontUnpack = true;
dontBuild = true;
dontConfigure = true;
dontUnpack = true;
installPhase = ''
mkdir -p $out/lib/udev/rules.d
touch $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=="usb", ATTRS{idVendor}=="3503", ATTRS{idProduct}=="0103", MODE="666", GROUP="plugdev"
KERNEL=="hidraw*", ATTRS{idVendor}=="3503", ATTRS{idProduct}=="0103", MODE="0666", GROUP="plugdev"
0483:374f
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374f", MODE="666", GROUP="plugdev"
KERNEL=="hidraw*", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374f", MODE="0666", GROUP="plugdev"
EOF
'';
};
installPhase = ''
mkdir -p $out/lib/udev/rules.d
touch $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=="usb", ATTRS{idVendor}=="3503", ATTRS{idProduct}=="0103", MODE="666", GROUP="plugdev"
KERNEL=="hidraw*", ATTRS{idVendor}=="3503", ATTRS{idProduct}=="0103", MODE="0666", GROUP="plugdev"
0483:374f
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374f", MODE="666", GROUP="plugdev"
KERNEL=="hidraw*", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374f", MODE="0666", GROUP="plugdev"
EOF
'';
};
in
{
services = {