From 8ad810254b438ef3b708b47561a35aaabe768a1e Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Thu, 21 Nov 2024 14:52:59 +0100 Subject: [PATCH] nemo: add woodpecker user for woodpecker-agent --- hosts/nemo/woodpecker.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/hosts/nemo/woodpecker.nix b/hosts/nemo/woodpecker.nix index 8a4e963..f3cd5ec 100644 --- a/hosts/nemo/woodpecker.nix +++ b/hosts/nemo/woodpecker.nix @@ -4,6 +4,20 @@ ... }: { + + users.users.woodpecker = { + isSystemUser = true; + group = "woodpecker"; + extraGroups = [ + "docker" + "podman" + ]; + createHome = true; + home = "/etc/woodpecker"; + homeMode = "764"; + }; + users.groups.woodpecker = { }; + services.woodpecker-agents.agents.docker = { enable = true; package = pkgs.woodpecker-agent; @@ -27,7 +41,11 @@ ]; # restartIfChanged = false; serviceConfig = { + User = "woodpecker"; + Group = "woodpecker"; + WorkingDirectory = "/etc/woodpecker"; BindPaths = [ "/run/podman/podman.sock" ]; }; }; + }