Skip to content

Instantly share code, notes, and snippets.

@cole-h

cole-h/sway.nix Secret

Created May 4, 2020 20:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cole-h/e276775c1c8a5fbf6f90768b793b9d72 to your computer and use it in GitHub Desktop.
Save cole-h/e276775c1c8a5fbf6f90768b793b9d72 to your computer and use it in GitHub Desktop.
systemd.user = {
services = {
sway = {
Unit = {
Description = "sway";
Documentation = [ "man:sway(5)" ];
BindsTo = [ "graphical-session.target" ];
Wants = [ "graphical-session-pre.target" ];
After = [ "graphical-session-pre.target" ];
};
Service = {
Type = "simple";
Environment = [
"LD_LIBRARY_PATH=${pkgs.mesa_drivers}/lib"
"LIBGL_DRIVERS_PATH=${pkgs.mesa_drivers}/lib/dri"
"SSH_AUTH_SOCK=%t/gnupg/S.gpg-agent.ssh"
];
ExecStart = "${config.wayland.windowManager.sway.package}/bin/sway";
ExecStop = "${config.wayland.windowManager.sway.package}/bin/swaymsg exit";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment