mirror of
https://github.com/fredrikr79/nixos.git
synced 2025-12-18 23:50:24 +01:00
24 lines
582 B
Nix
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"];
|
|
};
|
|
}
|