Skip to content

nix: add nixos module for noctalia#3024

Open
skykanin wants to merge 4 commits into
noctalia-dev:mainfrom
skykanin:feat/add-nixos-module
Open

nix: add nixos module for noctalia#3024
skykanin wants to merge 4 commits into
noctalia-dev:mainfrom
skykanin:feat/add-nixos-module

Conversation

@skykanin

Copy link
Copy Markdown

Summary and Motivation

add a plain nixos module for noctalia
which doesn't rely on any home managing
frameworks

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Build / packaging

Testing

I tested this manually by enabling the module in my machines nixos config and verifying that the systemd service and package worked as expected which it did.

Manual Coverage

  • Tested on Niri
  • Tested on Hyprland
  • Tested on Sway
  • Tested on another compositor:
  • Tested with different bar positions and density settings
  • Tested at different interface scaling values
  • Tested with multiple monitors

Checklist

  • This PR is ready for review, or it is marked as Draft.
  • I read and followed the relevant guidance in CONTRIBUTING.md.
  • I ran just format with clang-format v22+ installed, or this PR has no code changes.
  • I ran the relevant build or test commands, or explained why they were not run.
  • I self-reviewed the changes.
  • I checked for new warnings or errors.
  • I will update end-user documentation after merge, or this PR does not change user-facing configuration or behavior.
  • I added or updated assets/translations/en.json, or this PR adds no new user-facing strings.
  • I did not edit non-English translation files unless this PR is explicitly for translation tooling, an import/export sync, or a maintainer-requested locale change.
  • I used the existing canonical names for config keys, IPC names, paths, and identifiers.

@ItsLemmy

Copy link
Copy Markdown
Collaborator

@linusammon

@linusammon

Copy link
Copy Markdown
Contributor

Thanks for the PR :) I’ll take a proper look at it once I get home. Did you test whether the app launcher works when running Noctalia via the systemd service?

@skykanin

skykanin commented Jun 15, 2026

Copy link
Copy Markdown
Author

Thanks for the PR :) I’ll take a proper look at it once I get home. Did you test whether the app launcher works when running Noctalia via the systemd service?

The app launcher launches and you can search just fine, but I noticed that certain apps won't launch through the app launcher. I assumed it was just a v5 instability issue, but I don't know the cause.

@linusammon

linusammon commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

The app launcher launches and you can search just fine, but I noticed that certain apps won't launch through the app launcher. I assumed it was just a v5 instability issue, but I don't know the cause.

I just tested it myself, and the launcher fails when I try to launch anything. Did you perhaps set anything beyond enabling the module and the systemd service that could make a difference?

@skykanin

skykanin commented Jun 15, 2026

Copy link
Copy Markdown
Author

The app launcher launches and you can search just fine, but I noticed that certain apps won't launch through the app launcher. I assumed it was just a v5 instability issue, but I don't know the cause.

I just tested it myself, and the launcher fails silently when I try to launch anything. Did you perhaps set anything beyond enabling the module and the systemd service that could make a difference?

With verbose debug logging enabled in noctalia I can see these errors:

juni 15 22:37:14 emma noctalia[240765]: 22:37:14.689 [ERR] [process] startSystemdService: systemd-run failed with exit code 1: Failed to find executable star-citizen: No such file or directory
juni 15 22:37:16 emma noctalia[240765]: 22:37:16.870 [ERR] [process] startSystemdService: systemd-run failed with exit code 1: Failed to find executable rnote: No such file or directory
juni 15 22:43:58 emma noctalia[240765]: 22:43:58.086 [INF] [debug] debug verbose logs enabled
juni 15 22:44:07 emma noctalia[240765]: 22:44:07.294 [DBG] [panel] panel manager: opened "launcher"
juni 15 22:44:07 emma noctalia[240765]: 22:44:07.295 [DBG] [surface] fractional scale preferred output=DP-1 surface=0x714cecf347a0 scale=1.000 raw=120/120 logical=0x0 buffer=0x0
juni 15 22:44:07 emma noctalia[240765]: 22:44:07.351 [DBG] [surface] surface prepareFrame callback took 56.5ms (0x714cece60040, 588x530 logical)
juni 15 22:44:07 emma noctalia[240765]: 22:44:07.351 [DBG] [main] queued surface frame work took 56.5ms
juni 15 22:44:16 emma noctalia[240765]: 22:44:16.356 [DBG] [panel] panel manager: closing "launcher"
juni 15 22:44:16 emma noctalia[240765]: 22:44:16.359 [ERR] [process] startSystemdService: systemd-run failed with exit code 1: Failed to find executable chatterino: No such file or directory

The systemd service defined in nixos for noctalia doesn't have access to the users PATH. Therefore you get Failed to find executable ... errors when trying to launch apps from the launcher. I guess I'll have to tinker some more with the nixos module.

EDIT: I've update the module, exposing all system packages to the systemd service. The launcher now works as expected.

@skykanin skykanin force-pushed the feat/add-nixos-module branch from 5e137c8 to fe7db5b Compare June 15, 2026 20:59
add a plain nixos module for noctalia
which doesn't rely on any home managing
frameworks
@linusammon

Copy link
Copy Markdown
Contributor

The app launcher launches and you can search just fine, but I noticed that certain apps won't launch through the app launcher. I assumed it was just a v5 instability issue, but I don't know the cause.

I just tested it myself, and the launcher fails silently when I try to launch anything. Did you perhaps set anything beyond enabling the module and the systemd service that could make a difference?

With verbose debug logging enabled in noctalia I can see these errors:

juni 15 22:37:14 emma noctalia[240765]: 22:37:14.689 [ERR] [process] startSystemdService: systemd-run failed with exit code 1: Failed to find executable star-citizen: No such file or directory
juni 15 22:37:16 emma noctalia[240765]: 22:37:16.870 [ERR] [process] startSystemdService: systemd-run failed with exit code 1: Failed to find executable rnote: No such file or directory
juni 15 22:43:58 emma noctalia[240765]: 22:43:58.086 [INF] [debug] debug verbose logs enabled
juni 15 22:44:07 emma noctalia[240765]: 22:44:07.294 [DBG] [panel] panel manager: opened "launcher"
juni 15 22:44:07 emma noctalia[240765]: 22:44:07.295 [DBG] [surface] fractional scale preferred output=DP-1 surface=0x714cecf347a0 scale=1.000 raw=120/120 logical=0x0 buffer=0x0
juni 15 22:44:07 emma noctalia[240765]: 22:44:07.351 [DBG] [surface] surface prepareFrame callback took 56.5ms (0x714cece60040, 588x530 logical)
juni 15 22:44:07 emma noctalia[240765]: 22:44:07.351 [DBG] [main] queued surface frame work took 56.5ms
juni 15 22:44:16 emma noctalia[240765]: 22:44:16.356 [DBG] [panel] panel manager: closing "launcher"
juni 15 22:44:16 emma noctalia[240765]: 22:44:16.359 [ERR] [process] startSystemdService: systemd-run failed with exit code 1: Failed to find executable chatterino: No such file or directory

The systemd service defined in nixos for noctalia doesn't have access to the users PATH. Therefore you get Failed to find executable ... errors when trying to launch apps from the launcher. I guess I'll have to tinker some more with the nixos module.

EDIT: I've update the module, exposing all system packages to the systemd service. The launcher now works as expected.

That approach doesn't cover user packages.

@skykanin

Copy link
Copy Markdown
Author

That approach doesn't cover user packages.

I'm not sure what you mean by user packages in this instance. If you want globally installed packages on NixOS using environment.systemPackages is the recommended way.

@linusammon

Copy link
Copy Markdown
Contributor

That approach doesn't cover user packages.

I'm not sure what you mean by user packages in this instance. If you want globally installed packages on NixOS using environment.systemPackages is the recommended way.

I mean packages installed via users.users.<name>.packages

@skykanin

Copy link
Copy Markdown
Author

I mean packages installed via users.users.<name>.packages

Good catch, I've now updated the PR again so that it exposes both user and globally installed packages to the systemd service. I've also tested that this works locally on my machine.

@linusammon

linusammon commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

I mean packages installed via users.users..packages

Good catch, I've now updated the PR again so that it exposes both user and globally installed packages to the systemd service. I've also tested that this works locally on my machine.

Might be worth testing if enableDefaultPath false alone does the trick without setting PATH explicitly.

@skykanin

Copy link
Copy Markdown
Author

Might be worth testing if enableDefaultPath false alone does the trick without setting PATH explicitly.

yes, that works as well. I've removed the explicit PATH now

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.

3 participants