feat: nixx and nixi commands/packages

This commit is contained in:
Gustavo "Guz" L. de Mello
2024-01-23 22:57:23 -03:00
parent d443fd67ad
commit 682bd48781
5 changed files with 5 additions and 3 deletions

View File

@@ -0,0 +1,18 @@
{ pkgs, ... }:
let
nixi = pkgs.writeShellScriptBin "nixi" ''
# npm-like command for nix
function nix-shell() {
local pkg="$1"
nix shell "nixpkgs#$pkg"
}
nix-shell $1
'';
in
{
home.packages = [
nixi
];
}

View File

@@ -0,0 +1,18 @@
{ pkgs, ... }:
let
nixx = pkgs.writeShellScriptBin "nixx" ''
# npx-like command for nix
function nix-run() {
local pkg="$1"
nix run "nixpkgs#$pkg"
}
nix-run $1
'';
in
{
home.packages = [
nixx
];
}