-
Notifications
You must be signed in to change notification settings - Fork 69
NixOs module: add option to use UWSM #1036
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -418,6 +418,16 @@ | |||||||||||||
| type = nixpkgs.lib.types.package; | ||||||||||||||
| default = (make-package-set pkgs).niri-stable; | ||||||||||||||
| }; | ||||||||||||||
| withUWSM = | ||||||||||||||
| nixpkgs.lib.mkEnableOption null | ||||||||||||||
| // { | ||||||||||||||
| description = '' | ||||||||||||||
| Launch niri with the UWSM (Universal Wayland Session Manager) session manager. | ||||||||||||||
| ::: {.note} | ||||||||||||||
| Requires extra configuration of greetd or from a display manager like SDDM | ||||||||||||||
| ::: | ||||||||||||||
| ''; | ||||||||||||||
| }; | ||||||||||||||
| }; | ||||||||||||||
|
|
||||||||||||||
| options.niri-flake.cache.enable = nixpkgs.lib.mkOption { | ||||||||||||||
|
|
@@ -441,7 +451,7 @@ | |||||||||||||
| icons.enable = nixpkgs.lib.mkDefault true; | ||||||||||||||
| }; | ||||||||||||||
| } | ||||||||||||||
| (nixpkgs.lib.mkIf cfg.enable { | ||||||||||||||
| (nixpkgs.lib.mkIf (cfg.enable && !cfg.withUWSM) { | ||||||||||||||
| services = | ||||||||||||||
| if nixpkgs.lib.strings.versionAtLeast config.system.nixos.release "24.05" | ||||||||||||||
| then { | ||||||||||||||
|
|
@@ -450,6 +460,26 @@ | |||||||||||||
| else { | ||||||||||||||
| xserver.displayManager.sessionPackages = [cfg.package]; | ||||||||||||||
| }; | ||||||||||||||
| }) | ||||||||||||||
| (nixpkgs.lib.mkIf (cfg.enable && cfg.withUWSM) { | ||||||||||||||
| programs.uwsm = { | ||||||||||||||
| enable = true; | ||||||||||||||
| waylandCompositors = { | ||||||||||||||
| niri = { | ||||||||||||||
| prettyName = "Niri"; | ||||||||||||||
| comment = "Niri compositor managed by UWSM"; | ||||||||||||||
| # Only takes a path, and `niri-session` uses | ||||||||||||||
| # the niri default systemd units | ||||||||||||||
| binPath = nixpkgs.lib.getExe ( | ||||||||||||||
| pkgs.writeShellScriptBin "niriSession" '' | ||||||||||||||
| exec /run/current-system/sw/bin/niri --session | ||||||||||||||
| '' | ||||||||||||||
| ); | ||||||||||||||
|
Comment on lines
+473
to
+477
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is what I have in my config, not sure if this is intended behavior or not, but it does work and would simplify this a bit:
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm surprised this works, since the FootnotesThere was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems uwsm parses i guess the best would be to add |
||||||||||||||
| }; | ||||||||||||||
| }; | ||||||||||||||
| }; | ||||||||||||||
| }) | ||||||||||||||
| (nixpkgs.lib.mkIf cfg.enable { | ||||||||||||||
| hardware = | ||||||||||||||
| if nixpkgs.lib.strings.versionAtLeast config.system.nixos.release "24.11" | ||||||||||||||
| then { | ||||||||||||||
|
|
||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nitpick but the "n" isn't meant to be capitalized according to the niri dev.