Add flake template to project-init
This commit is contained in:
parent
9ffb3d2d10
commit
ba20fdd8ee
|
@ -18,6 +18,7 @@ type=$1
|
||||||
if [ "$type" = "git" ]; then
|
if [ "$type" = "git" ]; then
|
||||||
git init
|
git init
|
||||||
cp ~/Documents/IT/shell.nix .
|
cp ~/Documents/IT/shell.nix .
|
||||||
|
cp ~/Documents/IT/flake-template.nix.nix flake.nix
|
||||||
mkdir src data
|
mkdir src data
|
||||||
git add ./*
|
git add ./*
|
||||||
git commit -m "Initial commit"
|
git commit -m "Initial commit"
|
||||||
|
@ -28,6 +29,7 @@ elif [ "$type" = "remote-git" ]; then
|
||||||
touch README.org
|
touch README.org
|
||||||
cp ~/Documents/IT/gpl-3.0.md LICENSE.md
|
cp ~/Documents/IT/gpl-3.0.md LICENSE.md
|
||||||
cp ~/Documents/IT/shell.nix .
|
cp ~/Documents/IT/shell.nix .
|
||||||
|
cp ~/Documents/IT/flake-template.nix.nix flake.nix
|
||||||
mkdir src tests data
|
mkdir src tests data
|
||||||
git add ./*
|
git add ./*
|
||||||
git commit -m "Initial commit"
|
git commit -m "Initial commit"
|
||||||
|
@ -39,7 +41,7 @@ elif [ "$type" = "doc" ]; then
|
||||||
elif [ "$type" = "src" ]; then
|
elif [ "$type" = "src" ]; then
|
||||||
cp ~/Documents/IT/shell.nix .
|
cp ~/Documents/IT/shell.nix .
|
||||||
mkdir src data
|
mkdir src data
|
||||||
echo "use flake" >.envrc
|
echo "use nix" >.envrc
|
||||||
direnv allow
|
direnv allow
|
||||||
else
|
else
|
||||||
usage
|
usage
|
||||||
|
|
Loading…
Reference in New Issue