From d030aae27223659504eee9775f22755eda0fe5d1 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 26 Apr 2023 18:41:02 +0200 Subject: ma wbob: add brother ql-800 --- makefu/2configs/bureautomation/printer.nix | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 makefu/2configs/bureautomation/printer.nix (limited to 'makefu/2configs/bureautomation') diff --git a/makefu/2configs/bureautomation/printer.nix b/makefu/2configs/bureautomation/printer.nix new file mode 100644 index 000000000..f0cf495ef --- /dev/null +++ b/makefu/2configs/bureautomation/printer.nix @@ -0,0 +1,25 @@ +{ pkgs, config, ... }: +let + mainUser = config.krebs.build.user.name; +in { + services.printing = { + enable = true; + drivers = with pkgs;[ + brlaser + cups-ptouch + ]; + }; + users.users.kiosk.extraGroups = [ "scanner" "lp" ]; + state = [ "/var/lib/cups"]; + users.users.kiosk.packages = with pkgs;[ + python3Packages.brother-ql + libreoffice + qrencode + imagemagick + ]; + + services.udev.extraRules = '' + SUBSYSTEMS=="usb", ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="209b", ATTRS{serial}=="000F1Z401759", MODE="0664", GROUP="lp", SYMLINK+="usb/lp0" + ''; + +} -- cgit v1.2.3 From 447b4931439670b566b9cd26e36b8b11de6f7209 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 29 Apr 2023 21:11:06 +0200 Subject: ma wbob.r: add Brother QL-800 + ui --- makefu/2configs/bureautomation/brother-ql-web.nix | 23 +++++++++++++++++++++++ makefu/2configs/bureautomation/printer.nix | 3 +++ 2 files changed, 26 insertions(+) create mode 100644 makefu/2configs/bureautomation/brother-ql-web.nix (limited to 'makefu/2configs/bureautomation') diff --git a/makefu/2configs/bureautomation/brother-ql-web.nix b/makefu/2configs/bureautomation/brother-ql-web.nix new file mode 100644 index 000000000..26887db03 --- /dev/null +++ b/makefu/2configs/bureautomation/brother-ql-web.nix @@ -0,0 +1,23 @@ + {pkgs, ... }: + let + pkg = pkgs.brother_ql_web; + in { + systemd.services.brother-ql-web = { + after = [ "network.target" ]; + description = "Brother QL Web Interface"; + wantedBy = [ "multi-user.target" ]; + environment = { + FLASK_PRINTER = "usb://0x04f9:0x209b/000F1Z401759"; + FLASK_MODEL = "QL-800"; + #FLASK_SERVER_PORT = "8013"; + #FLASK_LABEL_DEFAULT_SIZE = "d24"; + #FLASK_LABEL_DEFAULT_QR_SIZE = "7"; + }; + serviceConfig = { + ExecStart = "${pkg}/bin/brother_ql_web"; + DynamicUser = true; + SupplementaryGroups = "lp"; + Restart = "always"; + }; + }; +} diff --git a/makefu/2configs/bureautomation/printer.nix b/makefu/2configs/bureautomation/printer.nix index f0cf495ef..86d5a4069 100644 --- a/makefu/2configs/bureautomation/printer.nix +++ b/makefu/2configs/bureautomation/printer.nix @@ -2,6 +2,9 @@ let mainUser = config.krebs.build.user.name; in { + imports = [ + ./brother-ql-web.nix + ]; services.printing = { enable = true; drivers = with pkgs;[ -- cgit v1.2.3