14 lines
500 B
Bash
14 lines
500 B
Bash
#!/usr/bin/env bash
|
|
mkdir -p /etc/nix
|
|
generation="$(basename "$(readlink /etc/nix-current)" || echo 0)"
|
|
((generation++))
|
|
echo "[nix-openwrt] creating new generation in /etc/nix/$generation"
|
|
mkdir -p "/etc/nix/$generation"
|
|
rm "/etc/nix-current"
|
|
ln -s "/etc/nix/$generation" "/etc/nix-current"
|
|
|
|
ln -s "/etc/nix-current/etc/config/wireless" "/etc/config/wireless"
|
|
reload_config
|
|
# mkdir -p "/etc/nix-current/config"
|
|
# rm /etc/config/wireless
|
|
# ln -s /etc/nix-current/config/wireless /etc/config/wireless
|