Modularize nbfc configuration.
This commit is contained in:
parent
c495ecb824
commit
3bb730988d
@ -81,7 +81,6 @@
|
|||||||
neovim
|
neovim
|
||||||
mangohud
|
mangohud
|
||||||
lm_sensors
|
lm_sensors
|
||||||
nbfc-linux
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enable nixd to see nixpkgs path
|
# Enable nixd to see nixpkgs path
|
||||||
@ -114,18 +113,6 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Install nbfc-linux
|
|
||||||
systemd.services.nbfc_service = {
|
|
||||||
enable = false;
|
|
||||||
description = "NoteBook FanControl Service";
|
|
||||||
serviceConfig.Type = "simple";
|
|
||||||
path = [pkgs.kmod];
|
|
||||||
|
|
||||||
script = "${pkgs.nbfc-linux}/bin/nbfc_service --config-file '/home/crony/.config/nbfc.json'";
|
|
||||||
|
|
||||||
wantedBy = ["multi-user.target"];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Allow for wireguard traffic
|
# Allow for wireguard traffic
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
# if packets are still dropped, they will show up in dmesg
|
# if packets are still dropped, they will show up in dmesg
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
{lib, ...}: {
|
{lib, ...}: {
|
||||||
imports = [./bluetooth.nix ./nvidia.nix ./plasma.nix ./disable-hibernation.nix ./gaming.nix ./zsh.nix ./stylix.nix];
|
imports = [
|
||||||
|
./bluetooth.nix
|
||||||
|
./nvidia.nix
|
||||||
|
./plasma.nix
|
||||||
|
./disable-hibernation.nix
|
||||||
|
./gaming.nix
|
||||||
|
./zsh.nix
|
||||||
|
./stylix.nix
|
||||||
|
./nbfc.nix
|
||||||
|
];
|
||||||
|
|
||||||
crony.bluetooth.enable = lib.mkDefault true;
|
crony.bluetooth.enable = lib.mkDefault true;
|
||||||
crony.nvidia.enable = lib.mkDefault true;
|
crony.nvidia.enable = lib.mkDefault true;
|
||||||
@ -8,4 +17,5 @@
|
|||||||
crony.gaming.enable = lib.mkDefault true;
|
crony.gaming.enable = lib.mkDefault true;
|
||||||
crony.zsh.enable = lib.mkDefault true;
|
crony.zsh.enable = lib.mkDefault true;
|
||||||
crony.stylix.enable = lib.mkDefault true;
|
crony.stylix.enable = lib.mkDefault true;
|
||||||
|
crony.nbfc.enable = lib.mkDefault true;
|
||||||
}
|
}
|
||||||
|
29
modules/nixos/nbfc.nix
Normal file
29
modules/nixos/nbfc.nix
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
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 = with pkgs; [
|
||||||
|
nbfc-linux
|
||||||
|
];
|
||||||
|
|
||||||
|
# Setup nbfc package
|
||||||
|
systemd.services.nbfc_service = {
|
||||||
|
enable = false;
|
||||||
|
description = "NoteBook FanControl Service";
|
||||||
|
serviceConfig.Type = "simple";
|
||||||
|
path = [pkgs.kmod];
|
||||||
|
|
||||||
|
script = "${pkgs.nbfc-linux}/bin/nbfc_service --config-file '/home/crony/.config/nbfc.json'";
|
||||||
|
|
||||||
|
wantedBy = ["multi-user.target"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user