home-manager initial commit

This commit is contained in:
2021-04-30 19:49:57 +05:30
parent fb7e5cafce
commit da3ef21ccd
6 changed files with 100 additions and 13 deletions

19
hm-switch Executable file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env bash
echo "You're about to switch your home-manager configuration as '$USER'"
read -p "Continue (y/n)?" conf
read -p "Do you want to use doas instead of sudo? (y/n)" conf2
elev="sudo"
if [ ${conf2,,} == "y" ]; then
elev="doas"
fi
if [ ${conf,,} == "n" ]; then
echo "If this is not you, then log into your profile first!"
exit 1
else
$elev nix build .\#hm-configs.$USER.activationPackage -o hm-result
./hm-result/activate
$elev unlink hm-result
fi