diff --git a/custom/default.nix b/custom/default.nix index 4f22b25..cb5f006 100644 --- a/custom/default.nix +++ b/custom/default.nix @@ -1,4 +1,4 @@ -{ pkgs ? import { inherit system; } +{ pkgs ? import { inherit system; } , system ? builtins.currentSystem }: diff --git a/custom/update-background/default.nix b/custom/update-background/default.nix index 1ef856a..1a74946 100644 --- a/custom/update-background/default.nix +++ b/custom/update-background/default.nix @@ -14,7 +14,11 @@ let in writeScript "update-background.sh" '' #!/bin/sh - image=`${find} ${backgrounds_directory} -type f | ${grep} -v "/\." | ${shuf} -n 1` + if [ $# -eq 0 ]; then + image=`${find} ${backgrounds_directory} -type f | ${grep} -v "/\." | ${shuf} -n 1` + else + image="$1" + fi echo "image: $image" ${feh}/bin/feh --bg-fill --no-fehbg "$image" ${glib}/bin/gsettings set org.gnome.desktop.background picture-uri "file://$image"