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