aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nixos/os-installation.sh48
1 files changed, 21 insertions, 27 deletions
diff --git a/nixos/os-installation.sh b/nixos/os-installation.sh
index 36342cb..519ee5a 100644
--- a/nixos/os-installation.sh
+++ b/nixos/os-installation.sh
@@ -10,11 +10,16 @@ sudo umount /dev/sdc1
sudo dd if=nixos.iso of=/dev/sdc #
-# Derived from https://www.maketecheasier.com/nixos-review/
-
-# First, get an internet connection, either by using an ethernet cable or using =wpa_supplicant=:
+# Derived from:
+# https://www.maketecheasier.com/nixos-review/
+# https://chris-martin.org/2015/installing-nixos
+
+# First, get an internet connection.
+# The easiest way is to start the GUI and use the network manager applet:
+systemctl start display-manager
+# If the ISO doesn't contain GUI, try getting an internet connection either by using an ethernet cable or using =wpa_supplicant=:
# https://wiki.archlinux.org/index.php/WPA_supplicant
-wpa_supplicant -B -i wlp2s0 -c <(wpa_passphrase SSID PASSPHRASE)
+# wpa_supplicant -B -i wlp2s0 -c <(wpa_passphrase SSID PASSPHRASE)
# Change keyboard to pt_BR layout:
loadkeys br-abnt2
@@ -46,7 +51,6 @@ n # create new partition
3 # partition number
ENTER # use default first sector
ENTER # partition size is the remaining of the disk
-EF00 # set partition type to "EFI System"
8E00 # set partition type to "Linux LVM"
w
@@ -67,39 +71,29 @@ mkswap -L swap /dev/vg/swap
mount /dev/vg/root /mnt
mkdir /mnt/boot
mount /dev/nvme0n1p2 /mnt/boot
+swapon /dev/vg/swap
-
-mkswap -L swap /dev/sda1
-swapon /dev/sda1
-mkfs.ext4 -L nixos /dev/sda2
-mount /dev/disk/by-label/nixos /mnt
nixos-generate-config --root /mnt
# START Edit NixOS configuration file
vi /mnt/etc/nixos/configuration.nix
-# Uncomment:
-boot.loader.grub.device = “/dev/sda”
+# System configuration:
+boot.initrd.luks.devices = [
+ {
+ name = "root";
+ device = "/dev/sda3";
+ preLVM = true;
+ }
+];
+boot.loader.grub.device = "/dev/sda";
+
+# Initial package set:
enviroment.systemPackages = with pkgs; [
wget
vim
- firefox
- gitAndTools.gitFull
- gitAndTools.git-annex
- gitAndTools.gitRemoteGcrypt
- lsof
- gnupg
- gnupg1
]
-# Add:
-services = {
- xserver = {
- enable = true;
- desktopManager.gnome3.enable = true;
- displayManager.gdm.enable = true;
- };
-};
# END
nixos-install