add build user

This commit is contained in:
Johannes Jöns 2024-07-17 20:16:23 +02:00
parent 6a55bf77bd
commit 6db9dc2f95
4 changed files with 46 additions and 0 deletions

View file

@ -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 (

View file

@ -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"
];
};
};
}

View file

@ -4,5 +4,6 @@
imports = [
./root
./jopejoe1
./builder
];
}

View file

@ -26,6 +26,7 @@
user = {
jopejoe1.enable = true;
root.enable = true;
builder.enable = true;
};
ssh.enable = true;
};