summaryrefslogtreecommitdiff
path: root/modules/options
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-09-23 16:17:47 -0700
committerFuwn <[email protected]>2024-09-23 16:17:47 -0700
commit70b0e24edab7a9d689768f4b694f92e8697e231e (patch)
tree9b88b13fb9976eab750f691178bed800e203cf2f /modules/options
parentkansai: move default module to host (diff)
downloadnixos-config-70b0e24edab7a9d689768f4b694f92e8697e231e.tar.xz
nixos-config-70b0e24edab7a9d689768f4b694f92e8697e231e.zip
options: move modules to modules
Diffstat (limited to 'modules/options')
-rw-r--r--modules/options/containers.nix20
-rw-r--r--modules/options/default.nix29
-rw-r--r--modules/options/nix.nix7
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;
+ };
+}