Dmitriy Pleshevskiy
dab505e62b
nix: refac overlays nix: fix path to packages nix: use mkMerge nix: rename nixpkgs-unstable input user: remove my tools user: build use unstable packages for nil cannot be built on stable because it requires rustc 1.66 or newer, while the currently active rustc version is 1.64.0 host/magenta: use unstable gitea nix: fix rollback command nix: fix overlays user: use unstable haskell packages to build xmonad user: don't build woodpecker-cli host: import nix module for canigou and magenta pkgs: fix woodpecker host/home: use unstable kernel to use rtl88x2bu driver host: use unstable ipfs move ipfs to shared config user: use unstable woodpecker-cli Reviewed-on: #13
36 lines
1.1 KiB
Nix
36 lines
1.1 KiB
Nix
{ pkgs, config, ... }:
|
|
|
|
let
|
|
canigouData = import ../../data.secret.nix;
|
|
|
|
data = import ./data.secret.nix;
|
|
inherit (data) userAgent group grpcPort;
|
|
|
|
dockerSockVolume = "/var/run/docker.sock:/var/run/docker.sock";
|
|
dockerConfVolume = "${config.age.secrets.woodpecker-docker-config.path}:/root/.docker/config.json";
|
|
in
|
|
{
|
|
systemd.services.woodpecker-agent = {
|
|
enable = true;
|
|
wantedBy = [ "multi-user.target" ];
|
|
after = [ "network-online.target" ];
|
|
wants = [ "network-online.target" ];
|
|
restartIfChanged = true;
|
|
serviceConfig = {
|
|
EnvironmentFile = [
|
|
config.age.secrets.woodpecker-common-env.path
|
|
];
|
|
Environment = [
|
|
"WOODPECKER_DEBUG_PRETTY=true"
|
|
"WOODPECKER_LOG_LEVEL=trace"
|
|
"WOODPECKER_SERVER=${canigouData.addr}:${toString grpcPort}"
|
|
"WOODPECKER_MAX_WORKFLOWS=2"
|
|
"WOODPECKER_BACKEND=docker"
|
|
"WOODPECKER_BACKEND_DOCKER_VOLUMES=${dockerSockVolume},${dockerConfVolume}"
|
|
];
|
|
ExecStart = "${pkgs.unstable.woodpecker-agent}/bin/woodpecker-agent";
|
|
User = userAgent;
|
|
Group = group;
|
|
};
|
|
};
|
|
}
|