Sway: Difference between revisions

EyJhb (talk | contribs)
No longer called `gnome.adwaita-icon-theme`, moved to top level.
IvyRS (talk | contribs)
Using greeter: fixing package path + formatting
 
(3 intermediate revisions by 2 users not shown)
Line 97: Line 97:
Tuigreet does not even need a separate compositor to launch.
Tuigreet does not even need a separate compositor to launch.


{{file|/etc/nixos/configuration.nix|nix|<nowiki>
{{file|||<nowiki>
services.greetd = {                                                       
services.greetd = {                                                       
   enable = true;                                                         
   enable = true;                                                         
   settings = {                                                           
   settings = {                                                           
     default_session = {                                                   
     default_session = {                                                   
       command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd sway";
       command = "${pkgs.tuigreet}/bin/tuigreet --time --cmd sway";
       user = "greeter";                                                   
       user = "greeter";                                                   
     };                                                                   
     };                                                                   
   };                                                                     
   };                                                                     
};                                                                       
};                                                                       
</nowiki>}}
</nowiki>|name=/etc/nixos/configuration.nix|lang=nix}}
 
=== Automatic startup on boot ===
The snippet below will start Sway immediately on startup, without a greeter and '''without login prompt'''. Only consider using this in conjunction with [[Full Disk Encryption]]!
 
<syntaxhighlight lang="nix">
services.getty = {
  autologinUser = "your_username";
  autologinOnce = true;
};
environment.loginShellInit = ''
    [[ "$(tty)" == /dev/tty1 ]] && sway
'';
</syntaxhighlight>


== Configuration ==
== Configuration ==