add doctrine and sway modules

This commit is contained in:
Fabian Montero 2025-08-05 23:22:16 -06:00
parent 1c7810a49e
commit f6fb2764f5
Signed by: fabian
GPG key ID: 1FFAC35E1798174F
12 changed files with 117 additions and 14 deletions

View file

@ -1,3 +0,0 @@
{callPackage}: {
importAll = callPackage ./importAll.nix {};
}

View file

@ -1,20 +0,0 @@
{lib}: {
root,
exclude ? [],
}:
with builtins;
with lib;
# http://chriswarbo.net/projects/nixos/useful_hacks.html
let
basename = removeSuffix ".nix";
isMatch = name: type:
(hasSuffix ".nix" name || type == "directory")
&& ! elem name (map basename exclude);
entry = name: _: {
name = basename name;
value = import (root + "/${name}");
};
in
mapAttrs' entry (filterAttrs isMatch (readDir root))