diff --git a/.config/bash/module/Nix.sh b/.config/bash/module/Nix.sh index 34a88cd..54a7187 100644 --- a/.config/bash/module/Nix.sh +++ b/.config/bash/module/Nix.sh @@ -20,11 +20,13 @@ function nix_find() { # Switch to Unstable branch. function nix_unstable() { + nix-channel --remove nixos nix-channel --add https://nixos.org/channels/nixos-unstable nixos } # Switch to Small Unstable branch (for server). function nix_unstable_small() { + nix-channel --remove nixos nix-channel --add https://nixos.org/channels/nixos-unstable-small nixos } @@ -35,12 +37,12 @@ function nix_channel() { # Update system (rebuild). function nix_update() { - nixos-rebuild switch -I nixos-config=/root/.config/linux/nix/${HOSTNAME}/Configuration.nix + nixos-rebuild switch -I nixos-config=/root/.config/linux/system/${HOSTNAME}/Configuration.nix } # Upgrade system. function nix_upgrade() { - nixos-rebuild switch --upgrade -I nixos-config=/root/.config/linux/nix/${HOSTNAME}/Configuration.nix + nixos-rebuild switch --upgrade -I nixos-config=/root/.config/linux/system/${HOSTNAME}/Configuration.nix } # Free up root space. @@ -49,6 +51,7 @@ function nix_clean() { [[ "${UID}" = 0 ]] && nix-store --gc } +# Spawn shell with nix environment, like LD support. function nix_shell() { nix-shell ~/.config/linux/Shell.nix } diff --git a/.config/linux/nix/AmdGpu.nix b/.config/linux/system/AmdGpu.nix similarity index 100% rename from .config/linux/nix/AmdGpu.nix rename to .config/linux/system/AmdGpu.nix diff --git a/.config/linux/nix/Common.nix b/.config/linux/system/Common.nix similarity index 100% rename from .config/linux/nix/Common.nix rename to .config/linux/system/Common.nix diff --git a/.config/linux/nix/Docker.nix b/.config/linux/system/Docker.nix similarity index 100% rename from .config/linux/nix/Docker.nix rename to .config/linux/system/Docker.nix diff --git a/.config/linux/nix/DockerRootless.nix b/.config/linux/system/DockerRootless.nix similarity index 100% rename from .config/linux/nix/DockerRootless.nix rename to .config/linux/system/DockerRootless.nix diff --git a/.config/linux/nix/Flatpak.nix b/.config/linux/system/Flatpak.nix similarity index 100% rename from .config/linux/nix/Flatpak.nix rename to .config/linux/system/Flatpak.nix diff --git a/.config/linux/nix/Gnome.nix b/.config/linux/system/Gnome.nix similarity index 100% rename from .config/linux/nix/Gnome.nix rename to .config/linux/system/Gnome.nix diff --git a/.config/linux/nix/Powerlimit.nix b/.config/linux/system/Powerlimit.nix similarity index 100% rename from .config/linux/nix/Powerlimit.nix rename to .config/linux/system/Powerlimit.nix diff --git a/.config/linux/nix/PowersaveAmd.nix b/.config/linux/system/PowersaveAmd.nix similarity index 100% rename from .config/linux/nix/PowersaveAmd.nix rename to .config/linux/system/PowersaveAmd.nix diff --git a/.config/linux/nix/PowersaveIntel.nix b/.config/linux/system/PowersaveIntel.nix similarity index 100% rename from .config/linux/nix/PowersaveIntel.nix rename to .config/linux/system/PowersaveIntel.nix diff --git a/.config/linux/nix/Print.nix b/.config/linux/system/Print.nix similarity index 100% rename from .config/linux/nix/Print.nix rename to .config/linux/system/Print.nix diff --git a/.config/linux/nix/Sshd.nix b/.config/linux/system/Sshd.nix similarity index 100% rename from .config/linux/nix/Sshd.nix rename to .config/linux/system/Sshd.nix diff --git a/.config/linux/nix/Voronind.nix b/.config/linux/system/Voronind.nix similarity index 100% rename from .config/linux/nix/Voronind.nix rename to .config/linux/system/Voronind.nix diff --git a/.config/linux/nix/desktop/Configuration.nix b/.config/linux/system/desktop/Configuration.nix similarity index 100% rename from .config/linux/nix/desktop/Configuration.nix rename to .config/linux/system/desktop/Configuration.nix diff --git a/.config/linux/nix/desktop/HardwareConfiguration.nix b/.config/linux/system/desktop/HardwareConfiguration.nix similarity index 100% rename from .config/linux/nix/desktop/HardwareConfiguration.nix rename to .config/linux/system/desktop/HardwareConfiguration.nix diff --git a/.config/linux/nix/home/Backup.nix b/.config/linux/system/home/Backup.nix similarity index 100% rename from .config/linux/nix/home/Backup.nix rename to .config/linux/system/home/Backup.nix diff --git a/.config/linux/nix/home/Nextcloud.nix b/.config/linux/system/home/Nextcloud.nix similarity index 100% rename from .config/linux/nix/home/Nextcloud.nix rename to .config/linux/system/home/Nextcloud.nix diff --git a/.config/linux/nix/home/PhotosProcess.nix b/.config/linux/system/home/PhotosProcess.nix similarity index 100% rename from .config/linux/nix/home/PhotosProcess.nix rename to .config/linux/system/home/PhotosProcess.nix diff --git a/.config/linux/nix/home/YandexMusic.nix b/.config/linux/system/home/YandexMusic.nix similarity index 100% rename from .config/linux/nix/home/YandexMusic.nix rename to .config/linux/system/home/YandexMusic.nix diff --git a/.config/linux/nix/work/Configuration.nix b/.config/linux/system/work/Configuration.nix similarity index 100% rename from .config/linux/nix/work/Configuration.nix rename to .config/linux/system/work/Configuration.nix diff --git a/.config/linux/nix/work/Fprint.nix b/.config/linux/system/work/Fprint.nix similarity index 100% rename from .config/linux/nix/work/Fprint.nix rename to .config/linux/system/work/Fprint.nix diff --git a/.config/linux/nix/work/HardwareConfiguration.nix b/.config/linux/system/work/HardwareConfiguration.nix similarity index 100% rename from .config/linux/nix/work/HardwareConfiguration.nix rename to .config/linux/system/work/HardwareConfiguration.nix