nix/os/devices: add relabel command
After bytewise-copying from a prevoius disk, the partition labels and logical volume groupnames need to be renamed according to the new disk id.
This commit is contained in:
parent
e9464dfbe7
commit
4f26e935ee
3 changed files with 52 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
|||
, moreargs ? ""
|
||||
, diskId ? (import ((builtins.getEnv "PWD")+"/${dir}/hw.nix") {}).hardware.encryptedDisk.diskId
|
||||
, gitRoot ? "$(git rev-parse --show-toplevel)"
|
||||
, previousDiskId ? ""
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -35,5 +36,5 @@ let
|
|||
in {
|
||||
recipes = {
|
||||
inherit rebuild;
|
||||
} // (import ./disk.nix { inherit pkgs ownLib dir rebuildarg moreargs diskId gitRoot; });
|
||||
} // (import ./disk.nix { inherit pkgs ownLib dir rebuildarg moreargs diskId gitRoot previousDiskId; });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue