This commit is contained in:
Peder Bergebakken Sundt 2024-10-07 11:22:08 +02:00
parent b27ef07caa
commit de26106903
6 changed files with 15 additions and 6 deletions

View File

@ -257,7 +257,6 @@
au = ./profiles/auto-upgrade.nix; au = ./profiles/auto-upgrade.nix;
#rb = ./profiles/remote-builders.nix; # TODO #rb = ./profiles/remote-builders.nix; # TODO
nixld = ./profiles/nix-ld.nix; nixld = ./profiles/nix-ld.nix;
binfmt = ./profiles/binfmt-emu.nix;
dns64 = { config, ... }: { dns64 = { config, ... }: {
networking.nameservers = [ "2001:700:1:11::2:51" ]; # dns64.uninett.no networking.nameservers = [ "2001:700:1:11::2:51" ]; # dns64.uninett.no
networking.networkmanager.enable = true; networking.networkmanager.enable = true;

View File

@ -5,6 +5,10 @@
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi"; boot.loader.efi.efiSysMountPoint = "/boot/efi";
boot.binfmt.emulatedSystems = [
"riscv64-linux"
];
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
../../profiles/sshd.nix ../../profiles/sshd.nix

View File

@ -4,6 +4,10 @@
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.binfmt.emulatedSystems = [
"riscv64-linux"
];
/** / /** /
services.xserver.displayManager.autoLogin.enable = true; services.xserver.displayManager.autoLogin.enable = true;
services.xserver.displayManager.autoLogin.user = "pbsds"; services.xserver.displayManager.autoLogin.user = "pbsds";

View File

@ -37,6 +37,7 @@ ssh.listenPort = 22
# graphical: one job # graphical: one job
["bolle.pbsds.net"] ["bolle.pbsds.net"]
buildMachine.systems = ["x86_64-linux", "i686-linux", "riscv64-linux"]
buildMachine.maxJobs = 3 # 12 threads 32GB buildMachine.maxJobs = 3 # 12 threads 32GB
buildMachine.speedFactor = 4 # ??? buildMachine.speedFactor = 4 # ???
buildMachine.supportedFeatures = ["kvm", "big-parallel", "nixos-test"] buildMachine.supportedFeatures = ["kvm", "big-parallel", "nixos-test"]
@ -51,6 +52,7 @@ ssh.listenPublicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH03MEINNnjBvtmvN2QsC
ssh.proxyJump = "isvegg.pvv.ntnu.no" ssh.proxyJump = "isvegg.pvv.ntnu.no"
["garp.pbsds.net"] # gtx 1080 ["garp.pbsds.net"] # gtx 1080
buildMachine.systems = ["x86_64-linux", "i686-linux", "riscv64-linux"]
buildMachine.maxJobs = 2 # 8 threads 32GB buildMachine.maxJobs = 2 # 8 threads 32GB
buildMachine.speedFactor = 4 # i7-6700 buildMachine.speedFactor = 4 # i7-6700
buildMachine.supportedFeatures = ["kvm", "big-parallel", "nixos-test", "cuda"] buildMachine.supportedFeatures = ["kvm", "big-parallel", "nixos-test", "cuda"]

View File

@ -6,8 +6,8 @@
#"wasm32-wasi" #"wasm32-wasi"
#"wasm64-wasi" #"wasm64-wasi"
#"x86_64-windows" #"x86_64-windows"
"aarch64-linux" #"aarch64-linux"
"riscv64-linux" #"riscv64-linux"
#"x86_64-darwin" #"x86_64-darwin"
#"aarch64-darwin" #"aarch64-darwin"
]; ];

View File

@ -8,16 +8,16 @@ let
inherit (builtins) map fromTOML readFile elem attrNames attrValues; inherit (builtins) map fromTOML readFile elem attrNames attrValues;
inherit (lib) mkIf; inherit (lib) mkIf;
known-hosts' = fromTOML (readFile ../hosts/known-hosts.toml); # TODO: eww known-hosts' = lib.importTOML ../hosts/known-hosts.toml; # TODO: eww
known-hosts = lib.pipe known-hosts' [ known-hosts = lib.pipe known-hosts' [
(lib.filterAttrs (name: host: name != "__default__")) (lib.flip lib.removeAttrs ["__default__"])
(lib.mapAttrs (name: host: (lib.mapAttrs (name: host:
lib.recursiveUpdate (known-hosts'."__default__" or {}) host lib.recursiveUpdate (known-hosts'."__default__" or {}) host
)) ))
]; ];
hostNames = attrNames known-hosts; hostNames = attrNames known-hosts;
thisHost = known-hosts.${config.networking.fqdn}; thisHost = known-hosts.${config.networking.fqdn};
thisHostIsBuilder = thisHost.maxJobs > 0; thisHostIsBuilder = thisHost.buildMachine.maxJobs > 0;
thisHostIsHopHost = builtins.elem config.networking.fqdn (lib.forEach (attrValues known-hosts) (host: host.ssh.proxyJump or null)); thisHostIsHopHost = builtins.elem config.networking.fqdn (lib.forEach (attrValues known-hosts) (host: host.ssh.proxyJump or null));
thisHostIsConsumer = thisHost.ssh ? userPublicKey; thisHostIsConsumer = thisHost.ssh ? userPublicKey;