summaryrefslogtreecommitdiff
path: root/sys/hardware/printing.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sys/hardware/printing.nix15
1 files changed, 9 insertions, 6 deletions
diff --git a/sys/hardware/printing.nix b/sys/hardware/printing.nix
index 30c6962..e11a016 100644
--- a/sys/hardware/printing.nix
+++ b/sys/hardware/printing.nix
@@ -1,15 +1,18 @@
-{ config, lib, ... }:
+{
+ config,
+ lib,
+ ...
+}:
with lib; let
cfg = config.local.hardware.printing;
inherit (config.local.net) dhcpInterface;
-in
-{
+in {
options.local.hardware.printing = {
enable = mkEnableOption "print and scan services";
users = mkOption {
type = with types; listOf str;
- default = [ ];
+ default = [];
};
};
@@ -32,7 +35,7 @@ in
hardware.sane.enable = true;
networking.firewall.interfaces = mkIf (dhcpInterface != null) {
- ${dhcpInterface}.allowedUDPPorts = [ 5353 ];
+ ${dhcpInterface}.allowedUDPPorts = [5353];
};
services.printing.enable = true;
@@ -40,7 +43,7 @@ in
users.users = listToAttrs (map
(user: {
name = user;
- value.extraGroups = [ "scanner" "lp" ];
+ value.extraGroups = ["scanner" "lp"];
})
cfg.users);
};