Skip to content

fix(noctalia): migrate matic/viper config to v5 - #1977

Merged
shunkakinoki merged 5 commits into
mainfrom
claude/quizzical-williams-182142
Jul 3, 2026
Merged

fix(noctalia): migrate matic/viper config to v5#1977
shunkakinoki merged 5 commits into
mainfrom
claude/quizzical-williams-182142

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Problem

matic and viper NixOS eval fails:

error: The option `home-manager.users.<user>.programs.noctalia-shell' does not exist.

Commit 5852fad (Renovate #1974) bumped the noctalia-shell flake input to 6e7aa3b but only changed the digest - it did not migrate the config. 6e7aa3b is noctalia v5, a ground-up C++/Qt rewrite of the v4 Quickshell line, which renamed the home-manager option and restructured the entire config, so the existing programs.noctalia-shell config no longer evaluates.

What changed in v5 (upstream)

Touchpoint v4 v5
HM option programs.noctalia-shell programs.noctalia
Binary noctalia-shell noctalia
Config file settings.json (camelCase JSON) config.toml (snake_case TOML)
Lock IPC ipc call lockScreen lock msg session lock
Theming colorschemes/*.json palettes/*.json (new format)
Extra input noctalia-qs dropped

Upstream is explicit: v5 is a fresh install and v4 settings are not migrated - "ships with sane defaults, customize from there."

This PR

  • programs.noctalia-shell -> programs.noctalia
  • binary path noctalia-shell -> noctalia; lock-before-sleep.sh IPC ipc call lockScreen lock -> msg session lock
  • rewrite settings from v4 JSON to v5 TOML, keeping only keys verified against the v5 schema (src/config/schema/config_schema.cpp) so the build-time noctalia config validate passes: shell.font_family, shell.clipboard_enabled, shell.clipboard_auto_paste, location.auto_locate, wallpaper.enabled
  • flake.nix comment updated to describe the v5 pin; flake.lock and renovate.json unchanged

Dropped - must be re-applied on-device via the settings UI

These v4 customizations have no mechanical v5 equivalent (changed semantics) and can't be validated on darwin CI:

  • bar widget layout + per-widget options (clock format, system-monitor toggles, workspace mode)
  • Dracula-Custom palette/theme
  • dark-mode -> GTK dconf hook (v5 hooks run with no args; v5 likely themes GTK natively)
  • idle timeouts (v5 uses a behavior map), notifications/osd/dock tweaks

Verification

  • nix eval of matic: programs.noctalia.package.name = noctalia-5.0.0; the generated noctalia/config.toml resolves to a valid derivation (settings typecheck, validateConfig wired).
  • Not buildable/renderable on darwin - the toplevel build and noctalia config validate run on the Linux host. Verify on matic/viper with make build HOST=matic then re-apply the dropped customizations in the settings UI.

Summary by cubic

Migrates matic and viper to noctalia v5 and updates Hyprland/fish to the new msg API so the shell starts and keybinds work again. Fixes NixOS eval failures and restores locking, launcher, and panel actions.

  • Bug Fixes

    • Switched Home Manager option from programs.noctalia-shell to programs.noctalia and now use the noctalia package.
    • Updated lock script IPC to noctalia msg session lock (was ipc call lockScreen lock), binary path from noctalia-shell to noctalia, and script placeholder to @noctalia@.
    • Updated Hyprland: exec-once = noctalia, and keybinds to v5 msg commands (session lock, panel-toggle launcher/clipboard/session/control-center network/notifications).
    • Updated fish _caf_function to noctalia msg caffeine-{enable,disable} (was idleInhibitor {enable,disable}) and added tests that assert these exact subcommands.
    • Rewrote settings to v5 TOML, keeping only schema-validated keys: shell.font_family, shell.clipboard_enabled, shell.clipboard_auto_paste, location.auto_locate, wallpaper.enabled.
  • Migration

    • Recreate v4-only customizations in the v5 settings UI (bar layout, palette/theme, dark-mode hook, idle behavior).
    • Treat noctalia-shell input bumps as breaking; rebuild on-device before merging. Verify on Linux hosts with make build HOST=matic (or viper); build runs noctalia config validate.

Written for commit 79304b6. Summary will update on new commits.

Review in cubic

noctalia-shell v5 is a C++/Qt rewrite of the v4 Quickshell line. The
input was already bumped to v5 in 5852fad but the config was never
migrated, breaking matic/viper eval: the programs.noctalia-shell option
no longer exists.

Migrate to the v5 module:
- programs.noctalia-shell -> programs.noctalia
- binary noctalia-shell -> noctalia; lock-before-sleep IPC changes from
  'ipc call lockScreen lock' to 'msg session lock'
- rewrite settings from v4 JSON to v5 TOML, keeping only keys verified
  against the v5 schema so build-time 'noctalia config validate' passes

Upstream does not migrate v4 settings (fresh install, sane defaults), so
v4-only customizations (bar layout, Dracula palette, dark-mode dconf
hook, idle timeouts) are dropped and must be re-applied on-device via
the settings UI.
Copilot AI review requested due to automatic review settings July 3, 2026 05:35
@indent-zero

indent-zero Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor
PR Summary

Finishes the noctalia v4→v5 migration on the linux hosts by updating config/noctalia/default.nix to the v5 home-manager module (programs.noctalia), rewriting the settings tree to schema-verified TOML keys so noctalia config validate passes at build time, and switching the sleep-lock hook to the v5 noctalia msg session lock IPC. This unbreaks nix eval for matic/viper, which had been failing since the flake input was bumped to v5 without a corresponding config migration.

  • Rename programs.noctalia-shellprograms.noctalia and repoint the package/let-binding to the v5 noctalia binary (v5 pname/mainProgram changed).
  • Reduce settings to five v5-schema keys (shell.font_family, shell.clipboard_enabled, shell.clipboard_auto_paste, location.auto_locate, wallpaper.enabled); drop all v4-only customizations (bar widget layout, Dracula colorscheme, dark-mode dconf hook, idle timeouts, ui.fontFixed, notifications, osd, dock, general.*, etc.) with a comment noting they must be re-applied via the settings UI.
  • Update config/noctalia/lock-before-sleep.sh to invoke noctalia msg session lock (was noctalia-shell ipc call lockScreen lock) and rename the @noctalia_shell@ template placeholder to @noctalia@.
  • Unhook the v4 noctalia/colorschemes/Dracula-Custom/… xdg.configFile entry (v5 replaces colorschemes with a palette/theme system); the JSON file itself is left in the tree.
  • Expand the flake.nix comment on the noctalia-shell input to document v5 semantics and the pin rationale.

Issues

2 potential issues found:

  • config/noctalia/Dracula-Custom.json is now dead code: the xdg.configFile."noctalia/colorschemes/Dracula-Custom/…" binding was removed and v5 uses a different palette format at noctalia/palettes/*.json. Either delete the file or convert it and wire it back through programs.noctalia.customPalettes (the v5 home-module supports it — see nix/home-module.nix:74-88). → Autofix
  • matic's fingerprint PAM stack is registered under a service v5 never calls: named-hosts/matic/default.nix:216 defines security.pam.services.noctalia-shell with fprintd tuning, and config/hyprland/hyprland.conf:37 sets NOCTALIA_PAM_SERVICE=noctalia-shell, but v5's lockscreen hardcodes pamService = "login" in src/shell/lockscreen/lock_screen.cpp:809 and no source references NOCTALIA_PAM_SERVICE. Fingerprint unlock silently falls through to the system login PAM stack, which is not configured with fprintAuth. spec/matic_pam_fingerprint_spec.sh will still pass because it only checks the block textually exists. → Autofix
4 issues already resolved
  • The new flake comment claims noctalia-shell bumps are gated on manual review in renovate.json, but renovate.json auto-merges all nix flake inputs (top-level ":automergePatch"/":automergeMinor" plus a Nix Dependencies packageRule with matchDepTypes: ["flake-inputs"] and automerge: true) with no per-package override for noctalia-shell. When upstream lands another schema-breaking change it will auto-merge and re-break matic/viper the same way this PR is fixing. Add an actual matchPackageNames override (or enabled: false) for the input so the comment matches reality. (fixed by commit ae4816f)
  • Hyprland autostart still runs the renamed v4 binary: config/hyprland/default.nix:12 has exec-once = noctalia-shell, but v5's pname/mainProgram is noctalia, so noctalia never launches at login on matic/viper — the very hosts this PR is meant to unbreak. programs.noctalia.systemd.enable defaults to false in the v5 home-module, so hyprland exec-once is the only startup path. (fixed by commit ae4816f)
  • All 8 Hyprland keybinds in config/hyprland/hyprland.conf still call noctalia-shell ipc call <ns> <action> (lines 234, 247, 249, 260, 377, 427, 428, 433), but v5 renamed the binary to noctalia and replaced the IPC surface with noctalia msg <ns> <args>. Lid-close lock, launcher, emoji, clipboard, session menu, notifications, and network toggles will all silently no-op on matic/viper. spec/hyprland_lid_lock_spec.sh only greps for the literal string, so it will keep passing while the binding is broken. (fixed by commit ae4816f)
  • CI will still fail on spec/noctalia_lock_before_sleep_spec.sh: despite the new commit's message claiming otherwise, that file is unchanged and still asserts @noctalia_shell@ (line 14) and ipc call lockScreen lock (line 20), both of which the PR replaced with @noctalia@ and msg session lock. spec/noctalia_bar_spec.sh deletion is fine. (fixed by commit ead52dd)

CI Checks

Waiting for CI checks...


⚡ Autofix All Issues

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR migrates Noctalia configuration from v4 (programs.noctalia-shell) to v5 (programs.noctalia). It updates binary naming, replaces the legacy colorscheme file with minimal v5 settings, switches the lock-before-sleep script to use the new msg session lock IPC command, and updates flake documentation.

Changes

Noctalia v5 migration

Layer / File(s) Summary
Binary naming and lock IPC command update
config/noctalia/default.nix, config/noctalia/lock-before-sleep.sh
Switches the noctalia binary/template variable from noctalia_shell naming, and updates the lock script to run msg session lock instead of ipc call lockScreen lock.
Module config migration to v5 settings
config/noctalia/default.nix
Removes the legacy Dracula-Custom colorscheme file installation and replaces the large v4 programs.noctalia-shell settings tree with a minimal validated programs.noctalia v5 settings block.
Flake documentation update
flake.nix
Updates the comment on the noctalia-shell input to describe the v5 rewrite, TOML config, lack of v4 migration, and pin/renovate constraints.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SleepHook as lock-before-sleep.sh
  participant Noctalia as noctalia binary
  SleepHook->>Noctalia: msg session lock
  Noctalia-->>SleepHook: lock success/failure
  SleepHook->>SleepHook: allow sleep to proceed
Loading

Possibly related PRs

  • shunkakinoki/dotfiles#1638: Introduces the original config/noctalia/default.nix module for programs.noctalia-shell that this PR migrates to programs.noctalia.
  • shunkakinoki/dotfiles#1688: Establishes the earlier lock-before-sleep.sh IPC flow (ipc call lockScreen lock) that this PR replaces with the v5 msg session lock command.

Poem

A hop from v4 to v5's new door,
Old palettes gone, but I dig for more,
msg session lock — a tidier phrase,
My burrow's config now trimmed and ablaze,
Thump-thump goes my heart for a cleaner maze! 🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly captures the main change: migrating noctalia config to v5 on matic/viper.
Description check ✅ Passed The description matches the changeset and explains the v5 migration and related fixes.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/quizzical-williams-182142

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Noctalia configuration to support version 5, which includes renaming the program option to programs.noctalia, updating settings to the new schema, and adapting the lock script to use the new IPC command structure. The review feedback highlights that these changes will break existing tests in spec/noctalia_lock_before_sleep_spec.sh and spec/noctalia_bar_spec.sh, which need to be updated or removed to prevent CI failures.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread config/noctalia/lock-before-sleep.sh
Comment thread config/noctalia/default.nix
Comment thread flake.nix Outdated
- lock-before-sleep spec: expect @Noctalia@ placeholder and 'msg session
  lock' (v5 IPC) instead of @noctalia_shell@ / 'ipc call lockScreen lock'
- remove noctalia_bar_spec.sh: the v4 bar widget settings it asserted
  have no v5 equivalent and were dropped from config/noctalia/default.nix

Flagged by gemini-code-assist on #1977.
Expect @Noctalia@ placeholder and 'msg session lock' instead of
@noctalia_shell@ / 'ipc call lockScreen lock'. Split from the prior
commit where a failed git-add left this file unstaged.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 issues found and verified against the latest diff

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread config/noctalia/default.nix
Comment thread config/noctalia/default.nix
Comment thread config/noctalia/lock-before-sleep.sh
Comment thread flake.nix Outdated
@shunkakinoki

Copy link
Copy Markdown
Owner Author

Addressed gemini-code-assist feedback

  • spec/noctalia_lock_before_sleep_spec.sh updated for the v5 IPC (@noctalia@, msg session lock) — ead52dd
  • spec/noctalia_bar_spec.sh removed (v4 bar widget settings have no v5 equivalent) — 57abcbf

Scope note: runtime IPC refs deferred

This PR migrates the config/noctalia/ module (settings + lock-before-sleep script) and its specs. Other files still reference the v4 binary noctalia-shell / ipc call syntax and are broken on v5 — but these were already broken by the v5 input bump in #1974 and need noctalia msg --help from the running v5 binary to map the redesigned command surface, so they can't be verified in darwin CI:

  • config/hyprland/default.nixexec-once = noctalia-shell (shell won't launch on v5)
  • config/hyprland/hyprland.conf — 8 IPC keybinds (launcher/network/sessionMenu/notifications/lockScreen)
  • home-manager/programs/fish/functions/_caf_function.fishnoctalia-shell msg idleInhibitor (half-migrated: new subcommand, old binary)

Tracked as an on-device follow-up.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@config/noctalia/lock-before-sleep.sh`:
- Around line 5-9: The Hyprland lock actions still reference the old
noctalia-shell IPC command, so update the lock keybind and lid switch bindings
to use the v5 session lock command instead. Locate the existing lock invocation
in the Hyprland config that currently calls the old lockScreen path, and replace
it with the same `noctalia msg session lock` command used by
`lock-before-sleep.sh` so all lock triggers stay consistent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 07d9c9c5-8191-4dc1-a033-b1d99b812ba6

📥 Commits

Reviewing files that changed from the base of the PR and between 5852fad and 8438457.

📒 Files selected for processing (3)
  • config/noctalia/default.nix
  • config/noctalia/lock-before-sleep.sh
  • flake.nix

Comment thread config/noctalia/lock-before-sleep.sh
The v5 bump renamed the binary noctalia-shell -> noctalia and replaced
the 'ipc call <target> <method>' surface with 'noctalia msg <command>'.
Hyprland exec-once and keybinds plus the fish caf function still used the
v4 forms, so on v5 the shell would not launch and lock/launcher/panel
keybinds were no-ops. Verified each command against the v5 source:

- exec-once = noctalia-shell -> noctalia (config/hyprland/default.nix)
- lockScreen lock -> msg session lock (L key + lid bind)
- launcher toggle -> msg panel-toggle launcher
- launcher emoji -> msg panel-toggle launcher /emo
- launcher clipboard -> msg panel-toggle clipboard
- sessionMenu toggle -> msg panel-toggle session
- network togglePanel -> msg panel-toggle control-center network
- notifications toggleHistory -> msg panel-toggle control-center notifications
- caf: noctalia-shell msg idleInhibitor -> noctalia msg caffeine-{enable,disable}

Also corrects the flake.nix comment: renovate is not configured to gate
this input (the packageRule was dropped), so bumps can auto-merge; the
comment now says to treat bumps as breaking and rebuild on-device.

Addresses cubic-dev-ai P1 and indent-zero feedback on #1977.
@shunkakinoki

Copy link
Copy Markdown
Owner Author

Update: runtime IPC migration completed in-PR (ae4816f)

My earlier "deferred to a follow-up" note is now superseded. After finding the v5 command surface in the upstream source (panel_manager.cpp, session_ipc.cpp, idle_inhibitor.cpp), I migrated all runtime refs with verified commands:

v4 v5
exec-once = noctalia-shell exec-once = noctalia
ipc call lockScreen lock msg session lock
ipc call launcher toggle msg panel-toggle launcher
ipc call launcher emoji msg panel-toggle launcher /emo
ipc call launcher clipboard msg panel-toggle clipboard
ipc call sessionMenu toggle msg panel-toggle session
ipc call network togglePanel msg panel-toggle control-center network
ipc call notifications toggleHistory msg panel-toggle control-center notifications
msg idleInhibitor {enable,disable} (fish caf) msg caffeine-{enable,disable}

Still needs an on-device make build HOST=matic + a smoke test of the keybinds, since the Wayland shell can't run in darwin CI. The NOCTALIA_PAM_SERVICE env and security.pam.services.noctalia-shell are a PAM service name (not the binary) and are intentionally unchanged.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 6 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread home-manager/programs/fish/functions/_caf_function.fish
The old stub was a function, but command -q only resolves executables, so
the noctalia call path was never exercised. Provide a real fake noctalia on
PATH that records its args and assert 'msg caffeine-enable' / 'msg
caffeine-disable', so a typo or future IPC rename fails the test.

Addresses cubic-dev-ai P3 on #1977.
@shunkakinoki
shunkakinoki merged commit 6f01c9d into main Jul 3, 2026
33 of 34 checks passed
@shunkakinoki
shunkakinoki deleted the claude/quizzical-williams-182142 branch July 3, 2026 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants