From 6d6a93e64cce9951a941c4f04023732dbec5b364 Mon Sep 17 00:00:00 2001 From: imxyy_soope_ Date: Sat, 15 Aug 2026 15:54:09 +0800 Subject: [PATCH] nix: add nix-tree-rs and fast-nix-gc --- flake.lock | 73 ++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 11 +++++++ flake/pkgs.nix | 21 ++++++++++--- modules/core/nix.nix | 2 ++ 4 files changed, 102 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index 7378062..7bc0877 100644 --- a/flake.lock +++ b/flake.lock @@ -157,6 +157,30 @@ "type": "github" } }, + "fast-nix-gc": { + "inputs": { + "nix-darwin": "nix-darwin", + "nixpkgs": [ + "nixpkgs" + ], + "treefmt-nix": [ + "treefmt" + ] + }, + "locked": { + "lastModified": 1786625301, + "narHash": "sha256-KNAjsTgfweOoqYxMAsIolrDcIV5AikvrSW9EpJ7fnK8=", + "owner": "Mic92", + "repo": "fast-nix-gc", + "rev": "254a2ba0a4f1570b3880bc10bb6166afe1e25936", + "type": "github" + }, + "original": { + "owner": "Mic92", + "repo": "fast-nix-gc", + "type": "github" + } + }, "fenix": { "inputs": { "nixpkgs": [ @@ -461,6 +485,53 @@ "type": "github" } }, + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "fast-nix-gc", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1785389976, + "narHash": "sha256-0tLW8Ff5yt8AH97jw4ZpFJ0OCJ122zIlgWGDmOfU/VU=", + "owner": "nix-darwin", + "repo": "nix-darwin", + "rev": "15abb8c98f336cd8bd840d71059adebabe60bf04", + "type": "github" + }, + "original": { + "owner": "nix-darwin", + "repo": "nix-darwin", + "type": "github" + } + }, + "nix-tree-rs": { + "inputs": { + "flake-parts": [ + "flake-parts" + ], + "nixpkgs": [ + "nixpkgs" + ], + "treefmt-nix": [ + "treefmt" + ] + }, + "locked": { + "lastModified": 1786373799, + "narHash": "sha256-/MGTSKLPC6uERKHyilzRCVPDeX/AwG+4B8bf1vMHAJg=", + "owner": "Mic92", + "repo": "nix-tree-rs", + "rev": "31d54916fa110e9462fec799f1663224baddbadd", + "type": "github" + }, + "original": { + "owner": "Mic92", + "repo": "nix-tree-rs", + "type": "github" + } + }, "nixos-wsl": { "inputs": { "flake-compat": [ @@ -593,6 +664,7 @@ "inputs": { "angrr": "angrr", "darkly": "darkly", + "fast-nix-gc": "fast-nix-gc", "fenix": "fenix", "flake-compat": "flake-compat", "flake-parts": "flake-parts", @@ -605,6 +677,7 @@ "multiverse": "multiverse", "my-templates": "my-templates", "niri-nix": "niri-nix", + "nix-tree-rs": "nix-tree-rs", "nixos-wsl": "nixos-wsl", "nixpkgs": "nixpkgs_2", "noctalia": "noctalia", diff --git a/flake.nix b/flake.nix index bfe3287..d9e23fc 100644 --- a/flake.nix +++ b/flake.nix @@ -68,6 +68,11 @@ url = "github:Bali10050/Darkly"; inputs.nixpkgs.follows = "nixpkgs"; }; + fast-nix-gc = { + url = "github:Mic92/fast-nix-gc"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.treefmt-nix.follows = "treefmt"; + }; fenix = { url = "github:nix-community/fenix"; inputs.nixpkgs.follows = "nixpkgs"; @@ -84,6 +89,12 @@ url = "git+https://codeberg.org/bananad3v/niri-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; + nix-tree-rs = { + url = "github:Mic92/nix-tree-rs"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.flake-parts.follows = "flake-parts"; + inputs.treefmt-nix.follows = "treefmt"; + }; noctalia = { url = "github:noctalia-dev/noctalia-shell/v4.7.5"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/flake/pkgs.nix b/flake/pkgs.nix index 55fcc0b..dbe2421 100644 --- a/flake/pkgs.nix +++ b/flake/pkgs.nix @@ -12,12 +12,23 @@ inputs.niri-nix.overlays.niri-nix inputs.fenix.overlays.default inputs.angrr.overlays.default - (final: prev: { - darkly-qt6 = inputs.darkly.packages.${final.stdenv.hostPlatform.system}.darkly-qt6; - - noctalia-shell = inputs.noctalia.packages.${final.stdenv.hostPlatform.system}.default; - }) inputs.llm-agents.overlays.shared-nixpkgs + ( + final: prev: + let + system = final.stdenv.hostPlatform.system; + in + { + darkly-qt6 = inputs.darkly.packages.${system}.darkly-qt6; + + noctalia-shell = inputs.noctalia.packages.${system}.default; + + nix-tree-rs = inputs.nix-tree-rs.packages.${system}.default; + fast-nix-gc = inputs.fast-nix-gc.packages.${system}.default.overrideAttrs { + doCheck = false; + }; + } + ) ]; config.allowUnfree = true; flake.setNixPath = false; diff --git a/modules/core/nix.nix b/modules/core/nix.nix index 95ce138..c1d35be 100644 --- a/modules/core/nix.nix +++ b/modules/core/nix.nix @@ -30,6 +30,8 @@ in environment.systemPackages = with pkgs; [ nix-output-monitor nh + nix-tree-rs + fast-nix-gc ]; environment.etc = (