From 8ea47e6d551ed382ac96072b18fe892bfa6ad20e Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Mon, 20 Feb 2023 13:45:06 +0100 Subject: [PATCH] add cups printers --- nixos/machines/cream/configuration.nix | 1 + nixos/machines/cream/cups.nix | 18 ++++++++++++++++++ nixos/machines/cream/packages.nix | 2 +- nixos/machines/sterni/packages.nix | 2 +- 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 nixos/machines/cream/cups.nix diff --git a/nixos/machines/cream/configuration.nix b/nixos/machines/cream/configuration.nix index c65dd02..85efc4d 100644 --- a/nixos/machines/cream/configuration.nix +++ b/nixos/machines/cream/configuration.nix @@ -10,6 +10,7 @@ ./packages.nix ./syncthing.nix ./tinc.nix + ./cups.nix #./wifi-access-point.nix #./wireshark.nix diff --git a/nixos/machines/cream/cups.nix b/nixos/machines/cream/cups.nix new file mode 100644 index 0000000..2a1100f --- /dev/null +++ b/nixos/machines/cream/cups.nix @@ -0,0 +1,18 @@ +{ + hardware.printers.ensurePrinters = [ + { + description = "Lexmark E350d"; + deviceUri = "usb://Lexmark/E350d?serial=622Z9ZC"; + location = "office"; + name = "Lexmark_E350d"; + model = "drv:///sample.drv/generic.ppd"; + ppdOptions = { + job-sheets = "none, none"; + media = "na_letter_8.5x11in"; + sides = "one-sided"; + }; + + } + + ]; +} diff --git a/nixos/machines/cream/packages.nix b/nixos/machines/cream/packages.nix index 6fd1fb2..5c0c0d6 100644 --- a/nixos/machines/cream/packages.nix +++ b/nixos/machines/cream/packages.nix @@ -2,7 +2,7 @@ let nextcloudSync = folder: let - password = "$( pass show home/nextcloud/palo/nextcloudcmd-token)"; + password = "$( ${pkgs.pass}/bin/pass show home/nextcloud/palo/nextcloudcmd-token )"; user = "palo"; in pkgs.writers.writeBashBin "nextcloud-sync-${folder}" '' diff --git a/nixos/machines/sterni/packages.nix b/nixos/machines/sterni/packages.nix index 6fd1fb2..5c0c0d6 100644 --- a/nixos/machines/sterni/packages.nix +++ b/nixos/machines/sterni/packages.nix @@ -2,7 +2,7 @@ let nextcloudSync = folder: let - password = "$( pass show home/nextcloud/palo/nextcloudcmd-token)"; + password = "$( ${pkgs.pass}/bin/pass show home/nextcloud/palo/nextcloudcmd-token )"; user = "palo"; in pkgs.writers.writeBashBin "nextcloud-sync-${folder}" ''