[Services] Avahi: improve quality of life (especially with printer sharing and auto-detection)

Signed-off-by: Antoine Viallon <antoine@lesviallon.fr>
This commit is contained in:
Antoine Viallon 2022-03-25 02:49:43 +01:00
parent 21747d37a7
commit 6771dd826f
Signed by: aviallon
GPG key ID: 186FC35EDEB25716

View file

@ -3,6 +3,7 @@ with lib;
let let
cfg = config.aviallon.services; cfg = config.aviallon.services;
desktopCfg = config.aviallon.desktop; desktopCfg = config.aviallon.desktop;
laptopCfg = config.aviallon.laptop;
generalCfg = config.aviallon.general; generalCfg = config.aviallon.general;
journaldConfigValue = value: journaldConfigValue = value:
@ -85,7 +86,7 @@ in {
# cups-kyocera-ecosys-m552x-p502x # cups-kyocera-ecosys-m552x-p502x
canon-cups-ufr2 canon-cups-ufr2
]; ];
webInterface = mkDefault false; webInterface = mkDefault true;
}; };
hardware.sane = mkIf desktopCfg.enable { hardware.sane = mkIf desktopCfg.enable {
@ -183,10 +184,20 @@ in {
# SmartCards # SmartCards
services.pcscd.enable = true; services.pcscd.enable = true;
services.avahi.enable = true; # .lan/.local resolution services.avahi = {
services.avahi.nssmdns = true; # .lan/.local resolution enable = true; # .lan/.local resolution
services.avahi.publish.enable = true; nssmdns = true; # .lan/.local resolution
services.avahi.publish.hinfo = true; # Whether to register a mDNS HINFO record which contains information about the local operating system and CPU. openFirewall = true;
reflector = true;
publish = {
enable = true;
domain = true;
userServices = true;
addresses = true;
workstation = mkDefault (desktopCfg.enable && !laptopCfg.enable);
hinfo = true; # Whether to register a mDNS HINFO record which contains information about the local operating system and CPU.
};
};
services.nginx = { services.nginx = {