Add templating engine
This commit is contained in:
@@ -30,6 +30,7 @@ in {
|
||||
./direnv.nix
|
||||
./git.nix
|
||||
./ssh.nix
|
||||
./templates.nix
|
||||
./vim.nix
|
||||
./xonsh.nix
|
||||
] ++ guiImports;
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = [
|
||||
pkgs.cookiecutter
|
||||
];
|
||||
}
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user