mirror of
https://forge.katzen.cafe/schrottkatze/nix-configs.git
synced 2024-11-24 22:18:43 +01:00
make usbmuxd optional
This commit is contained in:
parent
a61a40397f
commit
dadccdbe20
|
@ -19,6 +19,7 @@
|
|||
social.enable = true;
|
||||
mail.enable = true;
|
||||
gaming.enable = true;
|
||||
evremap.enable = true;
|
||||
};
|
||||
terminal.enable = true;
|
||||
};
|
||||
|
|
|
@ -37,8 +37,8 @@
|
|||
cloud.enable = true;
|
||||
social.enable = true;
|
||||
gaming.enable = true;
|
||||
ios-compat.enable = true;
|
||||
mail.enable = true;
|
||||
evremap.enable = false;
|
||||
};
|
||||
terminal.enable = true;
|
||||
};
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{ pkgs, config, ... }:
|
||||
{ pkgs, config, lib, ... }:
|
||||
let
|
||||
cfg = config.jade.desktop.evremap;
|
||||
evremap = pkgs.rustPlatform.buildRustPackage {
|
||||
pname = "evremap";
|
||||
version = "0.1.0";
|
||||
|
@ -17,7 +18,11 @@ let
|
|||
nativeBuildInputs = [ pkgs.pkg-config ];
|
||||
buildInputs = [ pkgs.libevdev ];
|
||||
};
|
||||
in {
|
||||
in with lib; {
|
||||
options.jade.desktop.evremap = {
|
||||
enable = mkEnableOption "Enable evremap";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
systemd.services.evremap = {
|
||||
script = "${evremap}/bin/evremap remap ${../../other/remaps-${config.networking.hostName}.toml}";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
@ -25,4 +30,5 @@ in {
|
|||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue