add printing module
This commit is contained in:
parent
a0f4793ee1
commit
c9463663b4
2 changed files with 28 additions and 0 deletions
|
@ -24,5 +24,6 @@
|
||||||
./plymouth
|
./plymouth
|
||||||
# vpn
|
# vpn
|
||||||
./wireguard
|
./wireguard
|
||||||
|
./printing
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
27
modules/desktop/printing/default.nix
Normal file
27
modules/desktop/printing/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.modules.desktop.printing;
|
||||||
|
in {
|
||||||
|
options.modules.desktop.printing = {
|
||||||
|
enable = mkEnableOption false;
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
# enable printing itself
|
||||||
|
services.printing.enable = true;
|
||||||
|
|
||||||
|
# autodiscovery of printers
|
||||||
|
services.avahi = {
|
||||||
|
enable = true;
|
||||||
|
nssmdns = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue