From 725966b870d983b59af74246a7a6d03a12aa8923 Mon Sep 17 00:00:00 2001 From: sohalt Date: Wed, 18 Dec 2019 12:32:35 +0100 Subject: [PATCH] nixos/spacenavd: init --- nixos/modules/module-list.nix | 1 + nixos/modules/services/hardware/spacenavd.nix | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 nixos/modules/services/hardware/spacenavd.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 0d26b7300d0..1d0312061df 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -377,6 +377,7 @@ ./services/hardware/sane.nix ./services/hardware/sane_extra_backends/brscan4.nix ./services/hardware/sane_extra_backends/dsseries.nix + ./services/hardware/spacenavd.nix ./services/hardware/tcsd.nix ./services/hardware/tlp.nix ./services/hardware/thinkfan.nix 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"; + }; + }; + }; +}