Adjust package manager commands

This commit is contained in:
1ndev 2024-12-14 17:43:00 -08:00
parent 0ff2ed6d4f
commit d8e9bc7d8b

View File

@ -29,8 +29,9 @@ echo ''
echo "Install nix ? [y/n]" echo "Install nix ? [y/n]"
read inputnix read inputnix
if [[ $inputnix =~ ^[Yy]$ ]]; then if [[ $inputnix =~ ^[Yy]$ ]]; then
sudo su -c '
{ {
sudo cat << EOF cat << EOF
[Unit] [Unit]
Description=Create a `/nix` directory to be used for bind mounting Description=Create a `/nix` directory to be used for bind mounting
PropagatesStopTo=nix-daemon.service PropagatesStopTo=nix-daemon.service
@ -52,9 +53,10 @@ ExecStop=rmdir /nix
ExecStop=steamos-readonly enable ExecStop=steamos-readonly enable
RemainAfterExit=true RemainAfterExit=true
EOF EOF
} > /etc/systemd/system/nix-directory.service } > /etc/systemd/system/nix-directory.service'
sudo su -c '
{ {
sudo cat << EOF cat << EOF
[Unit] [Unit]
Description=Mount `/home/nix` on `/nix` Description=Mount `/home/nix` on `/nix`
PropagatesStopTo=nix-daemon.service PropagatesStopTo=nix-daemon.service
@ -71,9 +73,10 @@ Type=none
DirectoryMode=0755 DirectoryMode=0755
Options=bind Options=bind
EOF EOF
} > /etc/systemd/system/nix.mount } > /etc/systemd/system/nix.mount'
sudo su -c '
{ {
sudo cat << EOF cat << EOF
[Unit] [Unit]
Description=Ensure Nix related units which are symlinked resolve Description=Ensure Nix related units which are symlinked resolve
After=nix.mount After=nix.mount
@ -92,7 +95,7 @@ ExecStart=/usr/bin/systemctl restart --no-block sockets.target timers.target mul
[Install] [Install]
WantedBy=sysinit.target WantedBy=sysinit.target
EOF EOF
} > /etc/systemd/system/ensure-symlinked-units-resolve.service } > /etc/systemd/system/ensure-symlinked-units-resolve.service'
sudo systemctl daemon-reload sudo systemctl daemon-reload
sudo systemctl enable --now ensure-symlinked-units-resolve.service sudo systemctl enable --now ensure-symlinked-units-resolve.service