Use custom nbfc-linux version with config for my laptop.

This commit is contained in:
CronyAkatsuki 2025-02-17 20:35:56 +01:00
parent 3e17bffc11
commit 67d87f0a92
3 changed files with 70 additions and 7 deletions

62
flake.lock generated
View File

@ -139,7 +139,7 @@
},
"flake-utils": {
"inputs": {
"systems": "systems"
"systems": "systems_2"
},
"locked": {
"lastModified": 1731533236,
@ -313,6 +313,28 @@
"type": "github"
}
},
"nbfc-linux": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"utils": "utils"
},
"locked": {
"lastModified": 1739813393,
"narHash": "sha256-esM0rtMLSQHfz5Odqy2Du5aXoxQKAfrVIJ7gRQ7syRs=",
"owner": "cronyakatsuki",
"repo": "nbfc-linux",
"rev": "8328fd92d2064fc1756f2621abdebb17cca4dda9",
"type": "github"
},
"original": {
"owner": "cronyakatsuki",
"ref": "a715-41g",
"repo": "nbfc-linux",
"type": "github"
}
},
"nil": {
"inputs": {
"flake-utils": [
@ -393,7 +415,7 @@
"nixpkgs"
],
"nmd": "nmd",
"systems": "systems_2"
"systems": "systems_3"
},
"locked": {
"lastModified": 1739361262,
@ -413,6 +435,7 @@
"inputs": {
"auto-cpufreq": "auto-cpufreq",
"home-manager": "home-manager",
"nbfc-linux": "nbfc-linux",
"nixpkgs": "nixpkgs",
"nvf": "nvf",
"stylix": "stylix"
@ -455,7 +478,7 @@
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_3",
"systems": "systems_4",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes",
@ -521,6 +544,21 @@
"type": "github"
}
},
"systems_4": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tinted-foot": {
"flake": false,
"locked": {
@ -602,6 +640,24 @@
"repo": "base16-zed",
"type": "github"
}
},
"utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",

View File

@ -28,6 +28,12 @@
url = "github:AdnanHodzic/auto-cpufreq";
inputs.nixpkgs.follows = "nixpkgs";
};
# use custom nbfc that has the config for my laptop
nbfc-linux = {
url = "github:cronyakatsuki/nbfc-linux/a715-41g";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {

View File

@ -1,7 +1,8 @@
{
config,
lib,
inputs,
pkgs,
lib,
...
}: {
options = {
@ -10,8 +11,8 @@
config = lib.mkIf config.crony.nbfc.enable {
# Install nbfc-linux
environment.systemPackages = with pkgs; [
nbfc-linux
environment.systemPackages = [
inputs.nbfc-linux.packages.x86_64-linux.default
];
# Setup nbfc package
@ -21,7 +22,7 @@
serviceConfig.Type = "simple";
path = [pkgs.kmod];
script = "${pkgs.nbfc-linux}/bin/nbfc_service --config-file '/home/crony/.config/nbfc.json'";
script = "${inputs.nbfc-linux.packages.x86_64-linux.default}/bin/nbfc_service --config-file '/home/crony/.config/nbfc.json'";
wantedBy = ["multi-user.target"];
};