configurations of hq services
https://hydra.hq.c3d2.de/jobset/c3d2/nix-config#tabs-jobs
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
562 B
25 lines
562 B
#!/usr/bin/env bash |
|
|
|
set -e |
|
|
|
REPO=nix-configs |
|
if [ -d $REPO ]; then |
|
cd $REPO |
|
git pull --ff-only |
|
else |
|
git clone https://github.com/c3d2/$REPO.git $REPO |
|
fi |
|
|
|
for OLDCFG in /etc/nixos/{hardware-,}configuration.nix; do |
|
if [ -f $OLDCFG ]; then |
|
sudo mv ${OLDCFG}{,.old} |
|
fi |
|
done |
|
|
|
sudo ln -s $HOME/$REPO/hosts/`hostname -s`/configuration.nix /etc/nixos/configuration.nix |
|
ls -l /etc/nixos/configuration.nix |
|
|
|
if [ -f $REPO/hosts/`hostname -s`/home.nix ]; then |
|
mkdir -p ~/.config/nixpkgs |
|
ln -s $HOME/$REPO/hosts/`hostname -s`/home.nix ~/.config/nixpkgs/home.nix |
|
fi
|
|
|