From 24795885abd8d18985f883174656e2d16295fb5b Mon Sep 17 00:00:00 2001 From: Silas Schöffel Date: Sat, 20 Apr 2024 19:20:26 +0200 Subject: sils/meta: make declarations nullable --- modules/nixos/sils/meta.nix | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'modules/nixos') diff --git a/modules/nixos/sils/meta.nix b/modules/nixos/sils/meta.nix index 51810b5..57ef081 100644 --- a/modules/nixos/sils/meta.nix +++ b/modules/nixos/sils/meta.nix @@ -1,23 +1,31 @@ -{lib, ...}: { +{lib, ...}: let + nullable = type: lib.types.nullOr type; +in { options.sils.meta = { bootPart = lib.mkOption { - type = lib.types.str; + type = nullable lib.types.str; + default = null; }; bootstrapSystem = lib.mkEnableOption; globalDataDir = lib.mkOption { - type = lib.types.str; + type = nullable lib.types.str; + default = null; }; hostname = lib.mkOption { - type = lib.types.str; + type = nullable lib.types.str; + default = null; }; mainDisk = lib.mkOption { - type = lib.types.str; + type = nullable lib.types.str; + default = null; }; rootPart = lib.mkOption { - type = lib.types.str; + type = nullable lib.types.str; + default = null; }; system = lib.mkOption { - type = lib.types.str; + type = nullable lib.types.str; + default = null; }; }; } -- cgit 1.4.1