From fde5155195b665f168957a3f0741bd60ff7ca2b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 26 Jul 2023 11:32:27 +0200 Subject: [PATCH] clan-template: introduce clan-flake-module --- templates/new-clan/clan-flake-module.nix | 9 +++++++++ templates/new-clan/flake.nix | 12 +++--------- 2 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 templates/new-clan/clan-flake-module.nix diff --git a/templates/new-clan/clan-flake-module.nix b/templates/new-clan/clan-flake-module.nix new file mode 100644 index 000000000..cffd20ac1 --- /dev/null +++ b/templates/new-clan/clan-flake-module.nix @@ -0,0 +1,9 @@ +# AUTOMATICALLY GENERATED by clan +{ ... }: { + imports = + let + relPaths = builtins.fromJSON (builtins.readFile ./imports.json); + paths = map (path: ./. + path) relPaths; + in + paths; +} diff --git a/templates/new-clan/flake.nix b/templates/new-clan/flake.nix index fed790bf3..ca463ed08 100644 --- a/templates/new-clan/flake.nix +++ b/templates/new-clan/flake.nix @@ -8,14 +8,8 @@ outputs = inputs @ { flake-parts, ... }: flake-parts.lib.mkFlake { inherit inputs; } { - - systems = builtins.fromJSON (builtins.readFile ./systems.json); - - imports = - let - relPaths = builtins.fromJSON (builtins.readFile ./imports.json); - paths = map (path: ./. + path) relPaths; - in - paths; + imports = [ + ./clan-flake-module.nix + ]; }; }