make usbmuxd optional
This commit is contained in:
parent
a61a40397f
commit
dadccdbe20
3 changed files with 15 additions and 8 deletions
|
@ -19,6 +19,7 @@
|
||||||
social.enable = true;
|
social.enable = true;
|
||||||
mail.enable = true;
|
mail.enable = true;
|
||||||
gaming.enable = true;
|
gaming.enable = true;
|
||||||
|
evremap.enable = true;
|
||||||
};
|
};
|
||||||
terminal.enable = true;
|
terminal.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -37,8 +37,8 @@
|
||||||
cloud.enable = true;
|
cloud.enable = true;
|
||||||
social.enable = true;
|
social.enable = true;
|
||||||
gaming.enable = true;
|
gaming.enable = true;
|
||||||
ios-compat.enable = true;
|
|
||||||
mail.enable = true;
|
mail.enable = true;
|
||||||
|
evremap.enable = false;
|
||||||
};
|
};
|
||||||
terminal.enable = true;
|
terminal.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, config, lib, ... }:
|
||||||
let
|
let
|
||||||
|
cfg = config.jade.desktop.evremap;
|
||||||
evremap = pkgs.rustPlatform.buildRustPackage {
|
evremap = pkgs.rustPlatform.buildRustPackage {
|
||||||
pname = "evremap";
|
pname = "evremap";
|
||||||
version = "0.1.0";
|
version = "0.1.0";
|
||||||
|
@ -17,12 +18,17 @@ let
|
||||||
nativeBuildInputs = [ pkgs.pkg-config ];
|
nativeBuildInputs = [ pkgs.pkg-config ];
|
||||||
buildInputs = [ pkgs.libevdev ];
|
buildInputs = [ pkgs.libevdev ];
|
||||||
};
|
};
|
||||||
in {
|
in with lib; {
|
||||||
systemd.services.evremap = {
|
options.jade.desktop.evremap = {
|
||||||
script = "${evremap}/bin/evremap remap ${../../other/remaps-${config.networking.hostName}.toml}";
|
enable = mkEnableOption "Enable evremap";
|
||||||
wantedBy = [ "multi-user.target" ];
|
};
|
||||||
unitConfig = {
|
config = mkIf cfg.enable {
|
||||||
Restart = "on-failure";
|
systemd.services.evremap = {
|
||||||
|
script = "${evremap}/bin/evremap remap ${../../other/remaps-${config.networking.hostName}.toml}";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
unitConfig = {
|
||||||
|
Restart = "on-failure";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue