test
This commit is contained in:
parent
9ebffd82c6
commit
2718a905c9
11 changed files with 133 additions and 8 deletions
55
services/authentik.nix
Normal file
55
services/authentik.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
|
||||
|
||||
{
|
||||
|
||||
config = {
|
||||
|
||||
systemd.services.authentik = {
|
||||
|
||||
description = "Run Docker Compose for authentik";
|
||||
|
||||
after = [ "network.target" "docker.service" ];
|
||||
|
||||
requires = [ "docker.service" ];
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
|
||||
|
||||
serviceConfig = {
|
||||
|
||||
Type = "exec";
|
||||
|
||||
|
||||
|
||||
# Pull the latest image before running
|
||||
|
||||
ExecStartPre = "/run/current-system/sw/bin/docker compose -f /home/nix/docker/authentik/compose.yaml pull";
|
||||
|
||||
|
||||
|
||||
# Bring the service up
|
||||
|
||||
ExecStart = "/run/current-system/sw/bin/docker compose -f /home/nix/docker/authentik/compose.yaml up";
|
||||
|
||||
|
||||
|
||||
# Take it down gracefully
|
||||
|
||||
ExecStop = "/run/current-system/sw/bin/docker compose -f /home/nix/docker/authentik/compose.yaml down";
|
||||
|
||||
|
||||
|
||||
WorkingDirectory = "/home/nix/docker/authentik";
|
||||
|
||||
Restart = "on-failure";
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue