dotfiles/sync-nix.sh
2025-04-06 20:08:15 +02:00

13 lines
332 B
Bash
Executable file

#!/bin/bash
echo "Copying configurations"
cp .config/* ~/.config/ -r
cp .default-python-packages ~
if [ -z "$(which nh)" ]; then
sudo cp *.nix /etc/nixos/
sudo nixos-rebuild switch --show-trace
cp /etc/nixos/flake.lock .
else
sudo nix-channel --update
sudo nix flake update
nh os switch . -- --show-trace
fi