pie/paperless: align img2pdf versions

This commit is contained in:
Benjamin Bädorf 2024-01-29 23:02:05 +01:00
parent 37970d9b58
commit 6783226919
No known key found for this signature in database
GPG key ID: 1B7BF5B77A521346
5 changed files with 42 additions and 36 deletions

View file

@ -36,7 +36,7 @@ with lib; let
done done
pdf="${consumptionDir}/$NAME.pdf" pdf="${consumptionDir}/$NAME.pdf"
${python39Packages.img2pdf}/bin/img2pdf --output $pdf ''${files[@]} ${python3Packages.img2pdf}/bin/img2pdf --output $pdf ''${files[@]}
echo "PDF written to $pdf" echo "PDF written to $pdf"
''; '';
@ -63,7 +63,6 @@ in {
users.users."${psCfg.user.name}".packages = with pkgs; [ users.users."${psCfg.user.name}".packages = with pkgs; [
scan2paperless scan2paperless
sane-backends sane-backends
python310Packages.img2pdf
]; ];
home-manager.users."${psCfg.user.name}" = { home-manager.users."${psCfg.user.name}" = {

View file

@ -8,21 +8,25 @@ with lib; let
psCfg = config.pub-solar; psCfg = config.pub-solar;
xdg = config.home-manager.users."${psCfg.user.name}".xdg; xdg = config.home-manager.users."${psCfg.user.name}".xdg;
in { in {
boot.plymouth.enable = true;
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.plymouth.enable = true;
boot.initrd.preLVMCommands = "udevadm trigger --settle";
boot.swraid.enable = true;
boot.swraid.mdadmConf = ''
DEVICE /dev/nvme0n1p2 /dev/nvme1n1p2
ARRAY /dev/md/nixos:root metadata=1.2 name=nixos:root UUID=67d1aa81:1b348887:c17a75e8:f2edf2bd
'';
pub-solar.core.disk-encryption-active = false; pub-solar.core.disk-encryption-active = false;
pub-solar.core.hibernation.enable = true;
pub-solar.core.hibernation.resumeDevice = "/dev/mapper/vg0-swap";
pub-solar.core.hibernation.enable = false;
pub-solar.core.hibernation.resumeDevice = "/dev/dm-0";
pub-solar.core.hibernation.resumeOffset = 15296512;
pub-solar.terminal-life.full = true; pub-solar.terminal-life.full = true;
# https://nixos.wiki/wiki/ZFS#declarative_mounting_of_ZFS_datasets
systemd.services.zfs-mount.enable = false;
home-manager.users."${psCfg.user.name}" = { home-manager.users."${psCfg.user.name}" = {
xdg.configFile = { xdg.configFile = {
"sway/config.d/10-screens.conf".source = ./.config/sway/config.d/screens.conf; "sway/config.d/10-screens.conf".source = ./.config/sway/config.d/screens.conf;

View file

@ -8,47 +8,48 @@
[ (modulesPath + "/installer/scan/not-detected.nix") [ (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-id/md-name-nixos:root";
fileSystems."/" = fileSystems."/" =
{ device = "rpool/local/root"; { device = "none";
fsType = "zfs"; fsType = "tmpfs";
}; };
fileSystems."/boot" = fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/13B8-529E"; { device = "/dev/disk/by-uuid/EC82-67F4";
fsType = "vfat"; fsType = "vfat";
}; };
fileSystems."/nix" = fileSystems."/home" =
{ device = "rpool/local/nix"; { device = "/dev/disk/by-uuid/0cc568f0-402d-4535-980a-ed3a1dc697b9";
fsType = "zfs"; fsType = "ext4";
}; };
fileSystems."/home" = fileSystems."/nix" =
{ device = "rpool/safe/home"; { device = "/dev/disk/by-uuid/e203d629-4d34-4147-bee6-919f0bfa25de";
fsType = "zfs"; fsType = "ext4";
}; };
fileSystems."/persist" = fileSystems."/persist" =
{ device = "rpool/safe/persist"; { device = "/dev/disk/by-uuid/a0855aaa-76bf-445e-b0d1-ab1552e5496f";
fsType = "zfs"; fsType = "ext4";
}; };
swapDevices = swapDevices =
[ { device = "/dev/zvol/rpool/swap"; } [ { device = "/dev/disk/by-uuid/761507ab-479d-414b-ac3e-2149564ca470"; }
]; ];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction # still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true; # networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp6s0f4u1u4.useDHCP = lib.mkDefault true;
networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";

View file

@ -5,7 +5,6 @@
lib, lib,
... ...
}: { }: {
networking.hostId = "acab9998";
networking.hostName = "stroopwafel"; networking.hostName = "stroopwafel";
networking.networkmanager.wifi.backend = "wpa_supplicant"; networking.networkmanager.wifi.backend = "wpa_supplicant";

View file

@ -1,14 +1,21 @@
{ lib, ... }: { lib, ... }:
{ {
systemd.tmpfiles.rules = [
"L /var/lib/bluetooth - - - - /persist/var/lib/bluetooth"
"d /persist/var/lib/bluetooth 0500 root root"
"L /var/lib/docker - - - - /persist/var/lib/docker"
"d /persist/var/lib/docker 0510 root root"
"d /persist/etc/NetworkManager/system-connections 0500 root root"
"d /persist/etc/ssh 0400 root root"
];
environment.etc."NetworkManager/system-connections" = { environment.etc."NetworkManager/system-connections" = {
source = "/persist/etc/NetworkManager/system-connections/"; source = "/persist/etc/NetworkManager/system-connections/";
}; };
systemd.tmpfiles.rules = [
"L /var/lib/bluetooth - - - - /persist/var/lib/bluetooth"
"L /var/lib/docker - - - - /persist/var/lib/docker"
];
services.openssh = { services.openssh = {
enable = true; enable = true;
hostKeys = [ hostKeys = [
@ -23,8 +30,4 @@
} }
]; ];
}; };
boot.initrd.postDeviceCommands = lib.mkAfter ''
zfs rollback -r rpool/local/root@blank
'';
} }