diff --git a/hosts/nullbox/configuration.nix b/hosts/nullbox/configuration.nix index 1b6260f..eb72225 100644 --- a/hosts/nullbox/configuration.nix +++ b/hosts/nullbox/configuration.nix @@ -12,7 +12,6 @@ ./hardware-configuration.nix # Encryption ./luks.nix - ./unbound.nix ]; config = { @@ -52,6 +51,7 @@ nixfiles = { profile.pc.enable = true; programs.adb.enable = true; + programs.unbound.enable = true; common.remoteAccess.enable = true; sessions.plasma.enable = lib.mkDefault false; sessions.hyprland.enable = lib.mkDefault true; diff --git a/hosts/slab/configuration.nix b/hosts/slab/configuration.nix index e9cc5c0..ebf6b5e 100644 --- a/hosts/slab/configuration.nix +++ b/hosts/slab/configuration.nix @@ -66,6 +66,7 @@ sessions.plasma.enable = lib.mkDefault false; programs = { adb.enable = true; + unbound.enable = true; }; }; diff --git a/system/programs/default.nix b/system/programs/default.nix index 29639a9..37d66aa 100644 --- a/system/programs/default.nix +++ b/system/programs/default.nix @@ -3,5 +3,6 @@ imports = [ ./syncthing.nix ./android.nix + ./unbound.nix ]; } diff --git a/system/programs/unbound.nix b/system/programs/unbound.nix new file mode 100644 index 0000000..192f201 --- /dev/null +++ b/system/programs/unbound.nix @@ -0,0 +1,14 @@ +{ pkgs, lib, config, ... }: +let + cfg = config.nixfiles.programs.unbound; +in +{ + options.nixfiles.programs.unbound = { + enable = lib.mkEnableOption "unbound DNS server configuration"; + }; + + config = lib.mkIf cfg.enable { + networking.networkmanager.dns = "none"; + services.unbound.enable = true; + }; +}