diff --git a/nixos-modules/nix/default.nix b/nixos-modules/nix/default.nix index d084c23..aadb5f8 100644 --- a/nixos-modules/nix/default.nix +++ b/nixos-modules/nix/default.nix @@ -34,6 +34,11 @@ in max-jobs = "auto"; auto-optimise-store = true; allowed-users = [ "*" ]; + trusted-users = [ + "builder" + "jopejeo1" + "root" + ]; experimental-features = [ "nix-command" "flakes" @@ -43,6 +48,15 @@ in keep-going = true; builders-use-substitutes = true; }; + #buildMachines = { + # systems = [ + # "x86_64-linux" + # ]; + # supportedFeatures = [ + # "kvm" + # "big-parallel" + # ]; + #}; distributedBuilds = true; package = pkgs.lix; registry = lib.mkForce ( diff --git a/nixos-modules/users/builder/default.nix b/nixos-modules/users/builder/default.nix new file mode 100644 index 0000000..c6eeb0a --- /dev/null +++ b/nixos-modules/users/builder/default.nix @@ -0,0 +1,30 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + cfg = config.jopejoe1.user.builder; +in +{ + options.jopejoe1.user.builder = { + enable = lib.mkEnableOption "Enable builder user"; + }; + + config = lib.mkIf cfg.enable { + users.users.jopejoe1 = { + isNormalUser = true; + description = "Build User"; + hashedPassword = "$2b$05$Uk84TY/RHlH8DIigUlFYjeorjTlCMEY9wN2pAcw5BLaPoc7dKiSsC"; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB8oyMpS2hK3gQXyHIIVS6oilgMpemLmfhKKJ6RBMwUh johannes@joens.email" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP3pKtvhOOjG1pGJq7cVHS5uWy5IP8y1Ra/ENpmJcqOe root@zap" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFEcNAVRN66mfKmaCpxs++0094Eh4mqXkUwDPZPkIIBB johannes@joens.email" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFZDUoC+1lNR2JTY1Q+vhXpuLmKMdVl2OMFLVbQ3cGkw jopejoe1@kuraokami" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKm2igbJ+Ke+dJO3r7wp5ZTreHqC39Sjctca119Bl2yc jopejoe1@zap" + ]; + }; + }; +} diff --git a/nixos-modules/users/default.nix b/nixos-modules/users/default.nix index 00935d4..2d104fe 100644 --- a/nixos-modules/users/default.nix +++ b/nixos-modules/users/default.nix @@ -4,5 +4,6 @@ imports = [ ./root ./jopejoe1 + ./builder ]; } diff --git a/systems/hetzner/default.nix b/systems/hetzner/default.nix index 36a2233..ae00813 100644 --- a/systems/hetzner/default.nix +++ b/systems/hetzner/default.nix @@ -26,6 +26,7 @@ user = { jopejoe1.enable = true; root.enable = true; + builder.enable = true; }; ssh.enable = true; };