mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-05 20:50:15 +00:00
remove inputs
This commit is contained in:
19
templates/default.nix
Normal file
19
templates/default.nix
Normal file
@ -0,0 +1,19 @@
|
||||
# Return a list of all templates
|
||||
|
||||
{ lib, ... }:
|
||||
|
||||
lib.pipe (lib.filesystem.listFilesRecursive ./.) [
|
||||
# Get only files ending in default.nix
|
||||
(builtins.filter (name: lib.hasSuffix "flake.nix" name))
|
||||
# Import each template function
|
||||
map
|
||||
(file: rec {
|
||||
name = builtins.baseNameOf (builtins.dirOf file);
|
||||
value = {
|
||||
path = builtins.dirOf file;
|
||||
description = "${name} template";
|
||||
};
|
||||
})
|
||||
# Convert to an attrset of template name -> template path and description
|
||||
(builtins.listToAttrs)
|
||||
]
|
Reference in New Issue
Block a user