Use pre-cached nixpkgs
This commit is contained in:
parent
55c0513459
commit
311e4cf92a
2 changed files with 4 additions and 1 deletions
|
@ -1,9 +1,12 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
contextRoot="$(mktemp -d)";
|
contextRoot="$(mktemp -d)";
|
||||||
rootHome="$contextRoot/airootfs/root";
|
rootHome="$contextRoot/airootfs/root";
|
||||||
|
nixDir="$contextRoot/nix/var/nix/profiles/per-user/root/channels/nixpkgs";
|
||||||
profileDir="/mnt/archiso-valhalla";
|
profileDir="/mnt/archiso-valhalla";
|
||||||
mkdir -p "$rootHome";
|
mkdir -p "$rootHome";
|
||||||
git clone .. "$rootHome/PortValhalla";
|
git clone .. "$rootHome/PortValhalla";
|
||||||
|
git clone https://github.com/NixOS/nixpkgs.git --depth=1 -b nixos-24.05 "$nixDir";
|
||||||
|
rm -rf "$nixDir/.git";
|
||||||
sudo mount --mkdir -t overlay overlay -o lowerdir=.:"$contextRoot" "$profileDir";
|
sudo mount --mkdir -t overlay overlay -o lowerdir=.:"$contextRoot" "$profileDir";
|
||||||
sudo mkarchiso "$@" "$profileDir";
|
sudo mkarchiso "$@" "$profileDir";
|
||||||
sudo umount "$profileDir";
|
sudo umount "$profileDir";
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
function evalModule() {
|
function evalModule() {
|
||||||
local modulePath="$1";
|
local modulePath="$1";
|
||||||
local property="$2";
|
local property="$2";
|
||||||
local nixPkgs='import (fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.05") { config = {}; overlays = []; }';
|
local nixPkgs='import <nixpkgs> { config = {}; overlays = []; }';
|
||||||
nix eval --file "$modulePath" "${@:3}" --apply "_: (($nixPkgs).lib.evalModules { modules = [ _ ]; }).config.$property";
|
nix eval --file "$modulePath" "${@:3}" --apply "_: (($nixPkgs).lib.evalModules { modules = [ _ ]; }).config.$property";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue