mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-13 20:30:02 +00:00
documentation: Link to nixpkgs master if rev is unknown
This fixes error: The option `system.nixpkgsRevision' is used but not defined.
This commit is contained in:
parent
d207fa6091
commit
89ec258c7c
1 changed files with 10 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue