restructured containers object

This commit is contained in:
Leyla Becker 2024-09-24 18:43:32 -05:00
parent 6fc22b8214
commit aaa7f0aa3d

View file

@ -97,25 +97,27 @@
oci-containers = { oci-containers = {
backend = "podman"; backend = "podman";
containers.pihole = let containers = {
passwordFileLocation = "/var/lib/pihole/webpassword.txt"; pihole = let
in { passwordFileLocation = "/var/lib/pihole/webpassword.txt";
image = config.apps.pihole.image; in {
volumes = [ image = config.apps.pihole.image;
"/home/pihole:/etc/pihole:rw" # TODO; set this based on configs and bond with tmpfiles.rules volumes = [
"${config.sops.secrets."services/pi-hole".path}:${passwordFileLocation}" "/home/pihole:/etc/pihole:rw" # TODO; set this based on configs and bond with tmpfiles.rules
]; "${config.sops.secrets."services/pi-hole".path}:${passwordFileLocation}"
environment = { ];
TZ = config.time.timeZone; environment = {
WEBPASSWORD_FILE = passwordFileLocation; TZ = config.time.timeZone;
PIHOLE_UID = toString config.users.users.pihole.uid; WEBPASSWORD_FILE = passwordFileLocation;
PIHOLE_GID = toString config.users.groups.pihole.gid; PIHOLE_UID = toString config.users.users.pihole.uid;
PIHOLE_GID = toString config.users.groups.pihole.gid;
};
log-driver = "journald";
extraOptions = [
"--ip=${config.apps.pihole.ip}"
"--network=macvlan"
];
}; };
log-driver = "journald";
extraOptions = [
"--ip=${config.apps.pihole.ip}"
"--network=macvlan"
];
}; };
}; };
}; };