about summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/services/avahi/default.nix14
-rw-r--r--modules/services/default.nix1
2 files changed, 15 insertions, 0 deletions
diff --git a/modules/services/avahi/default.nix b/modules/services/avahi/default.nix
new file mode 100644
index 0000000..bef6b17
--- /dev/null
+++ b/modules/services/avahi/default.nix
@@ -0,0 +1,14 @@
+{ config, pkgs, lib, ... }:
+let cfg = config.my.services.avahi;
+in {
+  options.my.services.avahi = with lib; {
+    enable = mkEnableOption "avahi service";
+  };
+
+  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;
+  };
+}
diff --git a/modules/services/default.nix b/modules/services/default.nix
index 38b6a6b..a6219e0 100644
--- a/modules/services/default.nix
+++ b/modules/services/default.nix
@@ -2,6 +2,7 @@
 
 {
   imports = [
+    ./avahi
     ./fwupd
     ./gitea
     ./gnome