From 06996377f6ebd7eea3ccbd95dc40445da193fff5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Schr=C3=B6ter?= Date: Wed, 7 Jun 2023 12:03:33 +0200 Subject: [PATCH] feat(system): add home printer config --- home-pc.nix | 1 + system/desktop.nix | 6 +----- system/printing/default.nix | 7 +++++++ system/printing/home.nix | 14 ++++++++++++++ work-pc.nix | 1 + 5 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 system/printing/default.nix create mode 100644 system/printing/home.nix diff --git a/home-pc.nix b/home-pc.nix index f2459c2..e3f1854 100644 --- a/home-pc.nix +++ b/home-pc.nix @@ -8,6 +8,7 @@ ./hardware/steam.nix ./hardware/ledger.nix ./system/desktop.nix + ./system/printing/home.nix ./system/gaming.nix ./desktop ./virtualisation/libvirt.nix diff --git a/system/desktop.nix b/system/desktop.nix index e6fd5f5..7d21b72 100644 --- a/system/desktop.nix +++ b/system/desktop.nix @@ -1,9 +1,5 @@ { config, pkgs, ... }: { - imports = [ ./common.nix ./fonts.nix ./sound.nix ./vpn.nix ]; - - services.printing.enable = true; - services.avahi.enable = true; - services.avahi.nssmdns = true; + imports = [ ./common.nix ./fonts.nix ./sound.nix ./vpn.nix ./printing ]; } diff --git a/system/printing/default.nix b/system/printing/default.nix new file mode 100644 index 0000000..b75c03a --- /dev/null +++ b/system/printing/default.nix @@ -0,0 +1,7 @@ +{ config, pkgs, ... }: + +{ + services.printing.enable = true; + services.avahi.enable = true; + services.avahi.nssmdns = true; +} diff --git a/system/printing/home.nix b/system/printing/home.nix new file mode 100644 index 0000000..1cf627e --- /dev/null +++ b/system/printing/home.nix @@ -0,0 +1,14 @@ +{ config, pkgs, ... }: + +{ + hardware.printers = { + ensureDefaultPrinter = "Brother_HL-L2370DN"; + ensurePrinters = [{ + name = "Brother_HL-L2370DN"; + description = "Brother HL-L2370DN"; + deviceUri = + "dnssd://Brother%20HL-L2370DN%20series._ipp._tcp.local/?uuid=e3248000-80ce-11db-8000-b422007e1490"; + model = "everywhere"; + }]; + }; +} diff --git a/work-pc.nix b/work-pc.nix index 3aa5c58..9e9b6d2 100644 --- a/work-pc.nix +++ b/work-pc.nix @@ -6,6 +6,7 @@ ./hardware/gpu-intel.nix ./hardware/bluetooth.nix ./system/desktop.nix + ./system/printing/home.nix ./desktop ./virtualisation/podman.nix ];