diff --git a/config.nix b/config.nix index 78356e1..355f9c9 100644 --- a/config.nix +++ b/config.nix @@ -53,16 +53,12 @@ services.fwupd.enable = true; # Define user accounts - users.extraUsers = - { - aaronh = - { - home = "/home/aaronh"; - extraGroups = [ "wheel" "networkmanager" ]; - isNormalUser = true; - hashedPassword = "$6$aAcbLtqiqzySifls$jdKMOQjoWITHD/dWNNZVUH/qNc6aoJ7v4zYofi0U7IJSVTbmOfChS3mzaJbp57AodjdPNKPrnrip8Nlh2Qanx."; - }; - }; + users.extraUsers.aaronh = { + home = "/home/aaronh"; + extraGroups = [ "wheel" "networkmanager" ]; + isNormalUser = true; + hashedPassword = "$6$aAcbLtqiqzySifls$jdKMOQjoWITHD/dWNNZVUH/qNc6aoJ7v4zYofi0U7IJSVTbmOfChS3mzaJbp57AodjdPNKPrnrip8Nlh2Qanx."; + }; # Install some packages environment.systemPackages = diff --git a/install.sh b/install.sh index 00bff76..1559872 100644 --- a/install.sh +++ b/install.sh @@ -43,6 +43,11 @@ echo "" echo "Which is the root partition?" read rootName +echo "" +echo "Which is your username?" +read userName +echo "" + # Create EFI partition sudo mkfs.fat -F32 -n EFI $efiName @@ -89,6 +94,10 @@ sudo nixos-generate-config --root /mnt curl https://gitlab.com/ahoneybun/nyxi-installer/-/raw/main/config.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ +# Replacing username +sudo sed -i "s/aaronh/$userName/g" /mnt/etc/nixos/configuration.nix +sudo sed -i "s/\/home\/aaronh/\/home\/$userName/g" /mnt/etc/nixos/configuration.nix + # Install sudo nixos-install @@ -105,6 +114,3 @@ sudo nixos-install # Removed install script. rm install.sh - -# Remove setup script -# rm setup.sh