diff options
| author | Karel Kočí <cynerd@email.cz> | 2025-12-10 12:19:17 +0100 |
|---|---|---|
| committer | Karel Kočí <cynerd@email.cz> | 2025-12-10 12:19:17 +0100 |
| commit | 71170ba96ad788726af419edd64d58bdfe5b52b5 (patch) | |
| tree | 1773ebe943c4885a2b419fb1dfd7da3afb8421ab /utils/guix | |
| parent | 60fc87b4003f5d047aafa970d62416a93801a5c9 (diff) | |
| download | myconfigs-master.tar.gz myconfigs-master.tar.bz2 myconfigs-master.zip | |
Diffstat (limited to 'utils/guix')
| -rw-r--r-- | utils/guix | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/utils/guix b/utils/guix new file mode 100644 index 0000000..bbfb8e5 --- /dev/null +++ b/utils/guix @@ -0,0 +1,16 @@ +# Functions used for interactive installation of new changes to running system +# vim: ft=sh + +guix_install() { + local installed + installed="$(guix package --list-installed)" + local -a toinstall + for pkg in "$@"; do + if awk -v ec=0 -v "PKG=$pkg" '$1 == PKG { ec = 1; } END { exit ec; }' <<<"$installed"; then + toinstall+=("$pkg") + fi + done + if [[ "${#toinstall[@]}" -gt 0 ]]; then + guix install "${toinstall[@]}" + fi +} |
