Migrate to Snowfall (#1)
Reviewed-on: #1 Co-authored-by: Evan Reichard <evan@reichard.io> Co-committed-by: Evan Reichard <evan@reichard.io>
This commit was merged in pull request #1.
This commit is contained in:
33
modules/nixos/services/avahi/default.nix
Normal file
33
modules/nixos/services/avahi/default.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{ config, lib, namespace, ... }:
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
|
||||
cfg = config.${namespace}.services.avahi;
|
||||
in
|
||||
{
|
||||
options.${namespace}.services.avahi = {
|
||||
enable = lib.mkEnableOption "Avahi";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
publish = {
|
||||
enable = true;
|
||||
addresses = true;
|
||||
domain = true;
|
||||
hinfo = true;
|
||||
userServices = true;
|
||||
workstation = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Cloud Init
|
||||
systemd.services.avahi-daemon = mkIf config.${namespace}.services.cloud-init.enable {
|
||||
after = [ "cloud-final.service" ];
|
||||
requires = [ "cloud-final.service" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user