simplify
This commit is contained in:
@@ -30,13 +30,9 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.pathsToLink = [
|
||||
"/bin"
|
||||
];
|
||||
|
||||
users.users.gitea-runner = {
|
||||
users.users.gitea-runner = {
|
||||
isNormalUser = true;
|
||||
description = "Gitea Actions Runner";
|
||||
home = "/home/gitea-runner";
|
||||
@@ -47,27 +43,16 @@ users.users.gitea-runner = {
|
||||
kubernetes-helm
|
||||
];
|
||||
shell = pkgs.bash;
|
||||
};
|
||||
};
|
||||
|
||||
users.groups.gitea-runner = { };
|
||||
users.groups.gitea-runner = { };
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /data/runner 0755 gitea-runner gitea-runner -"
|
||||
"f /data/runner/gitea-infrastructure-token.txt 0600 gitea-runner gitea-runner -"
|
||||
"d /var/lib/gitea-runner 0755 gitea-runner gitea-runner -"
|
||||
"d /var/lib/gitea-runner/infrastructure 0755 gitea-runner gitea-runner -"
|
||||
];
|
||||
|
||||
# Override only the sandboxing settings, keep ExecStart from the module
|
||||
systemd.services.gitea-runner-infrastructure.serviceConfig = {
|
||||
# Keep the working directory
|
||||
systemd.services.gitea-runner-infrastructure.serviceConfig = {
|
||||
WorkingDirectory = lib.mkForce "/var/lib/gitea-runner/infrastructure";
|
||||
|
||||
# Override user/group
|
||||
User = lib.mkForce "gitea-runner";
|
||||
Group = lib.mkForce "gitea-runner";
|
||||
|
||||
# Remove ALL sandboxing - run as a normal user process
|
||||
DynamicUser = lib.mkForce false;
|
||||
PrivateDevices = lib.mkForce false;
|
||||
PrivateMounts = lib.mkForce false;
|
||||
@@ -93,10 +78,9 @@ systemd.services.gitea-runner-infrastructure.serviceConfig = {
|
||||
ReadWritePaths = lib.mkForce [ ];
|
||||
BindReadOnlyPaths = lib.mkForce [ ];
|
||||
|
||||
# Allow access to devices
|
||||
DeviceAllow = lib.mkForce [ "/dev/zfs rw" ];
|
||||
DevicePolicy = lib.mkForce "auto";
|
||||
|
||||
Restart = lib.mkForce "always";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user