Install them this way?

This commit is contained in:
Lillian Violet 2024-01-17 15:25:52 +01:00
parent 20d57a2706
commit f1b4f907ee
3 changed files with 61 additions and 22 deletions

View file

@ -55,6 +55,31 @@
};
};
pkgs = [
writeShellApplication
{
name = "dvd";
runtimeInputs = [echo direnv];
text = ''
echo "use flake \"github:the-nix-way/dev-templates?dir=$1\"" >> .envrc
direnv allow
'';
}
writeShellApplication
{
name = "dvt";
runtimeInputs = [direnv nix];
text = ''
nix flake init -t "github:the-nix-way/dev-templates#$1"
direnv allow
'';
}
];
environment.systemPackages = with pkgs; [
# System tools
age
@ -91,28 +116,8 @@
# User tools
noisetorch
writeShellApplication
{
name = "dvd";
runtimeInputs = [echo direnv];
text = ''
echo "use flake \"github:the-nix-way/dev-templates?dir=$1\"" >> .envrc
direnv allow
'';
}
writeShellApplication
{
name = "dvt";
runtimeInputs = [direnv nix];
text = ''
nix flake init -t "github:the-nix-way/dev-templates#$1"
direnv allow
'';
}
(callPackage ../shared/scripts/dvd.nix {})
(callPackage ../shared/scripts/dvt.nix {})
];
programs.direnv = {

View file

@ -0,0 +1,17 @@
{
lib,
stdenv,
direnv,
writeShellApplication,
}:
writeShellApplication
{
name = "dvd";
runtimeInputs = [echo direnv];
text = ''
echo "use flake \"github:the-nix-way/dev-templates?dir=$1\"" >> .envrc
direnv allow
'';
}

View file

@ -0,0 +1,17 @@
{
lib,
stdenv,
direnv,
writeShellApplication,
}:
writeShellApplication
{
name = "dvt";
runtimeInputs = [direnv nix];
text = ''
nix flake init -t "github:the-nix-way/dev-templates#$1"
direnv allow
'';
}