Files
nixos/nbfc.nix
2024-06-29 13:20:56 +02:00

24 lines
582 B
Nix

# nbfc.nix
{
config,
inputs,
pkgs,
...
}: let
myUser = "fredrikr"; #adjust this to your username
command = "bin/nbfc_service --config-file '/home/${myUser}/.config/nbfc.json'";
in {
environment.systemPackages = with pkgs; [
inputs.nbfc-linux.packages.x86_64-linux.default
];
systemd.services.nbfc_service = {
enable = true;
description = "NoteBook FanControl service";
serviceConfig.Type = "simple";
path = [pkgs.kmod];
script = "${inputs.nbfc-linux.packages.x86_64-linux.default}/${command}";
wantedBy = ["multi-user.target"];
};
}