Need elevated privileges for normal inhibit, let's try what=idle instead
This commit is contained in:
parent
19579c43c7
commit
7aa0405738
|
@ -13,8 +13,8 @@ writeShellApplication
|
||||||
# An install script for NixOS installation to /tmp
|
# An install script for NixOS installation to /tmp
|
||||||
set -e
|
set -e
|
||||||
pushd /tmp > /dev/null
|
pushd /tmp > /dev/null
|
||||||
systemd-inhibit rm -rf ./install-nix
|
systemd-inhibit --what=idle rm -rf ./install-nix
|
||||||
systemd-inhibit git clone https://git.lillianviolet.dev/Lillian-Violet/NixOS-Config.git ./install-nix
|
systemd-inhibit --what=idle git clone https://git.lillianviolet.dev/Lillian-Violet/NixOS-Config.git ./install-nix
|
||||||
pushd ./install-nix/nixos/hosts > /dev/null
|
pushd ./install-nix/nixos/hosts > /dev/null
|
||||||
echo "Please choose the hostname you are installing to from the following list:"
|
echo "Please choose the hostname you are installing to from the following list:"
|
||||||
i=1
|
i=1
|
||||||
|
@ -26,10 +26,10 @@ writeShellApplication
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
pushd ./install-nix > /dev/null
|
pushd ./install-nix > /dev/null
|
||||||
echo "NixOS Installing..."
|
echo "NixOS Installing..."
|
||||||
systemd-inhibit sudo nixos-install --flake .#"''${dir}"
|
systemd-inhibit --what=idle sudo nixos-install --flake .#"''${dir}"
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
echo "Cleaning up repository in '/tmp/install-nix'..."
|
echo "Cleaning up repository in '/tmp/install-nix'..."
|
||||||
systemd-inhibit rm -rf ./install-nix
|
systemd-inhibit --what=idle rm -rf ./install-nix
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
notify-send -e "NixOS Install Succeeded!" --icon=software-update-available
|
notify-send -e "NixOS Install Succeeded!" --icon=software-update-available
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -14,13 +14,13 @@ writeShellApplication
|
||||||
set -e
|
set -e
|
||||||
pushd /tmp > /dev/null
|
pushd /tmp > /dev/null
|
||||||
rm -rf ./rebuild
|
rm -rf ./rebuild
|
||||||
systemd-inhibit git clone https://git.lillianviolet.dev/Lillian-Violet/NixOS-Config.git ./rebuild
|
systemd-inhibit --what=idle git clone https://git.lillianviolet.dev/Lillian-Violet/NixOS-Config.git ./rebuild
|
||||||
pushd ./rebuild > /dev/null
|
pushd ./rebuild > /dev/null
|
||||||
echo "NixOS Rebuilding..."
|
echo "NixOS Rebuilding..."
|
||||||
systemd-inhibit sudo nixos-rebuild switch --flake .#
|
systemd-inhibit --what=idle sudo nixos-rebuild switch --flake .#
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
echo "Cleaning up repository in '/tmp/rebuild'..."
|
echo "Cleaning up repository in '/tmp/rebuild'..."
|
||||||
systemd-inhibit rm -rf ./rebuild
|
systemd-inhibit --what=idle rm -rf ./rebuild
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
notify-send -e "NixOS Rebuilt OK!" --icon=software-update-available
|
notify-send -e "NixOS Rebuilt OK!" --icon=software-update-available
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue