gui: sway: remove useGreeter option (provide a greeter always, via suggestedPrograms)

This commit is contained in:
2024-02-21 20:59:34 +00:00
parent d77a12ce7b
commit 5b21257e4f
2 changed files with 2 additions and 37 deletions

View File

@@ -62,15 +62,6 @@ in
default = false; default = false;
type = types.bool; type = types.bool;
}; };
sane.gui.sway.useGreeter = mkOption {
description = ''
launch sway via a greeter (like greetd's gtkgreet).
sway is usable without a greeter, but skipping the greeter means no PAM session.
alternatively, one may launch it directly from a TTY, which does get a PAM session.
'';
default = true;
type = types.bool;
};
sane.gui.sway.config = { sane.gui.sway.config = {
extra_lines = mkOption { extra_lines = mkOption {
type = types.lines; type = types.lines;
@@ -149,6 +140,7 @@ in
# "swayidle" # enable if you need it # "swayidle" # enable if you need it
"swaylock" # used by sway config "swaylock" # used by sway config
"swaynotificationcenter" # notification daemon "swaynotificationcenter" # notification daemon
"unl0kr" # greeter
"waybar" # used by sway config "waybar" # used by sway config
"wdisplays" # like xrandr "wdisplays" # like xrandr
"wl-clipboard" "wl-clipboard"
@@ -172,8 +164,6 @@ in
# xdg-desktop-portal-wlr provides portals for screenshots/screen sharing # xdg-desktop-portal-wlr provides portals for screenshots/screen sharing
"xdg-desktop-portal-wlr" "xdg-desktop-portal-wlr"
"xdg-terminal-exec" # used by sway config "xdg-terminal-exec" # used by sway config
] ++ lib.optionals cfg.useGreeter [
"unl0kr"
]; ];
secrets.".config/sane-sway/snippets.txt" = ../../../../secrets/common/snippets.txt.bin; secrets.".config/sane-sway/snippets.txt" = ../../../../secrets/common/snippets.txt.bin;
@@ -235,29 +225,6 @@ in
# sane.gui.gtk.icon-theme = lib.mkDefault "rose-pine-dawn"; # 2.5/5 coverage on moby # sane.gui.gtk.icon-theme = lib.mkDefault "rose-pine-dawn"; # 2.5/5 coverage on moby
# sane.gui.gtk.icon-theme = lib.mkDefault "Flat-Remix-Grey-Light"; # requires qtbase # sane.gui.gtk.icon-theme = lib.mkDefault "Flat-Remix-Grey-Light"; # requires qtbase
# swap in these lines to use `greetd`+`gtkgreet` instead:
# sane.gui.greetd = lib.mkIf cfg.useGreeter {
# enable = true;
# sway.enable = true; # have greetd launch a sway compositor in which we host a greeter
# sway.gtkgreet = {
# enable = true;
# session.name = "sway-on-gtkgreet";
# session.command = "${cfg.package}/bin/sway"; #< works, simplest way to run sway
# # session.command = "${pkgs.libcap}/bin/capsh --print"; # DEBUGGING
# # instead, want to run sway as a systemd user service.
# # this seems silly, but it allows the launched sway to access any linux capabilities which the systemd --user manager is granted.
# # notably, that means CAP_NET_ADMIN, CAP_NET_RAW; necessary for wireshark.
# # these capabilities are granted to systemd --user by pam. see the user definition in hosts/common/users/colin.nix for more.
# # session.command = "${pkgs.systemd}/bin/systemd-run --user --wait --collect --service-type=exec ${cfg.package}/bin/sway"; #< works, but can't launch terminals, etc ("exec: no such file" (sh))
# # session.command = ''${pkgs.systemd}/bin/systemd-run --user --wait --collect --service-type=exec -E "PATH=$PATH" -p AmbientCapabilities="cap_net_admin cap_net_raw" ${cfg.package}/bin/sway'';
# };
# };
# swap in these lines to use SDDM instead:
# services.xserver.displayManager.sddm.enable = true;
# services.xserver.enable = true;
# unlike other DEs, sway configures no audio stack # unlike other DEs, sway configures no audio stack
# administer with pw-cli, pw-mon, pw-top commands # administer with pw-cli, pw-mon, pw-top commands
services.pipewire = { services.pipewire = {

View File

@@ -292,6 +292,7 @@ in
(lib.mkIf cfg.enable (lib.mkMerge [ (lib.mkIf cfg.enable (lib.mkMerge [
{ {
sane.programs.unl0kr.enableFor.user.colin = (cfg.greeter == "unl0kr");
sane.programs.waybar.config = { sane.programs.waybar.config = {
top = import ./waybar-top.nix { inherit pkgs; }; top = import ./waybar-top.nix { inherit pkgs; };
# reset extra waybar style # reset extra waybar style
@@ -299,9 +300,6 @@ in
}; };
sane.gui.sway = { sane.gui.sway = {
enable = true; enable = true;
# we manage the greeter ourselves (TODO: merge this into sway config as well)
# EXCEPT for the unl0kr case, since that works well on both mobile and desktop!
useGreeter = cfg.greeter == "unl0kr";
config = { config = {
# N.B. missing from upstream sxmo config here is: # N.B. missing from upstream sxmo config here is:
# - `bindsym $mod+g exec sxmo_hook_locker.sh` # - `bindsym $mod+g exec sxmo_hook_locker.sh`