about summary refs log tree commit diff
path: root/nixos/modules/programs/joycond-cemuhook.nix
diff options
context:
space:
mode:
author~noodlez1232 <contact@nathanielbarragan.xyz>2023-10-30 11:35:30 -0700
committer~noodlez1232 <contact@nathanielbarragan.xyz>2023-11-10 18:09:55 -0800
commitf1047f611df1754555bd98d6f90cac7f02c5f24f (patch)
tree8a0bff45cb4b98329fcf11c63a35934366740421 /nixos/modules/programs/joycond-cemuhook.nix
parent47b7aae9d00cacacf7242cdae24fe26574280c22 (diff)
joycond-cemuhook: init at unstable-2023-08-09
Diffstat (limited to 'nixos/modules/programs/joycond-cemuhook.nix')
-rw-r--r--nixos/modules/programs/joycond-cemuhook.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/nixos/modules/programs/joycond-cemuhook.nix b/nixos/modules/programs/joycond-cemuhook.nix
new file mode 100644
index 0000000000000..7b129868db28c
--- /dev/null
+++ b/nixos/modules/programs/joycond-cemuhook.nix
@@ -0,0 +1,17 @@
+{ lib, pkgs, config, ... }:
+with lib;
+{
+  options.programs.joycond-cemuhook = {
+    enable = mkEnableOption (lib.mdDoc "joycond-cemuhook, a program to enable support for cemuhook's UDP protocol for joycond devices.");
+  };
+
+  config = lib.mkIf config.programs.joycond-cemuhook.enable {
+    assertions = [
+      {
+        assertion = config.services.joycond.enable;
+        message = "joycond must be enabled through `services.joycond.enable`";
+      }
+    ];
+    environment.systemPackages = [ pkgs.joycond-cemuhook ];
+  };
+}