nix builder

This commit is contained in:
2026-09-03 04:32:47 +09:00
parent cc3798a7b2
commit d4721d1d22
3 changed files with 73 additions and 0 deletions
@@ -0,0 +1,8 @@
{
description = "NixOS deploy-rs deployment target";
includes = [
"services.openssh"
"users.nixdeploy"
];
}
+28
View File
@@ -0,0 +1,28 @@
{ pkgs, ... }:
{
users.groups.nixdeploy = { };
users.users.nixdeploy = {
isSystemUser = true;
group = "nixdeploy";
home = "/var/lib/nixdeploy";
createHome = true;
shell = pkgs.bashInteractive;
openssh.authorizedKeys.keys = [
"restrict ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFPg1aw0qXBmrQe6lzBwutX5t9Sxg2OeVN/homjqU6Ja moons@nix-builder"
];
};
security.sudo.extraRules = [
{
users = [ "nixdeploy" ];
commands = [
{
command = "ALL";
options = [ "NOPASSWD" ];
}
];
}
];
}