about summary refs log tree commit diff
path: root/nixos/modules/hardware/corectrl.nix
diff options
context:
space:
mode:
authorNanotwerp <Nanotwerp@gmail.com>2024-01-22 20:36:19 -0500
committerNano Twerpus <nanotwerp@gmail.com>2024-01-23 15:35:44 -0500
commit6638cf69fe24014cfce77fa19900d4e61f11f8ff (patch)
treec0b46cea7d4a2255d72eb2d1d69e4b7c71efaa2c /nixos/modules/hardware/corectrl.nix
parent017cdc3ef60d265a228dce852e0a3c06fd711c80 (diff)
nixos/corectrl: add package option
Co-authored-by: Emily <git@emilylange.de>
Diffstat (limited to 'nixos/modules/hardware/corectrl.nix')
-rw-r--r--nixos/modules/hardware/corectrl.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/nixos/modules/hardware/corectrl.nix b/nixos/modules/hardware/corectrl.nix
index 8ef61a158d5ce..b1d3f2f0ce7e0 100644
--- a/nixos/modules/hardware/corectrl.nix
+++ b/nixos/modules/hardware/corectrl.nix
@@ -12,6 +12,10 @@ in
       Add your user to the corectrl group to run corectrl without needing to enter your password
     '');
 
+    package = mkPackageOption pkgs "corectrl" {
+      extraDescription = "Useful for overriding the configuration options used for the package.";
+    };
+
     gpuOverclock = {
       enable = mkEnableOption (lib.mdDoc ''
         GPU overclocking
@@ -32,9 +36,9 @@ in
 
   config = mkIf cfg.enable (lib.mkMerge [
     {
-      environment.systemPackages = [ pkgs.corectrl ];
+      environment.systemPackages = [ cfg.package ];
 
-      services.dbus.packages = [ pkgs.corectrl ];
+      services.dbus.packages = [ cfg.package ];
 
       users.groups.corectrl = { };