diff --git a/secret/backblaze.age b/secret/backblaze.age index 81cb2b0..7bd01d1 100644 Binary files a/secret/backblaze.age and b/secret/backblaze.age differ diff --git a/secrets.nix b/secrets.nix index 60f0b9f..5d87a80 100644 --- a/secrets.nix +++ b/secrets.nix @@ -1,10 +1,10 @@ let strawberry = [ (builtins.readFile ./system/strawberry/keys/riley.pub) - (builtins.readFile ./system/strawberry/keys/root.pub) + (builtins.readFile ./system/strawberry/keys/host.pub) ]; lime = [ (builtins.readFile ./system/lime/keys/riley.pub) - (builtins.readFile ./system/lime/keys/root.pub) + (builtins.readFile ./system/lime/keys/host.pub) ]; dev-lt-63 = [ (builtins.readFile ./system/dev-lt-63/keys/riley.pub) diff --git a/shared/core/nix.nix b/shared/core/nix.nix index d275658..2f314ae 100644 --- a/shared/core/nix.nix +++ b/shared/core/nix.nix @@ -5,15 +5,29 @@ let cfg = config.custom.nix; in with lib; { options.custom.nix = { - distributedBuilds.enable = mkEnableOption "distributed builds on strawberry"; + distributedBuilds.enable = + (mkEnableOption "distributed builds on strawberry") // { default = true; }; }; # TODO: Add strawberry as a build machine here - config = { - nixpkgs.config.allowUnfree = true; - nix = { - distributedBuilds = true; - buildMachines = [{ + config = mkMerge [ + { + nixpkgs.config.allowUnfree = true; + nix = { + extraOptions = '' + experimental-features = nix-command flakes + ''; + registry.nixpkgs.flake = nixpkgs; + registry.pwnix.flake = pwnix; + settings.trusted-users = [ + "@wheel" + "root" + ]; + }; + } + (mkIf cfg.distributedBuilds.enable { + nix.distributedBuilds = true; + nix.buildMachines = [{ hostName = "strawberry"; sshUser = "nix-build"; sshKey = "/etc/ssh/ssh_host_ed25519_key"; @@ -29,17 +43,8 @@ in with lib; { "big-parallel" "kvm" ]; - }]; - extraOptions = '' - experimental-features = nix-command flakes - ''; - registry.nixpkgs.flake = nixpkgs; - registry.pwnix.flake = pwnix; - settings.trusted-users = [ - "@wheel" - "root" - ]; - }; - }; + }]; + }) + ]; } diff --git a/system/cherry/keys/root.pub b/system/cherry/keys/host.pub similarity index 100% rename from system/cherry/keys/root.pub rename to system/cherry/keys/host.pub diff --git a/system/lime/keys/host.pub b/system/lime/keys/host.pub new file mode 100644 index 0000000..5b420f3 --- /dev/null +++ b/system/lime/keys/host.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOF9N5hsJEdm/jBxAGjQdQg7s/EFheZJK3KHyNkt5uFc root@lime diff --git a/system/lime/keys/root.pub b/system/lime/keys/root.pub index 5b420f3..7e31d8f 100644 --- a/system/lime/keys/root.pub +++ b/system/lime/keys/root.pub @@ -1 +1 @@ -ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOF9N5hsJEdm/jBxAGjQdQg7s/EFheZJK3KHyNkt5uFc root@lime +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAPycsXjXLc3yzqSxG0sAHgQsGZ3KqOgprW2dPmAErAQ root@lime diff --git a/system/strawberry/keys/root.pub b/system/strawberry/keys/host.pub similarity index 100% rename from system/strawberry/keys/root.pub rename to system/strawberry/keys/host.pub