move create-devenv
alias to an exec alias
This commit is contained in:
parent
375441b5d2
commit
1d6bdf6187
1 changed files with 9 additions and 1 deletions
|
@ -96,6 +96,15 @@ def _edit(args):
|
|||
return ["$EDITOR", *args]
|
||||
return ["$VISUAL", *args]
|
||||
|
||||
@aliases.register
|
||||
def _create_devenv(args):
|
||||
if not args:
|
||||
template = "simple"
|
||||
else:
|
||||
template = args[0]
|
||||
run(["nix", "flake", "init", "--template", f"github:cswimr/dev-flakes#{template}"], cwd=Path.cwd(), exit_on_error=False)
|
||||
run(["direnv", "allow"], cwd=Path.cwd())
|
||||
|
||||
|
||||
alias_dictionary = {
|
||||
"ff": "fastfetch",
|
||||
|
@ -118,7 +127,6 @@ alias_dictionary = {
|
|||
"lsa": "eza -lah --time-style=long-iso --icons=auto --hyperlink",
|
||||
"tree": "eza --tree --git-ignore --time-style=long-iso --icons=auto --hyperlink",
|
||||
|
||||
"create-devenv": "nix flake init --template github:cachix/devenv and direnv allow",
|
||||
"nixpkgs-update": "nix run --option extra-substituters 'https://nix-community.cachix.org/' --option extra-trusted-public-keys 'nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=' github:ryantm/nixpkgs-update --",
|
||||
"nixrc": "edit /etc/nixos",
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue