From a48d057700c636666a5e835cbcb0b667848008c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Fri, 15 Mar 2024 09:13:05 +0100 Subject: nixos: rework configurations management --- nixos/modules/default.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'nixos/modules') diff --git a/nixos/modules/default.nix b/nixos/modules/default.nix index 7afdc95..ea2acb3 100644 --- a/nixos/modules/default.nix +++ b/nixos/modules/default.nix @@ -1,9 +1,10 @@ -self: let +{lib}: let inherit (builtins) readDir; - inherit (self.inputs.nixpkgs.lib) filterAttrs nameValuePair mapAttrs' hasSuffix removeSuffix; + inherit (lib) filterAttrs hasSuffix mapAttrs' nameValuePair removeSuffix; in mapAttrs' - (n: v: nameValuePair "cynerd-${removeSuffix ".nix" n}" (./. + "/${n}")) - (filterAttrs - (n: v: v == "regular" && hasSuffix ".nix" n && n != "default.nix") - (readDir ./.)) + (fname: _: nameValuePair (removeSuffix ".nix" fname) (./. + ("/" + fname))) + (filterAttrs ( + n: v: + v == "regular" && n != "default.nix" && hasSuffix ".nix" n + ) (readDir ./.)) -- cgit v1.2.3