avahi.nix (443B)
1 { config, lib, pkgs, ... }: 2 3 with lib; 4 let 5 cfg = config.profiles.avahi; 6 in 7 { 8 options = { 9 profiles.avahi = { 10 enable = mkEnableOption "Enable avahi profile"; 11 }; 12 }; 13 config = mkIf cfg.enable { 14 services = { 15 avahi = { 16 enable = true; 17 ipv4 = true; 18 ipv6 = true; 19 nssmdns = true; 20 publish = { 21 enable = true; 22 userServices = true; 23 }; 24 }; 25 }; 26 }; 27 }