diff options
author | Silas Schöffel <sils@sils.li> | 2024-12-29 23:17:43 +0100 |
---|---|---|
committer | Silas Schöffel <sils@sils.li> | 2024-12-29 23:17:43 +0100 |
commit | 9940561ffb754b24c41d3e8d51346166ad970feb (patch) | |
tree | e27a218bc43a93f3574bff9a2fbda6f0fbd8d727 | |
parent | printing: add hplip driver (diff) | |
download | nix-config-9940561ffb754b24c41d3e8d51346166ad970feb.zip |
modules/printing: init
-rw-r--r-- | modules/nixos/sils/default.nix | 1 | ||||
-rw-r--r-- | modules/nixos/sils/printing.nix | 22 | ||||
-rw-r--r-- | modules/nixos/sils/roles.nix | 3 | ||||
-rw-r--r-- | sys/services/default.nix | 1 | ||||
-rw-r--r-- | sys/services/printing/default.nix | 12 |
5 files changed, 26 insertions, 13 deletions
diff --git a/modules/nixos/sils/default.nix b/modules/nixos/sils/default.nix index 5a45ecc..0f714f7 100644 --- a/modules/nixos/sils/default.nix +++ b/modules/nixos/sils/default.nix @@ -17,6 +17,7 @@ ./nix.nix ./pamconfig.nix ./plymouth.nix + ./printing.nix ./roles.nix ./sudo.nix ./sway.nix diff --git a/modules/nixos/sils/printing.nix b/modules/nixos/sils/printing.nix new file mode 100644 index 0000000..cdf31f9 --- /dev/null +++ b/modules/nixos/sils/printing.nix @@ -0,0 +1,22 @@ +{ + config, + lib, + pkgs, + ... +}: let + cfg = config.sils.printing; +in { + options.sils.printing.enable = lib.mkEnableOption "printing configuration"; + config = lib.mkIf cfg.enable { + services = { + printing = { + enable = true; + drivers = with pkgs; [epson-escpr hplip]; + }; + avahi = { + enable = true; + openFirewall = true; + }; + }; + }; +} diff --git a/modules/nixos/sils/roles.nix b/modules/nixos/sils/roles.nix index 1ea8748..cca3cf6 100644 --- a/modules/nixos/sils/roles.nix +++ b/modules/nixos/sils/roles.nix @@ -23,6 +23,7 @@ in { nix-config.enable = lib.mkDefault true; pamconfig.enable = lib.mkDefault true; plymouth.enable = lib.mkDefault true; + printing.enable = lib.mkDefault true; sway.enable = lib.mkDefault false; theming.enable = lib.mkDefault true; } @@ -43,6 +44,7 @@ in { nix-config.enable = lib.mkDefault true; pamconfig.enable = lib.mkDefault true; plymouth.enable = lib.mkDefault false; + printing.enable = lib.mkDefault true; sway.enable = lib.mkDefault false; theming.enable = lib.mkDefault true; } @@ -65,6 +67,7 @@ in { nix-config.enable = lib.mkDefault true; pamconfig.enable = lib.mkDefault true; plymouth.enable = lib.mkDefault false; + printing.enable = lib.mkDefault true; sway.enable = lib.mkDefault false; theming.enable = lib.mkDefault true; } diff --git a/sys/services/default.nix b/sys/services/default.nix index 0b0ba3b..7546fcc 100644 --- a/sys/services/default.nix +++ b/sys/services/default.nix @@ -4,7 +4,6 @@ ./greetd ./logind ./openssh - ./printing ./restic ./tlp ./udev diff --git a/sys/services/printing/default.nix b/sys/services/printing/default.nix deleted file mode 100644 index c2a391d..0000000 --- a/sys/services/printing/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{pkgs, ...}: { - services = { - printing = { - enable = true; - drivers = with pkgs; [epson-escpr hplip]; - }; - avahi = { - enable = true; - openFirewall = true; - }; - }; -} |