Sway: Difference between revisions
imported>Hypnosis2839 →Using NixOS: cut out redundant config |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 6: | Line 6: | ||
=== Using NixOS === | === Using NixOS === | ||
Here is a minimal configuration | Here is a minimal configuration: | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
{ config, pkgs, lib, ... }: | { config, pkgs, lib, ... }: | ||
Line 16: | Line 16: | ||
mako # notification system developed by swaywm maintainer | mako # notification system developed by swaywm maintainer | ||
]; | ]; | ||
# Enable the gnome-keyring secrets vault. | # Enable the gnome-keyring secrets vault. | ||
Line 103: | Line 97: | ||
}} | }} | ||
When you launch sway, the systemd service is started. | When you launch sway, the systemd service is started. | ||
=== Using greeter === | |||
Installing a greeter based on [https://search.nixos.org/options?channel=unstable&show=services.greetd.settings&from=0&size=50&sort=relevance&type=packages&query=greetd greetd] is the most straightforward way to launch Sway. | |||
Tuigreet does not even need a separate compositor to launch. | |||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | |||
services.greetd = { | |||
enable = true; | |||
settings = { | |||
default_session = { | |||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd sway"; | |||
user = "greeter"; | |||
}; | |||
}; | |||
}; | |||
</nowiki>}} | |||
== Troubleshooting == | == Troubleshooting == | ||
Line 175: | Line 186: | ||
Enabling this option allows any program run by the "users" group to request real-time priority. | Enabling this option allows any program run by the "users" group to request real-time priority. | ||
=== WLR Error when trying to launch sway === | |||
When this happens on a new nixos system, enabling opengl in configuration.nix may fix this issue. | |||
<syntaxhighlight lang="nix"> | |||
hardware.opengl.enable = true; | |||
</syntaxhighlight> | |||
[[Category:Window managers]] | [[Category:Window managers]] | ||
[[Category:Applications]] | [[Category:Applications]] |