about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-04-08 16:48:31 -0700
committerFranck Cuny <franck@fcuny.net>2022-04-08 16:48:31 -0700
commit11a80a7c44d1d69726daf4bb6ee3471ea1d68483 (patch)
tree27377f35b6a73f9f9040d8ec5567d7b7e91e0112 /modules
parentusers: add myself to "cdrom" group (diff)
downloadworld-11a80a7c44d1d69726daf4bb6ee3471ea1d68483.tar.gz
services: add avahi
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