mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-06 17:57:50 +00:00
[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:
parent
21747d37a7
commit
6771dd826f
1 changed files with 16 additions and 5 deletions
21
services.nix
21
services.nix
|
|
@ -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 = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue