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