Fix various bugs.

This commit is contained in:
proledatarian 2024-12-15 11:36:39 +01:00
parent 926c740a34
commit 105ecfea00
3 changed files with 17 additions and 13 deletions

8
README.md Normal file
View File

@ -0,0 +1,8 @@
NixOS Installer
# Installation
$ sudo loadkeys de
$ git clone https://git.dataprolet.de/dataprolet/NixOS-Installer.git
$ cd nixos-installer
$ sh install.sh

View File

@ -40,10 +40,9 @@
services.displayManager.sddm.enable = true; services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true; services.desktopManager.plasma6.enable = true;
environment.plasma6.excludePackages = with pkgs.kdePackages; [ #environment.plasma6.excludePackages = with pkgs.kdePackages; [
plasma-browser-integration
konsole #];
];

View File

@ -34,9 +34,7 @@ IFS=$'\n'
declare -a dsks=( $(lsblk -d | tail -n+2 | awk '{print $1" "$4}') ) declare -a dsks=( $(lsblk -d | tail -n+2 | awk '{print $1" "$4}') )
# Select value on array. # Select value on array.
select dev in "${dsks[@]}" select dev in "${dsks[@]}"; do
do
break break
done done
echo echo
@ -44,9 +42,8 @@ echo
# Separate values by spaces. # Separate values by spaces.
IFS=' ' IFS=' '
# Create new variable of selection. # Cut size from variable
array=("${dev}") dev=${dev%% *}
dev="${array[0]}"
clear clear
@ -107,7 +104,7 @@ echo
# Creating system partition. # Creating system partition.
echo "Creating system partition." echo "Creating system partition."
sudo parted "/dev/${dev}" -- mkpart 512MB 100% sudo parted "/dev/${dev}" -- mkpart root 512MB 100%
echo echo
# Print partitions. # Print partitions.
@ -177,7 +174,7 @@ echo
# Copy existing config # Copy existing config
sudo nixos-generate-config --root /mnt sudo nixos-generate-config --root /mnt
sudo mv /mnt/etc/nixos/configuration.nix /mnt/etc/nixos/configuration.nix.bak sudo mv /mnt/etc/nixos/configuration.nix /mnt/etc/nixos/configuration.nix.bak
cp configuration.nix /mnt/etc/nixos sudo cp configuration.nix /mnt/etc/nixos
# Replace username in config # Replace username in config
sudo sed -i "s/username/${user}/g" /mnt/etc/nixos/configuration.nix sudo sed -i "s/username/${user}/g" /mnt/etc/nixos/configuration.nix