kdeconnect: enable and work around env in gamescope session
This commit is contained in:
parent
6483e240e1
commit
0c30936230
2 changed files with 28 additions and 4 deletions
options/custom/services
|
@ -17,7 +17,7 @@ with lib; {
|
||||||
dbus.enable = true;
|
dbus.enable = true;
|
||||||
flatpak.enable = true;
|
flatpak.enable = true;
|
||||||
fwupd.enable = true;
|
fwupd.enable = true;
|
||||||
#// kdeconnect.enable = true;
|
kdeconnect.enable = true;
|
||||||
libinput.enable = true;
|
libinput.enable = true;
|
||||||
logind.enable = true;
|
logind.enable = true;
|
||||||
openrazer.enable = true;
|
openrazer.enable = true;
|
||||||
|
|
|
@ -1,15 +1,39 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
cfg = config.custom.services.kdeconnect;
|
cfg = config.custom.services.kdeconnect;
|
||||||
in {
|
in {
|
||||||
options.custom.services.kdeconnect.enable = mkOption {default = false;};
|
options.custom.services.kdeconnect = {
|
||||||
|
enable = mkOption {default = false;};
|
||||||
|
display = mkOption {default = null;};
|
||||||
|
package = mkOption {default = mkForce pkgs.kdePackages.kdeconnect-kde;};
|
||||||
|
};
|
||||||
|
|
||||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
# https://github.com/KDE/kdeconnect-kde
|
# https://github.com/KDE/kdeconnect-kde
|
||||||
services.kdeconnect.enable = true;
|
programs.kdeconnect = {
|
||||||
|
enable = true;
|
||||||
|
package = cfg.package;
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.sharedModules = [
|
||||||
|
{
|
||||||
|
services.kdeconnect = {
|
||||||
|
enable = true;
|
||||||
|
package = cfg.package;
|
||||||
|
};
|
||||||
|
|
||||||
|
# HACK: Manually set DISPLAY variable if specified
|
||||||
|
systemd.user.services.kdeconnect = mkIf (!isNull cfg.display) {
|
||||||
|
Service = {
|
||||||
|
Environment = ["DISPLAY=:${toString cfg.display}"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue