Add support for the system76 launch keyboard configurator.

This commit is contained in:
Tom Alexander
2025-01-14 20:16:06 -05:00
parent 63408f5664
commit 5a5839482d
5 changed files with 958 additions and 4 deletions

View File

@@ -256,7 +256,7 @@ let
in
{
imports = [
../kanshi
./graphical_session_target.nix
];
options.me.swayIncludes = lib.mkOption {
@@ -310,14 +310,12 @@ in
extraOptions =
if config.me.buildingIso then
[
"--debug"
"--config"
"${sway-config}"
"--unsupported-gpu"
]
else
[
"--debug"
"--config"
"${sway-config}"
];
@@ -384,7 +382,7 @@ in
environment.loginShellInit = ''
# TODO: This shouldn't be shoe-horned into the sway config
doas iw dev wlan0 set power_save off
[[ "$(tty)" = "/dev/tty1" ]] && exec sway
[ -z "$WAYLAND_DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ] && [ "$(tty)" = "/dev/tty1" ] && exec ${pkgs.systemd}/bin/systemd-cat --identifier=sway sway
'';
};
}

View File

@@ -0,0 +1,24 @@
{
config,
lib,
pkgs,
...
}:
let
start_sway_session = pkgs.writeTextFile {
name = "start_sway_session.conf";
text = ''
# Trigger graphical-session.target through sway-session.target so systemd user units can depend on it.
exec systemctl --user start sway-session.target
'';
};
in
{
imports = [ ];
me.swayIncludes = lib.mkAfter [
start_sway_session
];
}