From 34a7a042a36b63eb6b900932b1e420e4b6014a57 Mon Sep 17 00:00:00 2001 From: seth Date: Sun, 5 May 2024 11:35:18 -0400 Subject: simplify some things (#353) * flake: drop flake-parts * flake: add back flake-parts * flake: use flake module again for configurations --- modules/flake/terranix.nix | 55 ---------------------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 modules/flake/terranix.nix (limited to 'modules/flake/terranix.nix') diff --git a/modules/flake/terranix.nix b/modules/flake/terranix.nix deleted file mode 100644 index 0d39043..0000000 --- a/modules/flake/terranix.nix +++ /dev/null @@ -1,55 +0,0 @@ -{ - lib, - flake-parts-lib, - inputs, - ... -}: let - namespace = "terranix"; - - inherit - (lib) - literalExpression - mkOption - mkPackageOption - types - ; - - inherit - (flake-parts-lib) - mkPerSystemOption - ; -in { - options = { - perSystem = mkPerSystemOption ({ - config, - pkgs, - system, - ... - }: let - cfg = config.${namespace}; - in { - options.${namespace} = { - modules = mkOption { - type = types.listOf types.unspecified; - default = []; - example = literalExpression "[ ./terranix ]"; - description = '' - Modules to use in this terranixConfiguration - ''; - }; - - package = mkPackageOption pkgs "opentofu" { - default = ["opentofu"]; - example = literalExpression "pkgs.opentofu.withPlugins (plugins: [ plugins.tailscale ] )"; - }; - }; - - config = { - packages.terranix = inputs.terranix.lib.terranixConfiguration { - inherit system; - inherit (cfg) modules; - }; - }; - }); - }; -} -- cgit v1.2.3