diff options
author | Andrew Dunham <andrew@du.nham.ca> | 2018-07-06 20:59:19 -0700 |
---|---|---|
committer | Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> | 2018-07-12 17:02:03 +0300 |
commit | d7bfd04301de8fb893c4ee85bcd9b0ece46836a4 (patch) | |
tree | eac63f1b6cefc173e07c65791cc51362bd18088f /nixos/lib | |
parent | 99670bbb9108732e562d802122bccce1953ab858 (diff) | |
download | nixlib-d7bfd04301de8fb893c4ee85bcd9b0ece46836a4.tar nixlib-d7bfd04301de8fb893c4ee85bcd9b0ece46836a4.tar.gz nixlib-d7bfd04301de8fb893c4ee85bcd9b0ece46836a4.tar.bz2 nixlib-d7bfd04301de8fb893c4ee85bcd9b0ece46836a4.tar.lz nixlib-d7bfd04301de8fb893c4ee85bcd9b0ece46836a4.tar.xz nixlib-d7bfd04301de8fb893c4ee85bcd9b0ece46836a4.tar.zst nixlib-d7bfd04301de8fb893c4ee85bcd9b0ece46836a4.zip |
sdImage: make partition ID/UUID configurable
Diffstat (limited to 'nixos/lib')
-rw-r--r-- | nixos/lib/make-ext4-fs.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/lib/make-ext4-fs.nix b/nixos/lib/make-ext4-fs.nix index 4095d9c6d00d..35a8afae4a7a 100644 --- a/nixos/lib/make-ext4-fs.nix +++ b/nixos/lib/make-ext4-fs.nix @@ -5,6 +5,7 @@ { pkgs , storePaths , volumeLabel +, uuid ? "44444444-4444-4444-8888-888888888888" }: let @@ -32,7 +33,7 @@ pkgs.stdenv.mkDerivation { echo "Creating an EXT4 image of $bytes bytes (numInodes=$numInodes, numDataBlocks=$numDataBlocks)" truncate -s $bytes $out - faketime -f "1970-01-01 00:00:01" mkfs.ext4 -L ${volumeLabel} -U 44444444-4444-4444-8888-888888888888 $out + faketime -f "1970-01-01 00:00:01" mkfs.ext4 -L ${volumeLabel} -U ${uuid} $out # Populate the image contents by piping a bunch of commands to the `debugfs` tool from e2fsprogs. # For example, to copy /nix/store/abcd...efg-coreutils-8.23/bin/sleep: |