Fix broken executable paths

This commit is contained in:
Andrew Kvalheim 2021-12-05 10:54:36 -08:00
parent 11cd41f077
commit 59a707a426
2 changed files with 19 additions and 4 deletions

View file

@ -194,10 +194,10 @@ in
direnv = {
enable = true;
nix-direnv.enable = true;
stdlib = ''
stdlib = with pkgs; ''
_gopass_await() {
gopass show "$@" 2>( \
zenity --progress --auto-close --no-cancel --pulsate \
${gopass}/bin/gopass show "$@" 2>( \
${gnome.zenity}/bin/zenity --progress --auto-close --no-cancel --pulsate \
--title 'Please tap the hardware key' \
--text "gopass show $*" \
)

View file

@ -1,5 +1,20 @@
{ config, lib, pkgs, ... }:
let
organize-downloads = pkgs.writeShellScriptBin "organize-downloads" (with pkgs; ''
set -Eeuo pipefail
shopt -s nullglob
mkdir -p '/home/ak/screenshots'
for source in /home/ak/Downloads/Screen{s,\ S}hot\ *.png; do
destination="/home/ak/screenshots/$(basename "$source")"
mv --no-clobber --verbose "$source" "$destination"
${oxipng}/bin/oxipng --quiet --opt '4' --strip 'safe' --interlace '0' "$destination"
done
'');
in
{
imports = [
../../common/home.nix
@ -19,7 +34,7 @@
};
systemd.user.services.organize-downloads = {
Unit.Description = "Organize downloads";
Service.ExecStart = "%h/.local/bin/organize-downloads";
Service.ExecStart = "${organize-downloads}/bin/organize-downloads";
Service.Nice = 10;
};