modules/rootfs: Allow disabling the options
let
inherit (config.boot) growPartition;
- inherit (lib) optionalString types;
+ inherit (lib) mkIf mkOption optionalString types;
inherit (config.mobile._internal) compressLargeArtifacts;
inherit (pkgs) buildPackages;
rootfsLabel = config.mobile.generatedFilesystems.rootfs.label;
in
{
+ options = {
+ mobile = {
+ rootfs = {
+ enableDefaultConfiguration = mkOption {
+ type = types.bool;
+ default = config.mobile.enable;
+ description = ''
+ Whether some of the rootfs configuration is managed by Mobile NixOS or not.
+ '';
+ };
+ };
+ };
+ };
+
+ config = mkIf (config.mobile.rootfs.enableDefaultConfiguration) {
boot.growPartition = lib.mkDefault true;
mobile.generatedFilesystems.rootfs = lib.mkDefault {
@@ -87,4 +102,5 @@ in
mobile.boot.stage-1.extraUtils = with pkgs; [
{ package = e2fsprogs; }
];
+ };
}
