1
0
Fork 0
mirror of https://git.sr.ht/~roxwize/.dotfiles synced 2025-03-13 16:03:25 +00:00
.dotfiles/nixos/docker/pihole/default.nix
2025-03-07 21:13:38 -05:00

23 lines
No EOL
545 B
Nix

{ pkgs, lib, config, ... }: let
cfg = config.r5e.containers.pihole;
in with lib; {
options.r5e.containers.pihole = {
enable = mkEnableOption "pihole";
api-password = mkOption {
type = types.string;
default = "";
};
};
config = mkIf cfg.enable mkMerge [
(import ./docker-compose.nix { inherit pkgs lib; })
{
virtualisation.oci-containers.containers.pihole = {
environment = {
TZ = config.time.timeZone;
FTLCONF_webserver_api_password = mkIf (cfg.api-password != null) cfg.api-password;
};
};
}
];
}