Nix : Move NIX_PATH from env to upgrade commands.

This commit is contained in:
Dmitry Voronin 2024-01-25 13:45:55 +03:00
parent 2670736423
commit 268ecae1fe
2 changed files with 2 additions and 5 deletions

View file

@ -24,9 +24,6 @@ export TEXMFLOCAL="${HOME}/app/tex/data/local"
# Dotfiles exports.
export BASH_MODULE_PATH="${HOME}/.config/bash/module"
# Nix config.
export NIX_PATH="nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos:nixos-config=/root/.config/linux/nix/${HOSTNAME}/Configuration.nix:/nix/var/nix/profiles/per-user/root/channels"
# Set java version. Sets to latest when not specified.
# Usage: export_java <VERSION>
function export_java() {

View file

@ -35,12 +35,12 @@ function nix_channel() {
# Update system (rebuild).
function nix_update() {
nixos-rebuild switch
nixos-rebuild switch -I nixos-config=/root/.config/linux/nix/${HOSTNAME}/Configuration.nix
}
# Upgrade system.
function nix_upgrade() {
nixos-rebuild switch --upgrade
nixos-rebuild switch --upgrade -I nixos-config=/root/.config/linux/nix/${HOSTNAME}/Configuration.nix
}
# Free up root space.