diff options
| author | Robert Hensing <robert@roberthensing.nl> | 2023-06-30 02:14:35 +0200 |
|---|---|---|
| committer | Robert Hensing <robert@roberthensing.nl> | 2023-06-30 02:14:35 +0200 |
| commit | 89ec258c7cac6d83f673ae5e4ce170bfc2c1f615 (patch) | |
| tree | f8d238635afe6593adf39cc83b582b2f075e6dac /modules | |
| parent | d207fa609121341fe214b70b24fd4b12ae1e8737 (diff) | |
documentation: Link to nixpkgs master if rev is unknown
This fixes
error: The option `system.nixpkgsRevision' is used but not defined.
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/documentation/default.nix | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/modules/documentation/default.nix b/modules/documentation/default.nix index a49d277..4a4bcdc 100644 --- a/modules/documentation/default.nix +++ b/modules/documentation/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, baseModules, modules, ... }: +toplevel@{ config, lib, pkgs, baseModules, modules, ... }: with lib; @@ -25,7 +25,15 @@ let inherit pkgs config; version = config.system.darwinVersion; revision = config.system.darwinRevision; - nixpkgsRevision = config.system.nixpkgsRevision; + nixpkgsRevision = + if toplevel.options.system.nixpkgsRevision.isDefined + then config.system.nixpkgsRevision + + # If user does not use flakes and does not add rev to nixpkgs, we don't + # know which revision or even branch they're on. In this case we still want + # to link somewhere, so we hope that master hasn't changed too much. + else "master"; + options = let scrubbedEval = evalModules { |
