feat: make VM and live ISO match an installed Nomarchy
- Migrate VM and graphical ISO to home-manager.nixosModules.home-manager; drop the standalone-HM sudo-based activation script (ran HM against /root because HOME wasn't reset) in flake.nix, core/system/vm-guest.nix, hosts/live-iso.nix. - Run swaybg as nomarchy-wallpaper.service instead of a silent Hyprland exec-once so failures surface in systemctl. - Skip the battery monitor unit on hosts without /sys/class/power_supply/BAT* (VMs, desktops). - Don't wrap walker --dmenu in uwsm-app; redirect setsid background std-fds in nomarchy-launch-walker so $(menu ...) in nomarchy-menu doesn't hang. - Restart waybar/walker via systemctl --user rather than pkill + uwsm-app to stop the post-theme-switch color race. - Wire nomarchy-restart-walker/-waybar into nomarchy-theme-set so themes that only change the imported CSS reload correctly. - Waybar: pin #custom-nomarchy to the Nomarchy font and use the U+F000 codepoint so the logo shows across all themes. - Auto-install the correct icon-theme package per palette via a new nomarchyLib.iconThemePackage helper in lib/default.nix; Everforest now actually renders for summer-night. - Pre-cache every theme's HM generation: new packages.allThemeVariants flake output and nomarchy-themes-prebuild script so theme switches are cache-only (no Stylix rebuild, no downloads). - Add nomarchy-test-live-iso to boot the graphical ISO in QEMU the same way nomarchy-test-vm does, with virtio-gpu support added to live-iso.nix. - Installer-generated home.nix/system.nix now ship a curated, commented app menu (btop/fastfetch/chromium on by default) plus optional system services (Docker, libvirtd, Tailscale, Syncthing, Flatpak, Steam). - nomarchy-test-vm now wipes the stale nomarchy.qcow2 before launch. - Remove obsolete GEMINI.md and PLAN.md. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -51,4 +51,15 @@ nomarchy-env-update
|
||||
|
||||
nomarchy-theme-set-templates
|
||||
|
||||
# Walker reads its CSS via @import of ~/.config/nomarchy/current/theme/apps/walker/style.css,
|
||||
# and waybar's shared fallback style does the same with waybar.css. HM's sd-switch
|
||||
# only restarts services whose unit *definition* changed, so when only the imported
|
||||
# file's contents change, neither gets reloaded. Restart them explicitly.
|
||||
command -v nomarchy-restart-walker >/dev/null 2>&1 && nomarchy-restart-walker || true
|
||||
command -v nomarchy-restart-waybar >/dev/null 2>&1 && nomarchy-restart-waybar || true
|
||||
|
||||
# Reload the wallpaper — its ExecStart path is stable (~/.config/nomarchy/current/background)
|
||||
# so sd-switch does not detect a unit change when only the symlink target moves.
|
||||
systemctl --user restart nomarchy-wallpaper.service 2>/dev/null || true
|
||||
|
||||
nomarchy-hook theme-set "$THEME_NAME"
|
||||
|
||||
25
themes/engine/scripts/nomarchy-themes-prebuild
Executable file
25
themes/engine/scripts/nomarchy-themes-prebuild
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Pre-realise every theme's Home Manager generation into the Nix store so
|
||||
# future `nomarchy-theme-set` swaps are cache hits — no Stylix rebuild, no
|
||||
# downloads. Run once after install (the installer wires this up) and again
|
||||
# after adding or updating palettes.
|
||||
|
||||
set -e
|
||||
|
||||
if [ -f "/etc/nixos/flake.nix" ]; then
|
||||
REPO_DIR="/etc/nixos"
|
||||
elif [ -f "/etc/nomarchy/flake.nix" ]; then
|
||||
REPO_DIR="/etc/nomarchy"
|
||||
else
|
||||
echo "Error: Nomarchy flake repository not found in /etc/nixos or /etc/nomarchy." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Pre-building every theme variant from $REPO_DIR#allThemeVariants..."
|
||||
echo "This is a one-time cache warm-up. Subsequent theme switches will be instant."
|
||||
nix build --no-link --print-out-paths \
|
||||
--extra-experimental-features "nix-command flakes" \
|
||||
"$REPO_DIR#allThemeVariants"
|
||||
|
||||
echo "Theme variants cached. Theme switches now avoid rebuilds."
|
||||
@@ -92,11 +92,17 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# GTK Icon Theme configuration
|
||||
# GTK Icon Theme configuration. The package is derived from the theme's
|
||||
# declared icon family (palettes/<theme>/icons.theme), so switching to a
|
||||
# palette that needs e.g. Everforest icons automatically installs
|
||||
# `everforest-gtk-variant` instead of sticking with `yaru-theme`.
|
||||
gtk = {
|
||||
enable = lib.mkDefault true;
|
||||
iconTheme = lib.mkDefault {
|
||||
package = pkgs.yaru-theme;
|
||||
package = nomarchyLib.iconThemePackage {
|
||||
iconsTheme = config.nomarchy.iconsTheme;
|
||||
inherit pkgs;
|
||||
};
|
||||
name = config.nomarchy.iconsTheme;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user