Fix auto-install for other usernamesc

This commit is contained in:
Emmet 2024-02-26 20:35:27 -06:00
parent ac9165a700
commit 4bdb33ff76

View file

@ -4,8 +4,9 @@
nix-shell -p git --command "git clone https://gitlab.com/librephoenix/nixos-config ~/.dotfiles"
sudo nixos-generate-config --show-hardware-config > ~/.dotfiles/system/hardware-configuration.nix
sed -i "0,/emmet/s//$(whoami)/" flake.nix
sed -i "0,/Emmet/s//$(getent passwd $(whoami) | cut -d ':' -f 5 | cut -d ',' -f 1)/" flake.nix
sed -i "0,/emmet/s//$(whoami)/" ~/.dotfiles/flake.nix
sed -i "0,/Emmet/s//$(getent passwd $(whoami) | cut -d ':' -f 5 | cut -d ',' -f 1)/" ~/.dotfiles/flake.nix
sed -i "s/emmet@librephoenix.com//" ~/.dotfiles/flake.nix
if [ -z "$EDITOR" ]; then
EDITOR=nano;
fi