nixos-install: cleanups & improvements to run on non-NixOS systems
- Fix --no-bootloader which didn't do what it advertised - Hardcode nixbld GID so that systems which do not have a nixbld user can still run nixos-install (only with --closure since they can't build anything) - Cleanup: get rid of NIX_CONF_DIR(=/tmp)/nix.conf and pass arguments instead - Cleanup: don't assume that the target system has '<nixpkgs/nixos>' or '<nixos-config>' to see if config.users.mutableUsers. Instead check if /var/setuid-wrappers/passwd is there Installing NixOS now works from a Ubuntu host (using --closure). nix-build -A tests.installer.simple '<nixpkgs/nixos/release.nix>' succeeds ✓
This commit is contained in:
@@ -24,6 +24,7 @@ let
|
||||
inherit (pkgs) perl pathsFromGraph rsync;
|
||||
nix = config.nix.package.out;
|
||||
cacert = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
|
||||
nixbld_gid = config.ids.gids.nixbld;
|
||||
|
||||
nixClosure = pkgs.runCommand "closure"
|
||||
{ exportReferencesGraph = ["refs" config.nix.package.out]; }
|
||||
|
||||
Reference in New Issue
Block a user