diff --git a/configuration/hydra-build-machine/default.nix b/configuration/hydra-build-machine/default.nix deleted file mode 100644 index b27bef5..0000000 --- a/configuration/hydra-build-machine/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ ... }: - -{ - - # Allow Hydra to fetch remote URLs in restricted mode - nix.settings.allowed-uris = "http: https: git+https: github:"; - - services.openssh.settings= { - PermitRootLogin = "yes"; - }; - - users.extraUsers.root.openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMv8Lbca/CR4das3HJ2F/sQ9dA7kdGS1hSVTt5lX4diP root@hydra-1" - ]; - -} diff --git a/hosts/hydra-1/configuration.nix b/hosts/hydra-1/configuration.nix index 33958ac..4a3e8c2 100644 --- a/hosts/hydra-1/configuration.nix +++ b/hosts/hydra-1/configuration.nix @@ -4,7 +4,6 @@ imports = [ ./hardware-configuration.nix - ../../configuration/hydra-build-machine ./build-machines.nix ./hydra.nix @@ -12,6 +11,7 @@ ]; profiles.clerie.mercury-vm.enable = true; + profiles.clerie.hydra-build-machine.enable = true; boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/vda"; diff --git a/hosts/hydra-2/configuration.nix b/hosts/hydra-2/configuration.nix index 753f77a..e09c071 100644 --- a/hosts/hydra-2/configuration.nix +++ b/hosts/hydra-2/configuration.nix @@ -4,10 +4,10 @@ imports = [ ./hardware-configuration.nix - ../../configuration/hydra-build-machine ]; profiles.clerie.cybercluster-vm.enable = true; + profiles.clerie.hydra-build-machine.enable = true; boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/vda"; diff --git a/profiles/default.nix b/profiles/default.nix index a7ae051..9052485 100644 --- a/profiles/default.nix +++ b/profiles/default.nix @@ -11,6 +11,7 @@ ./fem-net ./firefox ./hetzner-cloud + ./hydra-build-machine ./mercury-vm ./netcup ./network-fallback-dhcp diff --git a/profiles/hydra-build-machine/default.nix b/profiles/hydra-build-machine/default.nix new file mode 100644 index 0000000..c812f8b --- /dev/null +++ b/profiles/hydra-build-machine/default.nix @@ -0,0 +1,26 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + + options.profiles.clerie.hydra-build-machine = { + enable = mkEnableOption "Set defaults for hydra build machines"; + }; + + config = mkIf config.profiles.clerie.hydra-build-machine.enable { + + # Allow Hydra to fetch remote URLs in restricted mode + nix.settings.allowed-uris = "http: https: git+https: github:"; + + services.openssh.settings= { + PermitRootLogin = "yes"; + }; + + users.extraUsers.root.openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMv8Lbca/CR4das3HJ2F/sQ9dA7kdGS1hSVTt5lX4diP root@hydra-1" + ]; + + }; + +}