diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/options/containers.nix | 20 | ||||
| -rw-r--r-- | modules/options/default.nix | 29 | ||||
| -rw-r--r-- | modules/options/nix.nix | 7 |
3 files changed, 31 insertions, 25 deletions
diff --git a/modules/options/containers.nix b/modules/options/containers.nix new file mode 100644 index 0000000..a60f498 --- /dev/null +++ b/modules/options/containers.nix @@ -0,0 +1,20 @@ +{ lib, ... }: +with lib.options; +with lib.types; +{ + options.modules.containers = { + engine = mkOption { + default = "podman"; + + type = types.enum [ + "podman" + "docker" + ]; + }; + + extraOptions = mkOption { + default = [ ]; + type = types.listOf types.str; + }; + }; +} diff --git a/modules/options/default.nix b/modules/options/default.nix index 8c140de..c8a78c9 100644 --- a/modules/options/default.nix +++ b/modules/options/default.nix @@ -1,27 +1,6 @@ -{ lib, ... }: -with lib.options; -with lib.types; { - options.modules = { - nix.extend = mkOption { - default = true; - type = types.bool; - }; - - containers = { - engine = mkOption { - default = "podman"; - - type = types.enum [ - "podman" - "docker" - ]; - }; - - extraOptions = mkOption { - default = [ ]; - type = types.listOf types.str; - }; - }; - }; + imports = [ + ./containers.nix + ./nix.nix + ]; } diff --git a/modules/options/nix.nix b/modules/options/nix.nix new file mode 100644 index 0000000..bd831dc --- /dev/null +++ b/modules/options/nix.nix @@ -0,0 +1,7 @@ +{ lib, ... }: +{ + options.modules.nix.extend = lib.options.mkOption { + default = true; + type = lib.types.bool; + }; +} |