summary refs log tree commit diff
path: root/nixos/modules/services/hardware
diff options
context:
space:
mode:
authorsohalt <sohalt@sohalt.net>2019-12-18 12:32:35 +0100
committersohalt <sohalt@sohalt.net>2021-02-18 15:08:20 +0100
commit725966b870d983b59af74246a7a6d03a12aa8923 (patch)
tree301b38ee100af422f3a317184c5d0c57d04b335f /nixos/modules/services/hardware
parent4f19003feccd8fa83c52eae915c4bdf2cc3816cd (diff)
downloadnixpkgs-725966b870d983b59af74246a7a6d03a12aa8923.tar
nixpkgs-725966b870d983b59af74246a7a6d03a12aa8923.tar.gz
nixpkgs-725966b870d983b59af74246a7a6d03a12aa8923.tar.bz2
nixpkgs-725966b870d983b59af74246a7a6d03a12aa8923.tar.lz
nixpkgs-725966b870d983b59af74246a7a6d03a12aa8923.tar.xz
nixpkgs-725966b870d983b59af74246a7a6d03a12aa8923.tar.zst
nixpkgs-725966b870d983b59af74246a7a6d03a12aa8923.zip
nixos/spacenavd: init
Diffstat (limited to 'nixos/modules/services/hardware')
-rw-r--r--nixos/modules/services/hardware/spacenavd.nix26
1 files changed, 26 insertions, 0 deletions
diff --git a/nixos/modules/services/hardware/spacenavd.nix b/nixos/modules/services/hardware/spacenavd.nix
new file mode 100644
index 00000000000..7afae76cc4f
--- /dev/null
+++ b/nixos/modules/services/hardware/spacenavd.nix
@@ -0,0 +1,26 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let cfg = config.hardware.spacenavd;
+
+in {
+
+  options = {
+    hardware.spacenavd = {
+      enable = mkEnableOption "spacenavd to support 3DConnexion devices";
+    };
+  };
+
+  config = mkIf cfg.enable {
+    systemd.user.services.spacenavd = {
+      description = "Daemon for the Spacenavigator 6DOF mice by 3Dconnexion";
+      after = [ "syslog.target" ];
+      wantedBy = [ "graphical.target" ];
+      serviceConfig = {
+        ExecStart = "${pkgs.spacenavd}/bin/spacenavd -d -l syslog";
+        StandardError = "syslog";
+      };
+    };
+  };
+}