feat: nixx and nixi commands/packages
This commit is contained in:
18
modules/home-manager/packages/nixi.nix
Normal file
18
modules/home-manager/packages/nixi.nix
Normal 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
|
||||
];
|
||||
}
|
||||
|
||||
18
modules/home-manager/packages/nixx.nix
Normal file
18
modules/home-manager/packages/nixx.nix
Normal 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
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user