From 67d87f0a92b20d37c911ed422a90d9fd13266d39 Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Mon, 17 Feb 2025 20:35:56 +0100 Subject: [PATCH] Use custom nbfc-linux version with config for my laptop. --- flake.lock | 62 ++++++++++++++++++++++++++++++++++++++++-- flake.nix | 6 ++++ modules/nixos/nbfc.nix | 9 +++--- 3 files changed, 70 insertions(+), 7 deletions(-) diff --git a/flake.lock b/flake.lock index 815b770..2adc10a 100644 --- a/flake.lock +++ b/flake.lock @@ -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", diff --git a/flake.nix b/flake.nix index d5a89b4..4c0e202 100644 --- a/flake.nix +++ b/flake.nix @@ -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 = { diff --git a/modules/nixos/nbfc.nix b/modules/nixos/nbfc.nix index 11257d0..ec6fe06 100644 --- a/modules/nixos/nbfc.nix +++ b/modules/nixos/nbfc.nix @@ -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"]; };