Skip to content

Commit 50feae5

Browse files
author
arch
committed
improve nix install
1 parent e9724f4 commit 50feae5

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

contrib/OpenFunscripter/openfunscripter_setup_linux.sh

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,16 @@ fi
1111
echo "install required packages"
1212
if command -v apt; then
1313
# debian based distro:
14-
sudo mkdir -p /nix
15-
sudo chown $USER /nix
1614
sudo apt install -y curl
17-
sh <(curl -L https://nixos.org/nix/install)
18-
. /home/$USER/.nix-profile/etc/profile.d/nix.sh
15+
sh <(curl -L https://nixos.org/nix/install) --daemon --yes
16+
17+
if [ -f /etc/profile.d/nix.sh ]; then
18+
. /etc/profile.d/nix.sh
19+
fi
20+
21+
if [ -f /home/$USER/.nix-profile/etc/profile.d/nix.sh ]; then
22+
. /home/$USER/.nix-profile/etc/profile.d/nix.sh
23+
fi
1924

2025
echo "Install OFS AppImage dependencies"
2126
sudo apt install -y fuse
@@ -29,6 +34,7 @@ fi
2934
if [ ! -f ~/.config/nix/nix.conf ]; then
3035
mkdir -p ~/.config/nix
3136
echo "experimental-features = nix-command flakes" > ~/.config/nix/nix.conf
37+
sudo systemctl restart nix-daemon.service
3238
fi
3339

3440
OFS_APP_DIR="$HOME/.local/share/OFS/application"
@@ -110,3 +116,6 @@ echo "Installation Completed"
110116
if [ "$arg1" = "--latest" ]; then
111117
echo "WARNING: you have install the latest application code"
112118
fi
119+
120+
# When nix was installed with this scrip we need an reboot to work
121+
echo "You may need to restart you computer to get MTFG working"

0 commit comments

Comments
 (0)