nixos-config/users/home-manager/foo-dogsquared/config/bin/init-template
Gabriel Arazas 3a022a374a Restructure the modules
I think this is better for separating modules explicitly. This is also
considered as there are similar objects between modules (e.g., NixOS
and home-manager modules and users).

Revert users module to old position
2021-12-06 17:03:39 +08:00

13 lines
247 B
Bash
Executable File

#!/usr/bin/env bash
set -eo pipefail
TEMPLATES_DIR="$HOME/templates"
while [[ ! -a "$TEMPLATES_DIR/$TEMPLATE/cookiecutter.json" ]]
do
TEMPLATE="$TEMPLATE/$(ls "$TEMPLATES_DIR/$TEMPLATE" | fzf)"
done
cookiecutter "$TEMPLATES_DIR/$TEMPLATE"