Do not install the launch keyboard configurator on neelix or non-graphical installs.
This commit is contained in:
parent
88a6d046b8
commit
ea7bf809fc
@ -43,5 +43,6 @@
|
|||||||
me.kanshi.enable = true;
|
me.kanshi.enable = true;
|
||||||
me.kubernetes.enable = true;
|
me.kubernetes.enable = true;
|
||||||
me.latex.enable = true;
|
me.latex.enable = true;
|
||||||
|
me.launch_keyboard.enable = true;
|
||||||
me.sway.enable = true;
|
me.sway.enable = true;
|
||||||
}
|
}
|
||||||
|
@ -8,28 +8,41 @@
|
|||||||
{
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
config = lib.mkIf config.me.graphical {
|
options.me = {
|
||||||
environment.systemPackages = with pkgs; [
|
launch_keyboard.enable = lib.mkOption {
|
||||||
system76-keyboard-configurator
|
type = lib.types.bool;
|
||||||
dfu-programmer # For flashing keyboard https://support.system76.com/articles/launch_2-firmware-update/
|
default = false;
|
||||||
avrdude # For flashing keyboard https://support.system76.com/articles/launch_2-firmware-update/
|
example = true;
|
||||||
lxqt.lxqt-policykit # Need a polkit agent to launch the keyboard configurator
|
description = "Whether we want to install launch_keyboard.";
|
||||||
];
|
|
||||||
|
|
||||||
systemd = {
|
|
||||||
user.services.lxqt-policykit-agent = {
|
|
||||||
description = "lxqt-policykit-agent";
|
|
||||||
wantedBy = [ "graphical-session.target" ];
|
|
||||||
wants = [ "graphical-session.target" ];
|
|
||||||
after = [ "graphical-session.target" ];
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "simple";
|
|
||||||
ExecStart = "${pkgs.lxqt.lxqt-policykit}/bin/lxqt-policykit-agent";
|
|
||||||
Restart = "on-failure";
|
|
||||||
RestartSec = 1;
|
|
||||||
TimeoutStopSec = 10;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.me.launch_keyboard.enable (
|
||||||
|
lib.mkMerge [
|
||||||
|
(lib.mkIf config.me.graphical {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
system76-keyboard-configurator
|
||||||
|
dfu-programmer # For flashing keyboard https://support.system76.com/articles/launch_2-firmware-update/
|
||||||
|
avrdude # For flashing keyboard https://support.system76.com/articles/launch_2-firmware-update/
|
||||||
|
lxqt.lxqt-policykit # Need a polkit agent to launch the keyboard configurator
|
||||||
|
];
|
||||||
|
|
||||||
|
systemd = {
|
||||||
|
user.services.lxqt-policykit-agent = {
|
||||||
|
description = "lxqt-policykit-agent";
|
||||||
|
wantedBy = [ "graphical-session.target" ];
|
||||||
|
wants = [ "graphical-session.target" ];
|
||||||
|
after = [ "graphical-session.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${pkgs.lxqt.lxqt-policykit}/bin/lxqt-policykit-agent";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = 1;
|
||||||
|
TimeoutStopSec = 10;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user