chore: format code with alejandra
This commit is contained in:
parent
5576fba883
commit
144c46a984
13 changed files with 164 additions and 131 deletions
20
t470.nix
20
t470.nix
|
|
@ -1,9 +1,11 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./hardware-configuration-t470.nix
|
||||
./common.nix
|
||||
|
|
@ -16,10 +18,10 @@
|
|||
fileSystems."/home/khais/Books" = {
|
||||
device = "//void/Books";
|
||||
fsType = "cifs";
|
||||
options = let
|
||||
options = let
|
||||
# prevent hanging when network is not reachable
|
||||
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
|
||||
in [ "${automount_opts},credentials=/etc/nixos/secrets/books.smb" ];
|
||||
in ["${automount_opts},credentials=/etc/nixos/secrets/books.smb"];
|
||||
};
|
||||
|
||||
# scanner drop point
|
||||
|
|
@ -30,7 +32,7 @@
|
|||
writeEnable = true;
|
||||
chrootlocalUser = true;
|
||||
userlistEnable = true;
|
||||
userlist = [ "paperless-upload" ];
|
||||
userlist = ["paperless-upload"];
|
||||
userlistDeny = false;
|
||||
extraConfig = ''
|
||||
log_ftp_protocol=YES
|
||||
|
|
@ -44,7 +46,7 @@
|
|||
allow_writeable_chroot=YES
|
||||
'';
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ 21 ];
|
||||
networking.firewall.allowedTCPPorts = [21];
|
||||
networking.firewall.allowedTCPPortRanges = [
|
||||
{
|
||||
from = 51000;
|
||||
|
|
@ -56,14 +58,14 @@
|
|||
isNormalUser = true;
|
||||
group = "paperless-upload";
|
||||
};
|
||||
system.activationScripts.makeFtpDirectory = lib.stringAfter [ "var" ] ''
|
||||
system.activationScripts.makeFtpDirectory = lib.stringAfter ["var"] ''
|
||||
mkdir -m 775 -p /var/lib/ftp
|
||||
chown root:root /var/lib/ftp
|
||||
mkdir -m 700 -p /var/lib/ftp/paperless-upload
|
||||
chown paperless-upload:paperless-upload /var/lib/ftp/paperless-upload
|
||||
'';
|
||||
systemd.services.uploadPaperlessDocuments = {
|
||||
path = [ pkgs.openssh pkgs.inotify-tools ];
|
||||
path = [pkgs.openssh pkgs.inotify-tools];
|
||||
serviceConfig = {
|
||||
User = "paperless-upload";
|
||||
StandardOutput = "journal+console";
|
||||
|
|
@ -80,7 +82,7 @@
|
|||
pathConfig = {
|
||||
PathChanged = "/var/lib/ftp/paperless-upload/";
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
wantedBy = ["multi-user.target"];
|
||||
};
|
||||
|
||||
# fingerprint sensor setup
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue