From 9a79ea8e1dc3d890f49cb12f91209c1f9435fcb6 Mon Sep 17 00:00:00 2001 From: Qubasa Date: Wed, 29 Jan 2025 19:24:15 +0700 Subject: [PATCH] clan: Remove unecessary templates and modules interface --- lib/build-clan/default.nix | 1 - lib/build-clan/interface.nix | 18 ------------- lib/build-clan/module.nix | 1 + lib/build-clan/modules/interface.nix | 27 ------------------- lib/build-clan/templates/clan/interface.nix | 27 ------------------- lib/build-clan/templates/disko/interface.nix | 27 ------------------- lib/build-clan/templates/interface.nix | 28 -------------------- 7 files changed, 1 insertion(+), 128 deletions(-) delete mode 100644 lib/build-clan/modules/interface.nix delete mode 100644 lib/build-clan/templates/clan/interface.nix delete mode 100644 lib/build-clan/templates/disko/interface.nix delete mode 100644 lib/build-clan/templates/interface.nix diff --git a/lib/build-clan/default.nix b/lib/build-clan/default.nix index cc1ddf1c1..c48fd33cb 100644 --- a/lib/build-clan/default.nix +++ b/lib/build-clan/default.nix @@ -48,6 +48,5 @@ eval { rest # implementation ./module.nix - ./auto-imports.nix ]; } diff --git a/lib/build-clan/interface.nix b/lib/build-clan/interface.nix index a0a22bc23..ddbb946c0 100644 --- a/lib/build-clan/interface.nix +++ b/lib/build-clan/interface.nix @@ -61,24 +61,6 @@ in ''; }; - modules = lib.mkOption { - type = types.attrsOf (types.submodule { imports = [ ./modules/interface.nix ]; }); - default = { }; - description = '' - Experimental: In the future, - this will be the main way to define Clan modules. - ''; - }; - - templates = lib.mkOption { - type = types.submodule { imports = [ ./templates/interface.nix ]; }; - default = { }; - description = '' - Experimental: In the future, - this will be the main way to define Clan templates. - ''; - }; - # Meta meta = lib.mkOption { description = '' diff --git a/lib/build-clan/module.nix b/lib/build-clan/module.nix index cd774b10a..f48282639 100644 --- a/lib/build-clan/module.nix +++ b/lib/build-clan/module.nix @@ -171,6 +171,7 @@ let in { imports = [ + ./auto-imports.nix (lib.mkRenamedOptionModule [ "directory" ] [ "self" ]) # Merge the inventory file { diff --git a/lib/build-clan/modules/interface.nix b/lib/build-clan/modules/interface.nix deleted file mode 100644 index 73eea4bed..000000000 --- a/lib/build-clan/modules/interface.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ - lib, - name, - ... -}: -let - types = lib.types; -in -{ - # clan.modules. - options = { - path = lib.mkOption { - type = types.path; - description = '' - Holds the path to the clan module. - ''; - }; - - name = lib.mkOption { - type = types.str; - default = name; - description = '' - The name of the module. - ''; - }; - }; -} diff --git a/lib/build-clan/templates/clan/interface.nix b/lib/build-clan/templates/clan/interface.nix deleted file mode 100644 index b5c402cf6..000000000 --- a/lib/build-clan/templates/clan/interface.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ - lib, - name, - ... -}: -let - types = lib.types; -in -{ - # clan.templates.clan. - options = { - path = lib.mkOption { - type = types.path; - description = '' - Holds the path to the clan template. - ''; - }; - - name = lib.mkOption { - type = types.str; - default = name; - description = '' - The name of the template. - ''; - }; - }; -} diff --git a/lib/build-clan/templates/disko/interface.nix b/lib/build-clan/templates/disko/interface.nix deleted file mode 100644 index 0bbfa4f07..000000000 --- a/lib/build-clan/templates/disko/interface.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ - lib, - name, - ... -}: -let - types = lib.types; -in -{ - # clan.templates.disko. - options = { - path = lib.mkOption { - type = types.path; - description = '' - Holds the path to the clan template. - ''; - }; - - name = lib.mkOption { - type = types.str; - default = name; - description = '' - The name of the template. - ''; - }; - }; -} diff --git a/lib/build-clan/templates/interface.nix b/lib/build-clan/templates/interface.nix deleted file mode 100644 index a7c6d2e76..000000000 --- a/lib/build-clan/templates/interface.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - lib, - ... -}: -let - types = lib.types; -in -{ - options = { - # clan.templates.disko - disko = lib.mkOption { - type = types.attrsOf (types.submodule { imports = [ ./disko/interface.nix ]; }); - default = { }; - description = '' - Holds different disko templates. - ''; - }; - - # clan.templates.clan - clan = lib.mkOption { - type = types.attrsOf (types.submodule { imports = [ ./clan/interface.nix ]; }); - default = { }; - description = '' - Holds the different clan templates. - ''; - }; - }; -}