nixos-old/sync.sh

19 lines
436 B
Bash
Raw Normal View History

2022-10-24 13:01:11 +00:00
#!/bin/sh
2022-10-24 12:35:26 +00:00
2022-10-24 19:14:09 +00:00
# update in case i was fucking around somewhere else
2022-10-24 13:24:49 +00:00
git pull
2022-10-24 19:14:09 +00:00
# format everything to look nice
2022-10-24 13:24:49 +00:00
nixpkgs-fmt *.nix
2022-10-24 19:14:09 +00:00
nixpkgs-fmt ./nvim/*.nix
2022-10-26 08:17:50 +00:00
nixpkgs-fmt ./penrose/*.nix
2022-10-24 19:14:09 +00:00
# make a backup just in case
2022-10-24 13:01:11 +00:00
cp -r /etc/nixos/ ./backup
2022-10-24 19:14:09 +00:00
# copy over all the files to /etc/nixos/
2022-10-28 18:00:40 +00:00
sudo cp -r ./configuration.nix ./nvim/ ./packages.nix ./home.nix ./user.nix /etc/nixos/
2022-10-24 19:14:09 +00:00
# update and build my new config
2022-10-24 12:35:26 +00:00
sudo nixos-rebuild switch --upgrade