This might work
This commit is contained in:
parent
f8cf7b589b
commit
b5ff78aae9
|
@ -11,7 +11,7 @@ writeShellApplication
|
||||||
|
|
||||||
text = ''
|
text = ''
|
||||||
# A rebuild script for NixOS
|
# A rebuild script for NixOS
|
||||||
rebuild_function (){
|
rebuild_function () {
|
||||||
set -e
|
set -e
|
||||||
pushd /tmp > /dev/null
|
pushd /tmp > /dev/null
|
||||||
rm -rf ./rebuild
|
rm -rf ./rebuild
|
||||||
|
@ -25,6 +25,7 @@ writeShellApplication
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
echo "NixOS Rebuilt OK!"
|
echo "NixOS Rebuilt OK!"
|
||||||
}
|
}
|
||||||
|
sudo bash -c "$(declare -f rebuild_function); rebuild_function"
|
||||||
sudo systemd-inhibit --who="NixOS Updater" --why="Updating system configuration" sudo -u lillian rebuild_function
|
sudo systemd-inhibit --who="NixOS Updater" --why="Updating system configuration" sudo -u lillian rebuild_function
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue