From 25189a0d99e7497469e4cad5f42fb65d9043e471 Mon Sep 17 00:00:00 2001 From: ediblerope Date: Tue, 14 Apr 2026 09:44:00 +0100 Subject: [PATCH] Skip matugen in update alias when not installed Guard matugen call with command -v check so the update alias works on hosts without GNOME/matugen (e.g. mediaserver). Co-Authored-By: Claude Opus 4.6 --- common.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.nix b/common.nix index 7bea578..a980e4e 100644 --- a/common.nix +++ b/common.nix @@ -74,7 +74,7 @@ # Shell aliases (work in both bash and fish) environment.shellAliases = { - update = "bash -c 'OLD_SYSTEM=$(readlink /run/current-system) && sudo nixos-rebuild build $@ --flake github:ediblerope/nixos-config && sudo nixos-rebuild switch $@ --flake github:ediblerope/nixos-config && nvd diff $OLD_SYSTEM /run/current-system && matugen image ~/.local/share/backgrounds/wallpaper.png --source-color-index 0 -m dark' --"; + update = "bash -c 'OLD_SYSTEM=$(readlink /run/current-system) && sudo nixos-rebuild build $@ --flake github:ediblerope/nixos-config && sudo nixos-rebuild switch $@ --flake github:ediblerope/nixos-config && nvd diff $OLD_SYSTEM /run/current-system && command -v matugen &>/dev/null && matugen image ~/.local/share/backgrounds/wallpaper.png --source-color-index 0 -m dark || true' --"; clean = "sudo nix-collect-garbage -d"; ll = "ls -alh"; clear = "command clear";