Created
January 5, 2019 03:16
-
-
Save kalbasit/beab7b80e5ab9615e634f17021b67e4e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# neither A nor B is working. I don't see this in the activation script or under `result/etc/` | |
{ | |
# A | |
system.activationScripts = { | |
nixpkgsPin = { | |
text = '' | |
ln -sfn ${pinnedNixpkgs} /etc/nixpkgs | |
''; | |
deps = []; | |
}; | |
}; | |
# B | |
system.activationScripts.nixpkgs = stringAfter [ "users" "groups" ] '' | |
ln -sfn ${pinnedNixpkgs} /etc/nixpkgs | |
''; | |
} |
I think what you want is
system.extraSystemBuilderCmds = '' ln -sv ${pinnedNixpkgs} $out/nixpkgs '';
It does not seem to work! I can't seem to find the option over on https://nixos.org/nixos/options.html#system.extr either.
EDIT: Oh I see, it's an internal option that's why we cannot see it over on the documentation side. https://github.com/NixOS/nixpkgs/blob/0a124ba93d4e0f9e77d003402e7a6b0e56ef8aa1/nixos/modules/system/activation/top-level.nix#L215-L222
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think what you want is
What this precisely does is described
So nixpkgs will end up at
/run/current-system/nixpkgs
.