From 308206d1cc981bbdb25d5bbd5fd080a02f4a14cc Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 18 Jan 2025 11:55:12 -0500 Subject: [PATCH] Launch a terminal at boot in the live ISO. --- nix/configuration/roles/sway/default.nix | 1 + nix/configuration/roles/sway/iso.nix | 25 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 nix/configuration/roles/sway/iso.nix diff --git a/nix/configuration/roles/sway/default.nix b/nix/configuration/roles/sway/default.nix index cd55c21..2a6a0b5 100644 --- a/nix/configuration/roles/sway/default.nix +++ b/nix/configuration/roles/sway/default.nix @@ -258,6 +258,7 @@ in { imports = [ ./graphical_session_target.nix + ./iso.nix ]; options.me.swayIncludes = lib.mkOption { diff --git a/nix/configuration/roles/sway/iso.nix b/nix/configuration/roles/sway/iso.nix new file mode 100644 index 0000000..6882e71 --- /dev/null +++ b/nix/configuration/roles/sway/iso.nix @@ -0,0 +1,25 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + launch_terminal = pkgs.writeTextFile { + name = "launch_terminal.conf"; + text = '' + exec ${pkgs.alacritty}/bin/alacritty + ''; + }; +in +{ + imports = [ ]; + + config = lib.mkIf (config.me.buildingIso) { + # Launch a terminal at boot in the live ISO for when hotkeys don't work. + me.swayIncludes = [ + launch_terminal + ]; + }; +}