diff options
author | Franck Cuny <franck@fcuny.net> | 2023-05-10 18:27:57 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2023-05-10 18:27:57 -0700 |
commit | ca5e03a4e9c2346a42a3287f054eb96119da6b9c (patch) | |
tree | 4bb1444cf989436632a90c08be4885aa734e44ec | |
parent | profiles/git-server: fix path for the backup (diff) | |
download | world-ca5e03a4e9c2346a42a3287f054eb96119da6b9c.tar.gz |
hosts/tahoe: move avahi configuration here
Diffstat (limited to '')
-rw-r--r-- | hosts/carmel/default.nix | 10 | ||||
-rw-r--r-- | hosts/carmel/services.nix | 6 | ||||
-rw-r--r-- | modules/services/avahi/default.nix | 24 | ||||
-rw-r--r-- | modules/services/default.nix | 1 |
4 files changed, 10 insertions, 31 deletions
diff --git a/hosts/carmel/default.nix b/hosts/carmel/default.nix index 1006f1e..8c68e20 100644 --- a/hosts/carmel/default.nix +++ b/hosts/carmel/default.nix @@ -11,6 +11,16 @@ "${self}/profiles/nginx.nix" ]; + services.avahi = { + enable = true; + # Important to resolve .local domains of printers, otherwise you get an error + # like "Impossible to connect to XXX.local: Name or service not known" + nssmdns = true; + reflector = true; + interfaces = [ "mgmt0" "iot" ]; + openFirewall = true; + }; + # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave diff --git a/hosts/carmel/services.nix b/hosts/carmel/services.nix index 4c17fd8..bde7523 100644 --- a/hosts/carmel/services.nix +++ b/hosts/carmel/services.nix @@ -4,12 +4,6 @@ node-exporter.enable = true; promtail.enable = true; }; - - avahi = { - enable = true; - withReflector = true; - interfaces = [ "mgmt0" "iot" ]; - }; }; services.dnsmasq = { diff --git a/modules/services/avahi/default.nix b/modules/services/avahi/default.nix deleted file mode 100644 index 3a6eb58..0000000 --- a/modules/services/avahi/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ config, pkgs, lib, ... }: -let cfg = config.my.services.avahi; -in -{ - options.my.services.avahi = with lib; { - enable = mkEnableOption "avahi service"; - withReflector = mkEnableOption "enable reflector"; - interfaces = mkOption { - type = types.nullOr (types.listOf types.str); - default = null; - description = "List of network interfaces that should be used by the {command}`avahi-daemon`."; - }; - }; - - config = lib.mkIf cfg.enable { - services.avahi.enable = true; - # Important to resolve .local domains of printers, otherwise you get an error - # like "Impossible to connect to XXX.local: Name or service not known" - services.avahi.nssmdns = true; - - services.avahi.reflector = cfg.withReflector; - services.avahi.interfaces = cfg.interfaces; - }; -} diff --git a/modules/services/default.nix b/modules/services/default.nix index 4b2dcba..d04e5cf 100644 --- a/modules/services/default.nix +++ b/modules/services/default.nix @@ -2,7 +2,6 @@ { imports = [ - ./avahi ./backup ./monitoring ./samba |