diff --git a/hosts/chocolatebar/chocolatebar.nix b/hosts/chocolatebar/chocolatebar.nix index e8fddf4..6de9a7c 100644 --- a/hosts/chocolatebar/chocolatebar.nix +++ b/hosts/chocolatebar/chocolatebar.nix @@ -75,6 +75,10 @@ in { pkgs.cups-brother-hl3140cw ]; + services.udev.extraRules = '' + SUBSYSTEMS=="usb", ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="209e", ATTRS{serial}=="000W0H924252", MODE="0664", GROUP="lp", SYMLINK+="usb/lp0" + ''; + home-manager.users."${psCfg.user.name}" = { xdg.configFile = mkIf psCfg.sway.enable { "sway/config.d/10-autostart.conf".source = ./.config/sway/config.d/autostart.conf; diff --git a/modules/printing/default.nix b/modules/printing/default.nix index 168df5f..2dc9d03 100644 --- a/modules/printing/default.nix +++ b/modules/printing/default.nix @@ -27,7 +27,6 @@ in { ]; hardware.sane = { enable = true; - brscan4.enable = true; extraBackends = [pkgs.hplipWithPlugin]; }; }; diff --git a/pkgs/print-label.nix b/pkgs/print-label.nix new file mode 100644 index 0000000..130a255 --- /dev/null +++ b/pkgs/print-label.nix @@ -0,0 +1,6 @@ +self: +with self; '' + TMPDIR=${coreutils}/bin/mktemp + echo "ASN#$1" > "$TMPDIR/input.txt" + ${imagemagick}/bin/convert -size 696x64 xc:white -font "FreeMono" -pointsize 48 -fill black -annotate +16+48 "@$TMPDIR/input.txt" test.png +''