From d55dc358824179f8fa3758ee927a1e6d12be733d Mon Sep 17 00:00:00 2001 From: clerie Date: Mon, 13 May 2024 17:39:54 +0200 Subject: [PATCH] lib/flake-helper.nix,flake/nixosConfigurations.nix: Move functions to flake directory --- flake.nix | 2 +- lib/flake-helper.nix => flake/nixosConfigurations.nix | 11 ++++++++--- lib/default.nix | 4 ---- 3 files changed, 9 insertions(+), 8 deletions(-) rename lib/flake-helper.nix => flake/nixosConfigurations.nix (94%) diff --git a/flake.nix b/flake.nix index 377452a..573bd9f 100644 --- a/flake.nix +++ b/flake.nix @@ -90,7 +90,7 @@ _iso = { name = "_iso"; }; }; - nixosConfigurations = helper.mapToNixosConfigurations self.clerie.hosts; + nixosConfigurations = import ./flake/nixosConfigurations.nix inputs; nixosModules = { nixfilesInputs = import ./flake/modules.nix inputs; diff --git a/lib/flake-helper.nix b/flake/nixosConfigurations.nix similarity index 94% rename from lib/flake-helper.nix rename to flake/nixosConfigurations.nix index ff81862..276d3c5 100644 --- a/lib/flake-helper.nix +++ b/flake/nixosConfigurations.nix @@ -1,6 +1,9 @@ -{ self, nixpkgs, fernglas, fieldpoc, nixos-exporter, solid-xmpp-alarm, sops-nix, ... }@inputs: +{ self +, nixpkgs +, ... +}@inputs: -rec { +let generateNixosSystem = { name, system ? "x86_64-linux", @@ -57,4 +60,6 @@ rec { }; mapToNixosConfigurations = hosts: builtins.mapAttrs (name: host: generateNixosSystem host) hosts; -} + +in + mapToNixosConfigurations self.clerie.hosts diff --git a/lib/default.nix b/lib/default.nix index 8d796fc..0d1d47a 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -7,10 +7,6 @@ let } // inputs); lib = { - flake-helper = callLibs ./flake-helper.nix; - inherit ("flake-helper") - generateNixosSystem - mapToNixosConfigurations; clerie-monitoring-ids = callLibs ./clerie-monitoring-ids.nix; };