nixos/deepcool-digital-linux: init

This commit is contained in:
NotAShelf
2025-06-19 22:08:02 +03:00
parent 9f9d9144e0
commit 7eef2264d7
2 changed files with 48 additions and 0 deletions

View File

@@ -633,6 +633,7 @@
./services/hardware/brltty.nix
./services/hardware/buffyboard.nix
./services/hardware/ddccontrol.nix
./services/hardware/deepcool-digital-linux.nix
./services/hardware/display.nix
./services/hardware/fancontrol.nix
./services/hardware/freefall.nix

View File

@@ -0,0 +1,47 @@
{
config,
pkgs,
lib,
...
}:
let
cfg = config.services.hardware.deepcool-digital-linux;
in
{
meta.maintainers = [ lib.maintainers.NotAShelf ];
options.services.hardware.deepcool-digital-linux = {
enable = lib.mkEnableOption "DeepCool Digital monitoring daemon";
package = lib.mkPackageOption pkgs "deepcool-digital-linux" { };
extraArgs = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
example = lib.literalExpression ''
[
# Change the update interval
"--update 750"
# Enable the alarm
"--alarm"
]
'';
description = ''
Extra command line arguments to be passed to the deepcool-digital-linux daemon.
'';
};
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
systemd.services.deepcool-digital-linux = {
description = "DeepCool Digital";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
StateDirectory = "deepcool-digital-linux";
WorkingDirectory = "/var/lib/deepcool-digital-linux";
ExecStart = "${lib.getExe cfg.package} ${lib.escapeShellArgs cfg.extraArgs}";
Restart = "always";
};
};
};
}