mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2026-04-17 06:39:07 +02:00
feat: simplify flake-parts imports
This commit is contained in:
parent
3d3e8d450d
commit
ff8dd91aef
24 changed files with 77 additions and 79 deletions
26
flake/templates.nix
Normal file
26
flake/templates.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ self, ... }:
|
||||
{
|
||||
flake = _: {
|
||||
templates =
|
||||
let
|
||||
mkTemplates = names: builtins.listToAttrs (map
|
||||
(name: {
|
||||
inherit name;
|
||||
value = {
|
||||
path = "${self}/files/templates/${name}";
|
||||
description = "${name} project ";
|
||||
};
|
||||
})
|
||||
names);
|
||||
templateNames = [
|
||||
"python"
|
||||
"rust"
|
||||
"go"
|
||||
"cpp"
|
||||
"latex"
|
||||
"default"
|
||||
];
|
||||
in
|
||||
mkTemplates templateNames;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue