Merge branch 'custom-username' into 'main'

Custom username

See merge request ahoneybun/nyxi-installer!5
This commit is contained in:
Aaron Honeycutt 2022-05-23 14:28:40 +00:00
commit 740a02648c
2 changed files with 15 additions and 13 deletions

View file

@ -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 =

View file

@ -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