From 4b7903845a2e23ade868e3ada480cbdd402fd9ab Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Sun, 22 Feb 2026 16:47:06 -0500 Subject: [PATCH] this better work --- hosts/xps15/configuration.nix | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/hosts/xps15/configuration.nix b/hosts/xps15/configuration.nix index 701e51d..c1a149c 100644 --- a/hosts/xps15/configuration.nix +++ b/hosts/xps15/configuration.nix @@ -7,8 +7,16 @@ let tuigreet = lib.getExe pkgs.tuigreet; - loginShell = pkgs.writeShellScript "login-shell" '' - exec $(getent passwd $(id -un) | cut -d: -f7) -l + hyprSession = pkgs.writeShellScript "hypr-session" '' + for _hm in "/etc/profiles/per-user/$(id -un)" "$HOME/.nix-profile"; do + [ -f "$_hm/etc/profile.d/hm-session-vars.sh" ] && . "$_hm/etc/profile.d/hm-session-vars.sh" && break + done + unset _hm + _tf="''${XDG_STATE_HOME:-$HOME/.local/state}/theme" + THEME="$(cat "$_tf" 2>/dev/null)" || THEME="midnight" + export THEME + unset _tf + exec Hyprland ''; in { @@ -90,19 +98,6 @@ in g = "git"; nv = "nvim"; }; - loginShellInit = '' - for _hm in "/etc/profiles/per-user/$(id -un)" "$HOME/.nix-profile"; do - [ -f "$_hm/etc/profile.d/hm-session-vars.sh" ] && . "$_hm/etc/profile.d/hm-session-vars.sh" && break - done - unset _hm - _tf="''${XDG_STATE_HOME:-$HOME/.local/state}/theme" - THEME="$(cat "$_tf" 2>/dev/null)" || THEME="midnight" - export THEME - unset _tf - if [ "$(tty)" = "/dev/tty1" ]; then - exec Hyprland - fi - ''; }; programs.hyprland = { enable = true; @@ -137,7 +132,7 @@ in services.greetd = { enable = true; settings.default_session = { - command = "${tuigreet} --time --asterisks --cmd ${loginShell}"; + command = "${tuigreet} --time --asterisks --cmd ${hyprSession}"; user = "greeter"; }; };