modularize Unbound config and add to slab
This commit is contained in:
parent
97d08df97a
commit
b3664ac63f
@ -12,7 +12,6 @@
|
|||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
# Encryption
|
# Encryption
|
||||||
./luks.nix
|
./luks.nix
|
||||||
./unbound.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
@ -52,6 +51,7 @@
|
|||||||
nixfiles = {
|
nixfiles = {
|
||||||
profile.pc.enable = true;
|
profile.pc.enable = true;
|
||||||
programs.adb.enable = true;
|
programs.adb.enable = true;
|
||||||
|
programs.unbound.enable = true;
|
||||||
common.remoteAccess.enable = true;
|
common.remoteAccess.enable = true;
|
||||||
sessions.plasma.enable = lib.mkDefault false;
|
sessions.plasma.enable = lib.mkDefault false;
|
||||||
sessions.hyprland.enable = lib.mkDefault true;
|
sessions.hyprland.enable = lib.mkDefault true;
|
||||||
|
@ -66,6 +66,7 @@
|
|||||||
sessions.plasma.enable = lib.mkDefault false;
|
sessions.plasma.enable = lib.mkDefault false;
|
||||||
programs = {
|
programs = {
|
||||||
adb.enable = true;
|
adb.enable = true;
|
||||||
|
unbound.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3,5 +3,6 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./syncthing.nix
|
./syncthing.nix
|
||||||
./android.nix
|
./android.nix
|
||||||
|
./unbound.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
14
system/programs/unbound.nix
Normal file
14
system/programs/unbound.nix
Normal file
@ -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;
|
||||||
|
};
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user