From d207fa609121341fe214b70b24fd4b12ae1e8737 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 30 Jun 2023 02:13:09 +0200 Subject: default.nix: Use nixpkgs.rev if it is set This increases the odds of automatically setting system.nixpkgsRevision, which makes the links in the manual nice. --- default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'default.nix') diff --git a/default.nix b/default.nix index 9787e51..11c686b 100644 --- a/default.nix +++ b/default.nix @@ -10,10 +10,15 @@ let eval = evalConfig { inherit system; - modules = [ configuration ]; + modules = [ configuration nixpkgsRevisionModule ]; inputs = { inherit nixpkgs; }; }; + nixpkgsRevisionModule = + if nixpkgs?rev && lib.isString nixpkgs.rev + then { system.nixpkgsRevision = nixpkgs.rev; } + else { }; + # The source code of this repo needed by the [un]installers. nix-darwin = lib.cleanSource ( lib.cleanSourceWith { -- cgit v1.2.3