mirror of
https://github.com/ItsDrike/nixdots
synced 2025-07-01 10:10:43 +00:00
Add workstation-specific settings
This commit is contained in:
parent
fca6296841
commit
27b0d375f2
18 changed files with 258 additions and 9 deletions
27
system/roles/workstation/services/printing.nix
Normal file
27
system/roles/workstation/services/printing.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ config, lib, pkgs, ... }: let
|
||||
inherit (lib) mkIf;
|
||||
|
||||
cfg = config.myOptions.workstation.printing;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
# enable cups and add some drivers for common printers
|
||||
services = {
|
||||
printing = {
|
||||
enable = true;
|
||||
drivers = with pkgs; [
|
||||
gutenprint
|
||||
hplip
|
||||
];
|
||||
};
|
||||
|
||||
# required for network discovery of printers
|
||||
avahi = {
|
||||
enable = true;
|
||||
# resolve .local domains for printers
|
||||
nssmdns4 = true;
|
||||
# open the avahi port(s) in the firewall
|
||||
openFirewall = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue