aboutsummaryrefslogtreecommitdiff
path: root/nixos/modules
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2024-03-15 09:13:05 +0100
committerKarel Kočí <cynerd@email.cz>2024-03-15 16:57:21 +0100
commita48d057700c636666a5e835cbcb0b667848008c2 (patch)
tree6e6dc0b9fcf2e85415c2f66b2beb567403be73ca /nixos/modules
parent422ef34e58bc8a187594779d95ef8d74e8332a47 (diff)
downloadnixos-personal-a48d057700c636666a5e835cbcb0b667848008c2.tar.gz
nixos-personal-a48d057700c636666a5e835cbcb0b667848008c2.tar.bz2
nixos-personal-a48d057700c636666a5e835cbcb0b667848008c2.zip
nixos: rework configurations management
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/default.nix13
1 files changed, 7 insertions, 6 deletions
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 ./.))