Switch to greetd to fix the service crisis

This commit is contained in:
Bun 2025-05-06 08:23:30 -04:00
parent bbe92e5cd7
commit fbec76baa7
9 changed files with 31 additions and 19 deletions

View file

@ -31,7 +31,6 @@
}; };
services = { services = {
displayManager.ly.enable = lib.mkForce false;
keyd.enable = lib.mkForce false; keyd.enable = lib.mkForce false;
tlp.enable = lib.mkForce false; tlp.enable = lib.mkForce false;
xserver.desktopManager.gnome.enable = true; xserver.desktopManager.gnome.enable = true;

View file

@ -17,5 +17,5 @@
stateVersion = "24.05"; stateVersion = "24.05";
}; };
environment.sessionVariables.WLR_RENDERER = lib.mkForce "gles2"; programs.sway.extraSessionCommands = lib.mkForce "WLR_RENDERER=gles2";
} }

View file

@ -4,11 +4,9 @@
username = "bun"; username = "bun";
homeDirectory = "/home/${config.home.username}"; homeDirectory = "/home/${config.home.username}";
sessionVariables = { sessionVariables = {
ELECTRON_OZONE_PLATFORM_HINT = "auto";
LIBVIRT_DEFAULT_URI = "qemu:///system"; LIBVIRT_DEFAULT_URI = "qemu:///system";
MANPAGER = "nvim +Man!"; MANPAGER = "nvim +Man!";
NIXPKGS_ALLOW_UNFREE = 1; NIXPKGS_ALLOW_UNFREE = 1;
ZSH_DISABLE_COMPFIX = "true";
}; };
}; };
} }

View file

@ -0,0 +1,4 @@
{ config, ... }:
{
services.clipman.enable = config.home.desktop.enable;
}

View file

@ -1,22 +1,21 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
imports = [ imports = [
./clipman
./kanshi ./kanshi
./mako ./mako
./rofi ./rofi
./swaylock ./swaylock
./waybar ./waybar
./wlsunset
]; ];
home.packages = with pkgs; lib.mkIf config.home.desktop.enable [ home.packages = with pkgs; lib.mkIf config.home.desktop.enable [
brightnessctl brightnessctl
clipman
hyprpicker hyprpicker
libnotify libnotify
rot8 rot8
shotman shotman
wdisplays wdisplays
wl-clipboard
wlsunset
]; ];
} }

View file

@ -0,0 +1,8 @@
{ config, ... }:
{
services.wlsunset = {
enable = config.home.desktop.enable;
sunrise = "07:30";
sunset = "22:30";
};
}

View file

@ -10,13 +10,7 @@
{ command = "foot -a sound -T Sound pulsemixer"; } { command = "foot -a sound -T Sound pulsemixer"; }
# Daemons and tray # Daemons and tray
{ command = "kanshi"; }
{ command = "mako"; }
{ command = "rot8"; } { command = "rot8"; }
{ command = "wl-copy"; }
{ command = "wl-paste -t text --watch clipman store -P"; }
{ command = "wlsunset -s 22:30 -S 07:30"; }
{ command = "wpaperd"; }
# Foreground # Foreground
{ command = "thunderbird"; } { command = "thunderbird"; }

View file

@ -4,11 +4,13 @@
programs.sway = { programs.sway = {
enable = true; enable = true;
extraOptions = [ "--unsupported-gpu" ]; extraOptions = [ "--unsupported-gpu" ];
extraSessionCommands = ''
export ELECTRON_OZONE_PLATFORM_HINT=wayland
export WLR_RENDERER=vulkan
'';
wrapperFeatures.gtk = true; wrapperFeatures.gtk = true;
}; };
environment.sessionVariables.WLR_RENDERER = "vulkan";
services.dbus.enable = true; services.dbus.enable = true;
security.pam.services.swaylock = {}; security.pam.services.swaylock = {};
}; };

View file

@ -1,10 +1,18 @@
{ config, lib, ... }: { config, lib, pkgs, ... }:
{ {
config = lib.mkIf config.system.desktop.enable { config = lib.mkIf config.system.desktop.enable {
services.displayManager.ly = { services.greetd = {
enable = true; enable = true;
settings.vi_mode = true; settings.default_session.command = lib.mkDefault (lib.strings.concatStringsSep " " [
"${pkgs.greetd.tuigreet}/bin/tuigreet"
"--asterisks"
"--remember"
"--remember-user-session"
"--time"
"--user-menu"
]);
vt = 2;
}; };
environment.persistence."/persist".files = [ "/etc/ly/save.ini" ]; environment.persistence."/persist".files = [ "/var/cache/tuigreet" ];
}; };
} }