Compare commits
2 commits
64caf26c18
...
fa2ad42ecf
Author | SHA1 | Date | |
---|---|---|---|
Dmitry Voronin | fa2ad42ecf | ||
Dmitry Voronin | d5414659c2 |
|
@ -14,6 +14,11 @@ in {
|
|||
export -f $(find_function | tr '\n' ' ')
|
||||
export -f find_function
|
||||
|
||||
# Nested shell indicator support.
|
||||
if [ -z ''${SHLVLMIN} ]; then
|
||||
export SHLVLMIN=''${SHLVL}
|
||||
fi
|
||||
|
||||
# Autostart Sway.
|
||||
if [[ -z $DISPLAY ]] && [[ "$(tty)" = "/dev/tty1" ]]; then
|
||||
exec sway
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
# Spawn Nix shell with required tools.
|
||||
function dvd_shell() {
|
||||
NIX_SHELL="dvd" tmpshell dvdplusrwtools cdrkit
|
||||
SHELL_NAME="dvd" tmpshell dvdplusrwtools cdrkit
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
# Create Nix GC root in .NixRoot{NAME}.
|
||||
nix build ".#devShells.''${NIX_CURRENT_SYSTEM}.''${target}" -o ".NixRoot''${target^}"
|
||||
|
||||
NIX_SHELL="''${target}" nix develop ".#devShells.''${NIX_CURRENT_SYSTEM}.''${target}"
|
||||
SHELL_NAME="''${target}" nix develop ".#devShells.''${NIX_CURRENT_SYSTEM}.''${target}"
|
||||
}
|
||||
alias shell="nix_shell"
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
|||
local IFS=$'\n'
|
||||
local input=("''${@}")
|
||||
local pkgs=()
|
||||
local tag="''${NIX_SHELL}"
|
||||
local tag="''${SHELL_NAME}"
|
||||
|
||||
if [[ "''${input}" = "" ]]; then
|
||||
help nix_tmpshell
|
||||
|
@ -55,7 +55,7 @@
|
|||
pkgs+=("nixpkgs#''${pkg}")
|
||||
done
|
||||
|
||||
NIX_SHELL="''${tag}" NIXPKGS_ALLOW_UNFREE=1 nix shell --impure ''${pkgs[@]}
|
||||
SHELL_NAME="''${tag}" NIXPKGS_ALLOW_UNFREE=1 nix shell --impure ''${pkgs[@]}
|
||||
}
|
||||
alias tmpshell="nix_tmpshell"
|
||||
|
||||
|
|
|
@ -85,9 +85,11 @@ in {
|
|||
# Command on new line.
|
||||
PS1+="\n"
|
||||
|
||||
# Show nix shell name.
|
||||
if [ -n "''${NIX_SHELL}" ]; then
|
||||
PS1+="''${NIX_SHELL} "
|
||||
# Show nix shell name or shell depth.
|
||||
if [ -n "''${SHELL_NAME}" ]; then
|
||||
PS1+="''${SHELL_NAME} "
|
||||
elif [[ "''${SHLVL}" -gt "''${SHLVLMIN}" ]]; then
|
||||
PS1+="($((''${SHLVL} - ''${SHLVLMIN}))) "
|
||||
fi
|
||||
|
||||
# Show remote connections.
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
kernel.enable = true;
|
||||
keyd.enable = true;
|
||||
print.enable = true;
|
||||
strongswan.enable = true;
|
||||
tablet.enable = true;
|
||||
intel.cpu = {
|
||||
enable = true;
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
kernel.enable = true;
|
||||
keyd.enable = true;
|
||||
print.enable = true;
|
||||
strongswan.enable = true;
|
||||
tablet.enable = true;
|
||||
amd = {
|
||||
compute.enable = true;
|
||||
|
|
Loading…
Reference in a new issue