diff options
author | sss <sss@dark-alexandr.net> | 2025-07-01 11:11:24 +0300 |
---|---|---|
committer | sss <sss@dark-alexandr.net> | 2025-07-02 11:43:33 +0300 |
commit | a2149f52e1f7aa1b1a8cc6c9637df53d9b82f452 (patch) | |
tree | 730d53c72eb4eae779359a3868922d3ab64cc5ef /flake.nix | |
parent | 1cc98c6faef01ca5de3eefda24c97794f406e2bf (diff) |
add flake support
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..86ed20f --- /dev/null +++ b/flake.nix @@ -0,0 +1,22 @@ +{ + outputs = { self }: + let + nixFiles = builtins.filter + (f: f != "flake.nix" && builtins.match ".*\\.nix" f != null) + (builtins.attrNames (builtins.readDir ./.)); + + # Исправленная функция создания overlay + makeOverlay = file: { + name = builtins.replaceStrings [ ".nix" ] [ "" ] file; + value = inputs: (import (./. + "/${file}") { +# inherit inputs final prev; + inherit inputs; + }); + }; + + in { + overlays = builtins.listToAttrs (map makeOverlay nixFiles); +# allOverlays = builtins.attrValues overlaysSet; + }; +} + |