server: configure woodpecker

This commit is contained in:
Kabbone 2023-03-14 18:41:49 +01:00
parent 987ecdc1ab
commit d2e7ad4743
Signed by: Kabbone
SSH Key Fingerprint: SHA256:A5zPB5I6u5V78V51c362BBdCwhDhfDUVbt7NfKdjWBY
3 changed files with 39 additions and 36 deletions

View File

@ -25,18 +25,19 @@
}; };
}; };
systemd.services = {
woodpecker-server = { woodpecker-server = {
description = "CI/CD Pipeline Server"; description = "CI/CD Pipeline Server";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "network.target" "postgresql.service" ]; after = [ "network.target" "postgresql.service" ];
requires = [ "postgresql.service" ]; requires = [ "postgresql.service" ];
script = "${pkgs.woodpecker-server}/bin/woodpecker-server --server-host https://woodpecker.kabtop.de --server-addr localhost:8000 "; script = "${pkgs.woodpecker-server}/bin/woodpecker-server";
# --environment ${config.age.secrets."services/woodpecker/environment.yml".path}";
serviceConfig = { serviceConfig = {
User="woodpecker"; User="woodpecker";
Group="woodpecker"; Group="woodpecker";
Environment="HOME=/var/lib/woodpecker"; Environment="HOME=/var/lib/woodpecker";
ReadWritePaths="/var/log/woodpecker"; EnvironmentFile=config.age.secrets."services/woodpecker/environment".path;
ReadWritePaths="/var/lib/woodpecker /var/log/woodpecker";
NoNewPrivileges=true; NoNewPrivileges=true;
MemoryDenyWriteExecute=true; MemoryDenyWriteExecute=true;
PrivateDevices=true; PrivateDevices=true;
@ -58,6 +59,7 @@
SystemCallFilter="@system-service"; SystemCallFilter="@system-service";
}; };
}; };
};
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
"d /var/log/woodpecker - woodpecker woodpecker" "d /var/log/woodpecker - woodpecker woodpecker"
@ -70,7 +72,7 @@
recommendedGzipSettings = true; recommendedGzipSettings = true;
recommendedProxySettings = true; recommendedProxySettings = true;
virtualHosts = { virtualHosts = {
"woodpecker.kabtop.de" = { "ci.kabtop.de" = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
locations."/".proxyPass = "http://localhost:8000"; locations."/".proxyPass = "http://localhost:8000";
@ -78,10 +80,10 @@
}; };
}; };
# age.secrets."services/woodpecker/dbpassFile" = { age.secrets."services/woodpecker/environment" = {
# file = ../../../secrets/services/nextcloud/dbpassFile.age; file = ../../../secrets/services/woodpecker/environment.age;
# owner = "nextcloud"; owner = "woodpecker";
# }; };
} }

View File

@ -44,4 +44,5 @@ in
"services/nextcloud/dbpassFile.age".publicKeys = servers ++ users; "services/nextcloud/dbpassFile.age".publicKeys = servers ++ users;
"services/gitea/databasePassword.age".publicKeys = servers ++ users; "services/gitea/databasePassword.age".publicKeys = servers ++ users;
"services/gitea/mailerPassword.age".publicKeys = servers ++ users; "services/gitea/mailerPassword.age".publicKeys = servers ++ users;
"services/woodpecker/environment.age".publicKeys = servers ++ users;
} }

Binary file not shown.