Merge pull request #91955 from c00w/expand
sd-image: Add option to control sd image expansion on boot.
This commit is contained in:
commit
ac72d9acfe
@ -126,6 +126,13 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
expandOnBoot = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = ''
|
||||||
|
Whether to configure the sd image to expand it's partition on boot.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
@ -215,7 +222,7 @@ in
|
|||||||
'';
|
'';
|
||||||
}) {};
|
}) {};
|
||||||
|
|
||||||
boot.postBootCommands = ''
|
boot.postBootCommands = lib.mkIf config.sdImage.expandOnBoot ''
|
||||||
# On the first boot do some maintenance tasks
|
# On the first boot do some maintenance tasks
|
||||||
if [ -f /nix-path-registration ]; then
|
if [ -f /nix-path-registration ]; then
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
Loading…
x
Reference in New Issue
Block a user