fix: printing and scanning setup on pie

This commit is contained in:
Benjamin Bädorf 2023-10-11 14:32:40 +02:00
parent 0ea7f9fb50
commit d936aca698
No known key found for this signature in database
GPG key ID: 4406E80E13CD656C
2 changed files with 3 additions and 5 deletions

View file

@ -12,7 +12,6 @@ with lib; let
dataDir = "${xdg.dataHome}/Paperless"; dataDir = "${xdg.dataHome}/Paperless";
backupDir = "${xdg.dataHome}/PaperlessBackup"; backupDir = "${xdg.dataHome}/PaperlessBackup";
consumptionDir = "/home/${psCfg.user.name}/.local/share/scandir"; consumptionDir = "/home/${psCfg.user.name}/.local/share/scandir";
scannerDefaultDevice = "hp3900:libusb:005:004";
in { in {
services.paperless = { services.paperless = {
enable = true; enable = true;
@ -41,11 +40,9 @@ in {
home-manager.users."${psCfg.user.name}" = { home-manager.users."${psCfg.user.name}" = {
home.sessionVariables = { home.sessionVariables = {
SCANNER_DEFAULT_DEVICE = scannerDefaultDevice;
SCANNER_OUTPUT_DIR = consumptionDir; SCANNER_OUTPUT_DIR = consumptionDir;
}; };
systemd.user.sessionVariables = { systemd.user.sessionVariables = {
SCANNER_DEFAULT_DEVICE = scannerDefaultDevice;
SCANNER_OUTPUT_DIR = consumptionDir; SCANNER_OUTPUT_DIR = consumptionDir;
}; };
}; };

View file

@ -18,8 +18,9 @@
services.printing.drivers = [ services.printing.drivers = [
pkgs.gutenprint pkgs.gutenprint
pkgs.cups-brother-hl3140cw ] ++ (if (pkgs.system == "x86_64-linux")
]; then [ pkgs.cups-brother-hl3140cw ]
else []);
networking.hosts = flake.self.lib.addLocalHostname ["cups.local"]; networking.hosts = flake.self.lib.addLocalHostname ["cups.local"];