diff --git a/home/programs/terminal/shell/zsh/rc/profile.zsh b/home/programs/terminal/shell/zsh/rc/profile.zsh index 1abf3fa..de4a41f 100644 --- a/home/programs/terminal/shell/zsh/rc/profile.zsh +++ b/home/programs/terminal/shell/zsh/rc/profile.zsh @@ -9,12 +9,12 @@ if [ -d "$HOME/.local/bin" ]; then PATH+=":${$(find -L ~/.local/bin -type d | tr '\n' ':')%%:}" fi -# I'm using a greeter now, so the below is disabled. # Start graphical session automatically on tty1 if Hyprland or startx is available -#if [ "$(tty)" = "/dev/tty1" ] && [ "$UID" != 0 ]; then -# if command -v Hyprland >/dev/null; then -# ! pidof -s Hyprland >/dev/null 2>&1 && Hyprland -# elif command -v startx >/dev/null; then -# ! pidof -s Xorg >/dev/null 2>&1 && exec startx "$XINITRC" -# fi -#fi +if [ "$(tty)" = "/dev/tty1" ] && [ "$UID" != 0 ]; then + if command -v Hyprland >/dev/null; then + ! pidof -s Hyprland >/dev/null 2>&1 && Hyprland + elif command -v startx >/dev/null; then + ! pidof -s Xorg >/dev/null 2>&1 && exec startx "$XINITRC" + fi +fi + diff --git a/options/home/theme.nix b/options/home/theme.nix index 1503539..e53d8de 100644 --- a/options/home/theme.nix +++ b/options/home/theme.nix @@ -125,13 +125,13 @@ in cursor = { name = mkOption { type = types.str; - default = "BreezeX-RosePine-Linux"; + default = "catppuccin-mocha-dark-cursors"; description = "The name of the cursor inside the package"; }; package = mkOption { type = types.package; - default = pkgs.rose-pine-cursor; + default = pkgs.catppuccin-cursors.mochaDark; description = "The package providing the cursors"; }; diff --git a/system/roles/workstation/display/default.nix b/system/roles/workstation/display/default.nix index 438f8c9..638bb65 100644 --- a/system/roles/workstation/display/default.nix +++ b/system/roles/workstation/display/default.nix @@ -1,6 +1,5 @@ { imports = [ - ./login ./wayland ]; } diff --git a/system/roles/workstation/display/login/default.nix b/system/roles/workstation/display/login/default.nix deleted file mode 100644 index 9163d23..0000000 --- a/system/roles/workstation/display/login/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - imports = [ - ./greetd.nix - ./pam.nix - ]; -} diff --git a/system/roles/workstation/display/login/greetd.nix b/system/roles/workstation/display/login/greetd.nix deleted file mode 100644 index 9590df6..0000000 --- a/system/roles/workstation/display/login/greetd.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: let - inherit (lib) mkIf getExe; - inherit (lib.strings) concatStringsSep; - - - deviceType = config.myOptions.device.roles.type; - acceptedTypes = ["laptop" "desktop"]; - - sessionData = config.services.displayManager.sessionData.desktops; - sessionPaths = concatStringsSep ":" [ - "${sessionData}/share/xsessions" - "${sessionData}/share/wayland-sessions" - ]; - - defaultSession = { - user = "greeter"; - command = concatStringsSep " " [ - (getExe pkgs.greetd.tuigreet) - "--time" - "--remember" - "--remember-user-session" - "--asterisks" - "--sessions '${sessionPaths}'" - ]; - }; -in { - config = mkIf (builtins.elem deviceType acceptedTypes) { - services.greetd = { - enable = true; - vt = 2; - - # - settings = { - # default session is what will be used if no session is selected - # in this case it'll be a TUI greeter - default_session = defaultSession; - }; - }; - - # Suppress error messages on tuigreet. They sometimes obscure the TUI - # boundaries of the greeter. - # See: https://github.com/apognu/tuigreet/issues/68#issuecomment-1586359960 - systemd.services.greetd.serviceConfig = { - Type = "idle"; - StandardInputs = "tty"; - StandardOutput = "tty"; - StandardError = "journal"; - TTYReset = true; - TTYVHangup = true; - TTYVTDisallocate = true; - }; - }; -} diff --git a/system/roles/workstation/display/login/pam.nix b/system/roles/workstation/display/login/pam.nix deleted file mode 100644 index 7848f9a..0000000 --- a/system/roles/workstation/display/login/pam.nix +++ /dev/null @@ -1,31 +0,0 @@ -{lib, config, ...}: let - inherit (lib) mkIf; - deviceType = config.myOptions.device.roles.type; - acceptedTypes = ["laptop" "desktop"]; -in { - config = mkIf (builtins.elem deviceType acceptedTypes) { - # unlock GPG keyring on login - security.pam.services = let - gnupg = { - enable = true; - noAutostart = true; - storeOnly = true; - }; - in { - login = { - enableGnomeKeyring = true; - inherit gnupg; - }; - - greetd = { - enableGnomeKeyring = true; - inherit gnupg; - }; - - tuigreet = { - enableGnomeKeyring = true; - inherit gnupg; - }; - }; - }; -} diff --git a/system/roles/workstation/services/default.nix b/system/roles/workstation/services/default.nix index ec9cd53..3f856bc 100644 --- a/system/roles/workstation/services/default.nix +++ b/system/roles/workstation/services/default.nix @@ -4,8 +4,6 @@ ./mount.nix ./printing.nix ./misc.nix - ./logind.nix - ./gnome-keyring.nix ]; } diff --git a/system/roles/workstation/services/gnome-keyring.nix b/system/roles/workstation/services/gnome-keyring.nix deleted file mode 100644 index 23d8589..0000000 --- a/system/roles/workstation/services/gnome-keyring.nix +++ /dev/null @@ -1,20 +0,0 @@ -{pkgs, lib, config, ...}: let - inherit (lib) mkIf; - deviceType = config.myOptions.device.roles.type; - acceptedTypes = ["laptop" "desktop"]; -in { - config = mkIf (builtins.elem deviceType acceptedTypes) { - services = { - udev.packages = with pkgs; [gnome.gnome-settings-daemon]; - gnome.gnome-keyring.enable = true; - }; - - # seahorse is an application for managing encryption keys - # and passwords in the gnome keyring - programs.seahorse.enable = true; - - xdg.portal.config.common = { - "org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ]; - }; - }; -} diff --git a/system/roles/workstation/services/logind.nix b/system/roles/workstation/services/logind.nix deleted file mode 100644 index 86f778b..0000000 --- a/system/roles/workstation/services/logind.nix +++ /dev/null @@ -1,18 +0,0 @@ -{lib, config, ...}: let - inherit (lib) mkIf; - deviceType = config.myOptions.device.roles.type; - acceptedTypes = ["laptop" "desktop"]; -in { - config = mkIf (builtins.elem deviceType acceptedTypes) { - # despite being under logind, this has nothing to do with login - # it's about power management - services.logind = { - lidSwitch = "suspend-then-hibernate"; - lidSwitchExternalPower = "lock"; - extraConfig = '' - HandlePowerKey=suspend-then-hibernate - HibernateDelaySec=3600 - ''; - }; - }; -}