From a02ee67ecc3a4970d771b88c03b69394c606aa49 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Sun, 28 Jun 2026 07:40:05 +0200 Subject: feat: set up printer --- nixos/hosts/ev/default.nix | 20 ++++++++++++++++++++ nixos/hosts/hamac/default.nix | 4 ++++ nixos/profiles/workstation/default.nix | 1 + 3 files changed, 25 insertions(+) (limited to 'nixos') diff --git a/nixos/hosts/ev/default.nix b/nixos/hosts/ev/default.nix index 7fcc724..9aa785c 100644 --- a/nixos/hosts/ev/default.nix +++ b/nixos/hosts/ev/default.nix @@ -193,6 +193,26 @@ in musicDir = "/mnt/personal/music"; }; + services.printing = { + enable = true; + listenAddresses = ["*:631"]; + allowFrom = ["all"]; + }; + hardware.printers = { + ensurePrinters = [ + { + name = "Brother"; + description = "Brother HL-L2340D series"; + deviceUri = "ipp://192.168.178.3/ipp/print"; + model = "everywhere"; # IPP Everywhere - no driver needed + ppdOptions = { + PageSize = "A4"; + }; + } + ]; + ensureDefaultPrinter = "Brother"; + }; + qbittorrent = { user = "library"; webUiPort = ports.qbittorrent; diff --git a/nixos/hosts/hamac/default.nix b/nixos/hosts/hamac/default.nix index 0815373..f258606 100644 --- a/nixos/hosts/hamac/default.nix +++ b/nixos/hosts/hamac/default.nix @@ -27,6 +27,10 @@ in time.timeZone = "Europe/Vienna"; + environment.etc."cups/client.conf".text = '' + ServerName ev + ''; + # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave diff --git a/nixos/profiles/workstation/default.nix b/nixos/profiles/workstation/default.nix index e5c2437..d9f42fd 100644 --- a/nixos/profiles/workstation/default.nix +++ b/nixos/profiles/workstation/default.nix @@ -88,6 +88,7 @@ in ''; }) restic + cups skim unzip -- cgit v1.3.1