Approch overview:
- By default PDF viewer will be inverted with
hue-rotate(180deg)to retain colors. - A JavaScript bookmarklet lets you invert back to light mode.
Put these lines in your config:
programs.firefox.your-profile = {| #!/bin/bash | |
| PROMPT_COMMAND="\[ \! -z \"\${DOCKER_MACHINE_NAME}\" \] && { _PS1_DOCKER_MACHINE_PREFIX=\"(\$DOCKER_MACHINE_NAME) \"; } || { _PS1_DOCKER_MACHINE_PREFIX=''; }" | |
| PS1='${debian_chroot:+($debian_chroot)}\[\033[01;90m\]`echo "$_PS1_DOCKER_MACHINE_PREFIX"`\[\033[01;00m\]\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' |
| #!/bin/bash | |
| PROMPT_COMMAND="\[ \! -z \"\${DOCKER_MACHINE_NAME}\" \] && { _PS1_DOCKER_MACHINE_PREFIX=\"(\$DOCKER_MACHINE_NAME) \"; } || { _PS1_DOCKER_MACHINE_PREFIX=''; }" | |
| PS1='${debian_chroot:+($debian_chroot)}\[\033[01;90m\]`echo "$_PS1_DOCKER_MACHINE_PREFIX"`\[\033[01;00m\]\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' |
Run a command in a shell with packages from pinned nixpkgs
NIX_BUILD_SHELL=bash nix-shell - --run "npins update" < <(echo "{sources ? import ./npins, pkgs ? import sources.nixpkgs {}}: pkgs.mkShell {buildInputs=[pkgs.npins];}")
I have yet to find a way to start a shell using this method. It seems like nix-shell thinks it's not "interactive" because the "shell.nix" is passed via stdin.