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.kubernetes.enable = true;
|
||||
me.latex.enable = true;
|
||||
me.launch_keyboard.enable = true;
|
||||
me.sway.enable = true;
|
||||
}
|
||||
|
@ -8,28 +8,41 @@
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
config = 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;
|
||||
};
|
||||
};
|
||||
options.me = {
|
||||
launch_keyboard.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether we want to install launch_keyboard.";
|
||||
};
|
||||
};
|
||||
|
||||
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