NixOS provide services.mingetty.autologinUser
option, but it can’t be used for the specific TTY.
TTY1 and user “guest”:
#!/run/current-system/sw/bin/bash | |
SCANNED="$1" | |
AFFIX="${1##*.}" | |
DATESTAMP=$(date '+%Y%m%d') | |
TIMESTAMP=$(date '+%H%M%S') | |
mv "${SCANNED}" "/home/user/${DATESTAMP}..scan-${TIMESTAMP}.${AFFIX}" |