mirror of
https://git.sr.ht/~roxwize/.dotfiles
synced 2025-05-07 22:23:07 +00:00
~
This commit is contained in:
parent
41fe95e9b1
commit
923a163786
5 changed files with 147 additions and 48 deletions
23
nixos/docker/pihole/default.nix
Normal file
23
nixos/docker/pihole/default.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ 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;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue