From 9940561ffb754b24c41d3e8d51346166ad970feb Mon Sep 17 00:00:00 2001 From: Silas Schöffel Date: Sun, 29 Dec 2024 23:17:43 +0100 Subject: modules/printing: init --- modules/nixos/sils/default.nix | 1 + modules/nixos/sils/printing.nix | 22 ++++++++++++++++++++++ modules/nixos/sils/roles.nix | 3 +++ sys/services/default.nix | 1 - sys/services/printing/default.nix | 12 ------------ 5 files changed, 26 insertions(+), 13 deletions(-) create mode 100644 modules/nixos/sils/printing.nix delete mode 100644 sys/services/printing/default.nix 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; - }; - }; -} -- cgit 1.4.1