hyprland: Start on login

By adding a script to start Hyprland to the profile of our shell, when
we login the script will run and start Hyprland for us. To make sure we
can still access a TTY if something goes wrong, we'll check to make sure
this only activates on TTY1

Change-Id: Idf7277085a5ebda0bc44d416dcd6c495d92d48be

---

This change is adapted from one of my previous nix configs:
https://git.clicks.codes/plugins/gitiles/Minion/NixFiles/+/refs/heads/archive-2/src/apps/personal/sway.nix#217

Back then I used zsh, so this should work on zsh. I have not tested it
with zsh though, so it would be excellent if @coded@clicks.codes could
before this is merged

Change-Id: I02cbe2c60015a39637be95d23cb54d4f3bf1aa1a
Reviewed-on: https://git.clicks.codes/c/Chimera/NixFiles/+/438
Tested-by: Skyler Grey <minion@clicks.codes>
Reviewed-by: Samuel Shuert <coded@clicks.codes>
diff --git a/modules/home/hyprland/default.nix b/modules/home/hyprland/default.nix
index 14dac7b..539523b 100644
--- a/modules/home/hyprland/default.nix
+++ b/modules/home/hyprland/default.nix
@@ -43,6 +43,18 @@
   };
 
   config = lib.mkIf config.chimera.hyprland.enable {
+    programs.bash.profileExtra = lib.mkIf config.chimera.shell.bash.enable (lib.mkBefore ''
+      if [ -z $WAYLAND_DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
+        exec systemd-cat -t hyprland Hyprland
+      fi
+    '');
+
+    programs.zsh.profileExtra = lib.mkIf config.chimera.shell.zsh.enable (lib.mkBefore ''
+      if [ -z $WAYLAND_DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
+        exec systemd-cat -t hyprland Hyprland
+      fi
+    '');
+
     home.packages = [ pkgs.hyprpicker ];
 
     services.fusuma.settings.swipe = lib.mkIf config.chimera.touchpad.enable (