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.
48 lines
1.9 KiB
Nix
48 lines
1.9 KiB
Nix
# First-session welcome toast (nomarchy.firstBootWelcome) — one dismissible
|
|
# "you're set" notification pointing at SUPER+M / SUPER+T / SUPER+? and
|
|
# Network, then writes settings.firstBootShown into the flake checkout
|
|
# (GOALS: no state outside the checkout). Live ISO keeps its own toast
|
|
# (hosts/live.nix); the script self-skips on hostname nomarchy-live.
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
config = lib.mkIf config.nomarchy.firstBootWelcome.enable {
|
|
systemd.user.services.nomarchy-first-boot = {
|
|
Unit = {
|
|
Description = "Nomarchy first-session welcome toast";
|
|
PartOf = [ "graphical-session.target" ];
|
|
# After the session AND the notification daemon. Without
|
|
# After=swaync, first login races D-Bus Notifications and the
|
|
# toast times out (migration: journal "Timeout was reached") —
|
|
# or worse, a later success writes firstBootShown without the
|
|
# user ever seeing the toast. Wants= so we still run if swaync
|
|
# is disabled (notify-send will fail and leave the marker unset).
|
|
After = [
|
|
"graphical-session.target"
|
|
"graphical-session-pre.target"
|
|
"swaync.service"
|
|
];
|
|
Wants = [ "swaync.service" ];
|
|
};
|
|
Service = {
|
|
Type = "oneshot";
|
|
# PATH: real notify-send + theme-sync; VM check shims both via PATH.
|
|
# NOMARCHY_PATH matches home.sessionVariables so the marker lands
|
|
# in the user's flake checkout.
|
|
Environment = [
|
|
"PATH=${lib.makeBinPath [
|
|
pkgs.libnotify
|
|
pkgs.nomarchy-state-sync
|
|
pkgs.coreutils
|
|
]}"
|
|
"NOMARCHY_PATH=%h/.nomarchy"
|
|
];
|
|
# Brief settle after swaync is up; the script also retries.
|
|
ExecStartPre = "${pkgs.coreutils}/bin/sleep 1";
|
|
ExecStart = "${pkgs.nomarchy-first-boot}/bin/nomarchy-first-boot";
|
|
};
|
|
Install.WantedBy = [ "graphical-session.target" ];
|
|
};
|
|
};
|
|
}
|