From b6bbdb51fbdbd0d86df8f814c2abd160a017a0a2 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Wed, 7 Aug 2024 12:52:51 -0500 Subject: [PATCH] auto activate hyprland --- modules/desktop/window-managers/hyprland.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/modules/desktop/window-managers/hyprland.nix b/modules/desktop/window-managers/hyprland.nix index 883377f..3f2b2ba 100644 --- a/modules/desktop/window-managers/hyprland.nix +++ b/modules/desktop/window-managers/hyprland.nix @@ -6,6 +6,13 @@ flake, ... }: +let + activate-snippet = '' + if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" = 1 ]; then + exec Hyprland + fi + ''; +in mkOizysModule config "hyprland" { programs.hyprland = enabled; @@ -53,6 +60,16 @@ mkOizysModule config "hyprland" { # dunst ]); + services.getty = { + extraArgs = [ "--skip-login" ]; + loginOptions = "-p -- ${config.oizys.user}"; + }; + + environment.etc = { + "bashrc.local".text = activate-snippet; + "zshenv.local".text = activate-snippet; + }; + nixpkgs.overlays = [ (flake.overlay "hyprland-contrib") # (overlayFrom "nixpkgs-wayland")