refactor(#107): theme-state.json → state.json, theme-sync → state-sync
Some checks failed
Check / eval (push) Has been cancelled
Some checks failed
Check / eval (push) Has been cancelled
The machine flake's git-tracked settings file is system state, not "theme" only — rename it to state.json. CLI becomes nomarchy-state-sync with a nomarchy-theme-sync symlink for scripts and muscle memory. Eval (mkFlake, doctor, lifecycle) still accepts theme-state.json; the next write migrates to state.json and removes the legacy file. Documented in MIGRATION.md; drop the CLI alias after release notes.
This commit is contained in:
@@ -37,10 +37,10 @@ pkgs.testers.runNixOSTest {
|
||||
# PolicyKit test action so pkexec can raise the agent.
|
||||
security.polkit.enable = true;
|
||||
|
||||
nomarchy.system.stateFile = flake + "/theme-state.json";
|
||||
nomarchy.system.stateFile = flake + "/state.json";
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /home/nomarchy/.nomarchy 0755 nomarchy users -"
|
||||
"C /home/nomarchy/.nomarchy/theme-state.json 0644 nomarchy users - ${flake + "/theme-state.json"}"
|
||||
"C /home/nomarchy/.nomarchy/state.json 0644 nomarchy users - ${flake + "/state.json"}"
|
||||
];
|
||||
services.greetd.settings.initial_session = {
|
||||
command = "start-hyprland";
|
||||
@@ -49,7 +49,7 @@ pkgs.testers.runNixOSTest {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.users.nomarchy = {
|
||||
imports = [ flake.homeModules.nomarchy ];
|
||||
nomarchy.stateFile = flake + "/theme-state.json";
|
||||
nomarchy.stateFile = flake + "/state.json";
|
||||
nomarchy.idle.enable = false;
|
||||
# Ensure pinentry-qt is the active pinentry (keys.nix default).
|
||||
};
|
||||
|
||||
@@ -11,7 +11,7 @@ flake seed files (see pkgs/nomarchy-install/default.nix installPhase).
|
||||
|
||||
The package copies a fixed file list (not a recursive tree copy):
|
||||
|
||||
flake.nix system.nix home.nix theme-state.json
|
||||
flake.nix system.nix home.nix state.json
|
||||
|
||||
README.md and hardware-configuration.nix stay repo-only (docs /
|
||||
nixos-generate-config at install time) and are intentionally absent
|
||||
@@ -31,7 +31,7 @@ import sys
|
||||
from pathlib import Path
|
||||
|
||||
# Must match the cp list in pkgs/nomarchy-install/default.nix installPhase.
|
||||
SHIPPED = ("flake.nix", "system.nix", "home.nix", "theme-state.json")
|
||||
SHIPPED = ("flake.nix", "system.nix", "home.nix", "state.json")
|
||||
|
||||
|
||||
def fail(msg: str) -> None:
|
||||
|
||||
@@ -42,7 +42,7 @@ pkgs.testers.runNixOSTest {
|
||||
nomarchy.system.stateFile = flake + "/themes/${slug}.json";
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /home/nomarchy/.nomarchy 0755 nomarchy users -"
|
||||
"C /home/nomarchy/.nomarchy/theme-state.json 0644 nomarchy users - ${flake + "/themes/${slug}.json"}"
|
||||
"C /home/nomarchy/.nomarchy/state.json 0644 nomarchy users - ${flake + "/themes/${slug}.json"}"
|
||||
];
|
||||
services.greetd.settings.initial_session = {
|
||||
command = "start-hyprland";
|
||||
|
||||
@@ -131,7 +131,7 @@ def convert(theme_dir: Path) -> dict:
|
||||
"name": slug.replace("-", " ").title(),
|
||||
"slug": slug,
|
||||
"mode": mode,
|
||||
# Empty = auto: nomarchy-theme-sync falls back to the first file in
|
||||
# Empty = auto: nomarchy-state-sync falls back to the first file in
|
||||
# the theme's backgrounds/ directory.
|
||||
"wallpaper": "",
|
||||
"colors": {
|
||||
|
||||
@@ -41,7 +41,7 @@ pkgs.testers.runNixOSTest {
|
||||
nomarchy.system.stateFile = flake + "/themes/boreal.json";
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /home/nomarchy/.nomarchy 0755 nomarchy users -"
|
||||
"C /home/nomarchy/.nomarchy/theme-state.json 0644 nomarchy users - ${flake + "/themes/boreal.json"}"
|
||||
"C /home/nomarchy/.nomarchy/state.json 0644 nomarchy users - ${flake + "/themes/boreal.json"}"
|
||||
"f /run/nomarchy-test-lid-state 0644 nomarchy users - state:_closed"
|
||||
];
|
||||
services.greetd.settings.initial_session = {
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
# screenshots into $out: desktop.png, menu.png (rofi root open), and
|
||||
# btop.png (Kitty running btop, when the terminal starts under softGL).
|
||||
# Also asserts nomarchy-doctor-status JSON (class:bad) — the harness
|
||||
# seeds an untracked theme-state.json, so doctor always reports ✖.
|
||||
# seeds an untracked state.json, so doctor always reports ✖.
|
||||
# Maintainer tool, NOT a checks.* gate (a full-desktop VM is far too
|
||||
# heavy for CI). Impure: THEME env picks the theme slug.
|
||||
# THEME=<slug> nix build --impure -f tools/theme-shot.nix --no-link --print-out-paths
|
||||
# The guest gets a minimal ~/.nomarchy (just the theme JSON as
|
||||
# theme-state.json), seeded via tmpfiles BEFORE greetd starts the
|
||||
# state.json), seeded via tmpfiles BEFORE greetd starts the
|
||||
# session, so the session's own exec-once wallpaper paint works —
|
||||
# assets come from the themesDir baked into the tool. Bar, menus AND
|
||||
# wallpaper render.
|
||||
@@ -42,13 +42,13 @@ pkgs.testers.runNixOSTest {
|
||||
extraGroups = [ "wheel" "video" ];
|
||||
};
|
||||
nomarchy.system.stateFile = flake + "/themes/${slug}.json";
|
||||
# Seed the runtime state (theme-sync reads $NOMARCHY_PATH, default
|
||||
# Seed the runtime state (state-sync reads $NOMARCHY_PATH, default
|
||||
# ~/.nomarchy) before greetd auto-starts the session, so the
|
||||
# exec-once `nomarchy-theme-sync wallpaper` finds it and paints.
|
||||
# exec-once `nomarchy-state-sync wallpaper` finds it and paints.
|
||||
# NixOS activation creates /home/nomarchy before systemd runs.
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /home/nomarchy/.nomarchy 0755 nomarchy users -"
|
||||
"C /home/nomarchy/.nomarchy/theme-state.json 0644 nomarchy users - ${flake + "/themes/${slug}.json"}"
|
||||
"C /home/nomarchy/.nomarchy/state.json 0644 nomarchy users - ${flake + "/themes/${slug}.json"}"
|
||||
];
|
||||
services.greetd.settings.initial_session = {
|
||||
command = "start-hyprland";
|
||||
|
||||
Reference in New Issue
Block a user