From 105ecfea0065c31b58099e2a05c319ed36e75e49 Mon Sep 17 00:00:00 2001 From: proledatarian Date: Sun, 15 Dec 2024 11:36:39 +0100 Subject: [PATCH] Fix various bugs. --- README.md | 8 ++++++++ configuration.nix | 7 +++---- install.sh | 15 ++++++--------- 3 files changed, 17 insertions(+), 13 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..18e3715 --- /dev/null +++ b/README.md @@ -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 \ No newline at end of file diff --git a/configuration.nix b/configuration.nix index bb74dbb..ed46a5d 100644 --- a/configuration.nix +++ b/configuration.nix @@ -40,10 +40,9 @@ services.displayManager.sddm.enable = true; services.desktopManager.plasma6.enable = true; - environment.plasma6.excludePackages = with pkgs.kdePackages; [ - plasma-browser-integration - konsole - ]; + #environment.plasma6.excludePackages = with pkgs.kdePackages; [ + + #]; diff --git a/install.sh b/install.sh index 5fecdf2..0307ffb 100644 --- a/install.sh +++ b/install.sh @@ -34,19 +34,16 @@ IFS=$'\n' declare -a dsks=( $(lsblk -d | tail -n+2 | awk '{print $1" "$4}') ) # Select value on array. -select dev in "${dsks[@]}" -do - -break +select dev in "${dsks[@]}"; do + break done echo # Separate values by spaces. IFS=' ' -# Create new variable of selection. -array=("${dev}") -dev="${array[0]}" +# Cut size from variable +dev=${dev%% *} clear @@ -107,7 +104,7 @@ echo # Creating system partition. echo "Creating system partition." -sudo parted "/dev/${dev}" -- mkpart 512MB 100% +sudo parted "/dev/${dev}" -- mkpart root 512MB 100% echo # Print partitions. @@ -177,7 +174,7 @@ echo # Copy existing config sudo nixos-generate-config --root /mnt 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 sudo sed -i "s/username/${user}/g" /mnt/etc/nixos/configuration.nix