zfs permissions

This commit is contained in:
2026-02-07 15:00:00 -07:00
parent cae3fdf479
commit 2df709af93

View File

@@ -50,6 +50,20 @@
users.groups.gitea-runner = { }; users.groups.gitea-runner = { };
system.activationScripts.zfs-delegate-gitea-runner = {
text =
let
poolNames = [ "data-ssd", "backup" ];
permissions = "compression,create,destroy,mount,mountpoint,receive,rollback,send,snapshot,hold";
in
''
${lib.concatMapStringsSep "\n" (pool:
"${pkgs.zfs}/bin/zfs allow -u gitea-runner ${permissions} ${pool} || true"
) poolNames}
'';
deps = [ ];
};
systemd.services.gitea-runner-infrastructure.serviceConfig = { systemd.services.gitea-runner-infrastructure.serviceConfig = {
WorkingDirectory = lib.mkForce "/var/lib/gitea-runner/infrastructure"; WorkingDirectory = lib.mkForce "/var/lib/gitea-runner/infrastructure";