summary refs log tree commit diff
path: root/nixos/modules/services/hardware
diff options
context:
space:
mode:
authorpurin <purin@aurelia.cafe>2023-05-10 01:34:21 +1200
committerpurin <purin@aurelia.cafe>2023-05-10 01:34:21 +1200
commit95951134807baa62b5488898cb62aa54991c1f5e (patch)
tree95fab798c2c66e50df4acaf87025bdda31755095 /nixos/modules/services/hardware
parent897876e4c484f1e8f92009fd11b7d988a121a4e7 (diff)
downloadnixpkgs-95951134807baa62b5488898cb62aa54991c1f5e.tar
nixpkgs-95951134807baa62b5488898cb62aa54991c1f5e.tar.gz
nixpkgs-95951134807baa62b5488898cb62aa54991c1f5e.tar.bz2
nixpkgs-95951134807baa62b5488898cb62aa54991c1f5e.tar.lz
nixpkgs-95951134807baa62b5488898cb62aa54991c1f5e.tar.xz
nixpkgs-95951134807baa62b5488898cb62aa54991c1f5e.tar.zst
nixpkgs-95951134807baa62b5488898cb62aa54991c1f5e.zip
nixos/openrgb: fix data dir & amd i2c
Diffstat (limited to 'nixos/modules/services/hardware')
-rw-r--r--nixos/modules/services/hardware/openrgb.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/nixos/modules/services/hardware/openrgb.nix b/nixos/modules/services/hardware/openrgb.nix
index 12438f01e52..310615ecc53 100644
--- a/nixos/modules/services/hardware/openrgb.nix
+++ b/nixos/modules/services/hardware/openrgb.nix
@@ -34,14 +34,15 @@ in {
     services.udev.packages = [ cfg.package ];
 
     boot.kernelModules = [ "i2c-dev" ]
-     ++ lib.optionals (cfg.motherboard == "amd") [ "i2c-piix" ]
+     ++ lib.optionals (cfg.motherboard == "amd") [ "i2c-piix4" ]
      ++ lib.optionals (cfg.motherboard == "intel") [ "i2c-i801" ];
 
     systemd.services.openrgb = {
       description = "OpenRGB server daemon";
       wantedBy = [ "multi-user.target" ];
-
       serviceConfig = {
+        StateDirectory = "OpenRGB";
+        WorkingDirectory = "/var/lib/OpenRGB";
         ExecStart = "${cfg.package}/bin/openrgb --server --server-port ${toString cfg.server.port}";
         Restart = "always";
       };