summary refs log tree commit diff
path: root/host/Rory-desktop/printing.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--host/Rory-desktop/printing.nix51
1 files changed, 51 insertions, 0 deletions
diff --git a/host/Rory-desktop/printing.nix b/host/Rory-desktop/printing.nix
new file mode 100644
index 0000000..fd33aaa
--- /dev/null
+++ b/host/Rory-desktop/printing.nix
@@ -0,0 +1,51 @@
+{ config, pkgs, lib, ... }:
+
+{
+  imports = [ ];
+
+  users.users = {
+    Rory = {
+      extraGroups = [ "lp" "scanner" ];
+    };
+  };
+
+  environment.systemPackages = with pkgs; [
+    xsane
+    gnome.simple-scan
+  ];
+
+  hardware = {
+    sane.enable = true;
+    sane.extraBackends = [ pkgs.hplipWithPlugin pkgs.sane-airscan ];
+  };
+
+  programs.system-config-printer.enable = true;
+
+  services = {
+    gvfs.enable = true;
+    saned.enable = true;
+    system-config-printer.enable = true;
+    ipp-usb.enable = true;
+    printing = {
+      enable = true;
+      browsing = true;
+      drivers = with pkgs; [ hplip ];
+    };
+    avahi = {
+      enable = true;
+      nssmdns = true;
+      reflector = true;
+      publish = {
+        workstation = true;
+        userServices = true;
+        hinfo = true;
+        enable = true;
+        domain = true;
+        addresses = true;
+      };
+    };
+  };
+
+  system.stateVersion = "22.11"; # DO NOT EDIT!
+}
+