summary refs log tree commit diff stats
path: root/modules/nixos
diff options
context:
space:
mode:
Diffstat (limited to 'modules/nixos')
-rw-r--r--modules/nixos/sils/default.nix1
-rw-r--r--modules/nixos/sils/printing.nix22
-rw-r--r--modules/nixos/sils/roles.nix3
3 files changed, 26 insertions, 0 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;
     }