From 70b0e24edab7a9d689768f4b694f92e8697e231e Mon Sep 17 00:00:00 2001 From: Fuwn Date: Mon, 23 Sep 2024 16:17:47 -0700 Subject: options: move modules to modules --- modules/options/containers.nix | 20 ++++++++++++++++++++ modules/options/default.nix | 29 ++++------------------------- modules/options/nix.nix | 7 +++++++ 3 files changed, 31 insertions(+), 25 deletions(-) create mode 100644 modules/options/containers.nix create mode 100644 modules/options/nix.nix (limited to 'modules') 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; + }; +} -- cgit v1.2.3