Christopher Bacher
9238520b65
modules(pihole-container): add option for enabling user lingering (not wired)
2022-10-23 23:20:42 +02:00
Christopher Bacher
c8e603fd29
modules(pihole-container): assert that host user has sub-uids/gids configured
2022-10-22 15:47:07 +02:00
Christopher Bacher
8c58832c7d
modules(pihole-container): improve stopping of the container
...
The service only waits until the container has been stopped.
2022-10-18 21:04:39 +02:00
Christopher Bacher
53a4cddd7c
modules(pihole-container): add sleep in ExecStopPost=
to force a wait
...
This is necessary because podman-stop did not wait until the container was actually deleted and `RestartSec=` does not apply if the service is restarted by systemd itself (via restart).
RestartSec only applies if the restart reason is covered by `Restart=`
2022-10-17 01:49:54 +02:00
Christopher Bacher
c7048bf7ad
modules(pihole-container): add RestartSec to give the container time to be properly removed
...
The ExecStop from the previous commit was not enough the journald logs show that the container fails to restart because the old one is still around.
2022-10-17 01:29:48 +02:00
Christopher Bacher
d523a5c8e1
modules(pihole-container): expliclitly stop the container with podman
...
Currently the container often fails to startup again in a nixos-rebuild.
Maybe this is because the container lingers a bit after the systemd.service has already been stopped and the container from the restarted service can't be created.
The podman-stop command should delay the stopping of the service until the container is gone too.
2022-10-17 01:17:29 +02:00
Christopher Bacher
dde81d1e16
modules(pihole-container): add requires-dependency on network-online.target to systemd.service
2022-10-17 00:52:35 +02:00
Christopher Bacher
575c4ae0dc
modules(pihole-container): extend the description for port configuration on the host
2022-10-16 18:38:18 +02:00
Christopher Bacher
73aed13f87
modules(pihole-container): make newuidmap available to systemd service
...
See https://github.com/NixOS/nixpkgs/issues/138423
Potentially a security issue as `/run/wrappers/bin/` contains more commands often with suid bit set.
2022-10-15 21:50:59 +02:00
Christopher Bacher
41d400120d
modules(pihole-container): extract helper function to lib & restructure lets
2022-10-15 21:49:30 +02:00
Christopher Bacher
d15ee5c8fa
modules(pihole-container): add pihole systemd service description & option handling (dhcp still missing)
2022-10-14 01:34:29 +02:00
Christopher Bacher
c1ab2461ac
module(pihole-container): improve the module's options by adding better defaults and the environment variable names which are controlled by the options
2022-10-14 01:33:19 +02:00
Christopher Bacher
1a4551ff17
module(pihole-container): rename module to pihole
2022-10-09 19:57:58 +02:00
Christopher Bacher
7174f824d6
module(pihole-container): make it a module factory; WIP: start adding systemd service
...
The factory function returns the pihole module and allows to pass the flake itself to refer to its outputs.
2022-10-09 19:05:10 +02:00