home/shell: make mainProgram selection better
This commit is contained in:
parent
550b9f1b1b
commit
87eeb522a2
|
@ -9,7 +9,10 @@
|
||||||
|
|
||||||
colorSlashes = colorRed "/" { middle = "/"; };
|
colorSlashes = colorRed "/" { middle = "/"; };
|
||||||
|
|
||||||
p = pkg: "${pkgs.${pkg}}/bin/${pkg}";
|
p = name: let
|
||||||
|
pkg = pkgs.${name};
|
||||||
|
exe = if pkg.meta ? mainProgram then pkg.meta.mainProgram else name;
|
||||||
|
in "${pkg}/bin/${exe}";
|
||||||
in {
|
in {
|
||||||
local.shell.aliases = {
|
local.shell.aliases = {
|
||||||
|
|
||||||
|
@ -82,6 +85,7 @@ in {
|
||||||
|
|
||||||
"Nix Stuff" = {
|
"Nix Stuff" = {
|
||||||
nxr = "sudo nixos-rebuild switch";
|
nxr = "sudo nixos-rebuild switch";
|
||||||
|
nxrl = "sudo nixos-rebuild switch --option builders '' -L";
|
||||||
|
|
||||||
nix-check-syntax = "nix-instantiate --parse-only";
|
nix-check-syntax = "nix-instantiate --parse-only";
|
||||||
|
|
||||||
|
@ -335,4 +339,4 @@ in {
|
||||||
# POWERLEVEL9K_LEFT_PROMPT_ELEMENTS = ["dir" "vcs"];
|
# POWERLEVEL9K_LEFT_PROMPT_ELEMENTS = ["dir" "vcs"];
|
||||||
# NIX_PATH = ''$HOME/.nix-defexpr/channels$\{NIX_PATH:+:}$NIX_PATH'';
|
# NIX_PATH = ''$HOME/.nix-defexpr/channels$\{NIX_PATH:+:}$NIX_PATH'';
|
||||||
# };
|
# };
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue