diff options
| author | Robert Hensing <robert@roberthensing.nl> | 2023-06-30 02:13:09 +0200 |
|---|---|---|
| committer | Robert Hensing <robert@roberthensing.nl> | 2023-06-30 02:13:09 +0200 |
| commit | d207fa609121341fe214b70b24fd4b12ae1e8737 (patch) | |
| tree | 038d24da03b2cf1c0587c0e0dcee55c626e6a4e8 /default.nix | |
| parent | 25ae710ba3cd448c5d5678788d37f3d149378bc0 (diff) | |
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.
Diffstat (limited to 'default.nix')
| -rw-r--r-- | default.nix | 7 |
1 files changed, 6 insertions, 1 deletions
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 { |
