From 25b64efcb2561fa6e43a74cf3c80b62bb2a216ec Mon Sep 17 00:00:00 2001 From: uttarayan21 Date: Sat, 8 Feb 2025 00:24:11 +0530 Subject: [PATCH] feat: Added remotebuilder to nix-darwin --- builders/mirai.nix | 7 +++++++ builders/shiro.nix | 7 +++++++ darwin/shiro/configuration.nix | 21 +++++++-------------- nixos/ryu/configuration.nix | 9 ++------- 4 files changed, 23 insertions(+), 21 deletions(-) create mode 100644 builders/mirai.nix create mode 100644 builders/shiro.nix diff --git a/builders/mirai.nix b/builders/mirai.nix new file mode 100644 index 00000000..a9a55ac9 --- /dev/null +++ b/builders/mirai.nix @@ -0,0 +1,7 @@ +{ + hostName = "sh.darksailor.dev"; + sshUser = "remotebuilder"; + system = "x86_64-linux"; + protocol = "ssh-ng"; + supportedFeatures = ["nixos-test" "benchmark" "big-parallel" "kvm"]; +} diff --git a/builders/shiro.nix b/builders/shiro.nix new file mode 100644 index 00000000..1585e788 --- /dev/null +++ b/builders/shiro.nix @@ -0,0 +1,7 @@ +{ + hostName = "shiro"; + sshUser = "remotebuilder"; + system = "aarch64-darwin"; + protocol = "ssh-ng"; + supportedFeatures = ["benchmark" "big-parallel" "kvm"]; +} diff --git a/darwin/shiro/configuration.nix b/darwin/shiro/configuration.nix index 953eb024..8fd5c14e 100644 --- a/darwin/shiro/configuration.nix +++ b/darwin/shiro/configuration.nix @@ -28,24 +28,17 @@ ''; package = pkgs.nixVersions.latest; buildMachines = [ - { - hostName = "sh.darksailor.dev"; - sshUser = "remotebuilder"; - system = "x86_64-linux"; - protocol = "ssh-ng"; - supportedFeatures = ["nixos-test" "benchmark" "big-parallel" "kvm"]; - } - # { - # hostName = "shiro"; - # sshUser = "remotebuilder"; - # system = "aarch64-darwin"; - # protocol = "ssh-ng"; - # supportedFeatures = ["benchmark" "big-parallel" "kvm"]; - # } + ../../builders/mirai.nix + ../../builders/shiro.nix ]; distributedBuilds = true; }; + users.users.remotebuilder = { + isNormalUser = true; + openssh.authorizedKeys.keyFiles = [../../secrets/id_ed25519.pub]; + }; + # security.pam.enableSudoTouchIdAuth = true; # system.patches = [ # (pkgs.writeText "pam-reattach.patch" diff --git a/nixos/ryu/configuration.nix b/nixos/ryu/configuration.nix index e4f30a3e..c502d086 100644 --- a/nixos/ryu/configuration.nix +++ b/nixos/ryu/configuration.nix @@ -73,13 +73,8 @@ }; package = pkgs.nixVersions.latest; buildMachines = [ - { - hostName = "sh.darksailor.dev"; - sshUser = "remotebuilder"; - system = "x86_64-linux"; - protocol = "ssh-ng"; - supportedFeatures = ["nixos-test" "benchmark" "big-parallel" "kvm"]; - } + ../../builders/mirai.nix + ../../builders/shiro.nix ]; distributedBuilds = true; };