From 6e2537341e1ef36be5e1c3f04d48f661c7264315 Mon Sep 17 00:00:00 2001 From: clerie Date: Fri, 19 May 2023 10:06:47 +0200 Subject: [PATCH] configuration/common: pin nixpkgs to host version for nix commands --- configuration/common/default.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/configuration/common/default.nix b/configuration/common/default.nix index 0e25af1..01addc8 100644 --- a/configuration/common/default.nix +++ b/configuration/common/default.nix @@ -113,6 +113,23 @@ ]; }; + # Pin current nixpkgs channel and flake registry to the nixpkgs version + # the host got build with + nix.nixPath = lib.mkForce [ "nixpkgs=${lib.cleanSource pkgs.path}" ]; + nix.registry = { + "nixpkgs" = { + from = { + type = "indirect"; + id = "nixpkgs"; + }; + to = { + type = "path"; + path = lib.cleanSource pkgs.path; + }; + exact = true; + }; + }; + services.fstrim.enable = true; clerie.nixfiles.enable = true;