Add support for the system76 launch keyboard configurator.
This commit is contained in:
@@ -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
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
24
nix/configuration/roles/sway/graphical_session_target.nix
Normal file
24
nix/configuration/roles/sway/graphical_session_target.nix
Normal 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
|
||||
];
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user