Add templating engine

This commit is contained in:
Greg Hellings
2022-10-12 21:50:46 -05:00
parent 73465679ee
commit 9ad976b328
3 changed files with 16 additions and 0 deletions
+1
View File
@@ -30,6 +30,7 @@ in {
./direnv.nix
./git.nix
./ssh.nix
./templates.nix
./vim.nix
./xonsh.nix
] ++ guiImports;
+7
View File
@@ -0,0 +1,7 @@
{ pkgs, ... }:
{
home.packages = [
pkgs.cookiecutter
];
}
+8
View File
@@ -109,6 +109,14 @@ def _newdock(args):
def _unknown_host(args):
sed -i -e @(args[0])d ~/.ssh/known_hosts
def _bake(args):
from pathlib import Path
templates = Path("~/.copier-templates/").expanduser()
if not templates.exists():
git clone src:greg/copier-templates.git ~/.copier-templates
copier copy @(str(templates / args[0])) .
aliases['bake'] = _bake
aliases['rebuild'] = _rebuild
aliases['yaml2json'] = _yaml2json
aliases['py2env'] = _py2env