31 lines
709 B
Nix
Raw Normal View History

2025-01-31 15:26:10 +01:00
{
config,
inputs,
2025-01-31 15:26:10 +01:00
pkgs,
lib,
2025-01-31 15:26:10 +01:00
...
}: {
options = {
crony.nbfc.enable = lib.mkEnableOption "enable nbfc and set it up for my laptop";
};
config = lib.mkIf config.crony.nbfc.enable {
# Install nbfc-linux
environment.systemPackages = [
inputs.nbfc-linux.packages.x86_64-linux.default
2025-01-31 15:26:10 +01:00
];
# Setup nbfc package
systemd.services.nbfc_service = {
2025-01-31 18:47:42 +01:00
enable = true;
2025-01-31 15:26:10 +01:00
description = "NoteBook FanControl Service";
serviceConfig.Type = "simple";
path = [pkgs.kmod];
script = "${inputs.nbfc-linux.packages.x86_64-linux.default}/bin/nbfc_service --config-file '/home/crony/.config/nbfc.json'";
2025-01-31 15:26:10 +01:00
wantedBy = ["multi-user.target"];
};
};
}