docs: xps setup

This commit is contained in:
mandlm 2024-01-11 17:08:22 +01:00
parent 22bb8c4e70
commit 6d6cbf767f
Signed by: mandlm
GPG Key ID: 4AA25D647AA54CC7

106
docs/xps-setup-log.md Normal file
View File

@ -0,0 +1,106 @@
## XPS 13 Plus 9320 setup log
### Windows
- create bootable usb stick from windows 11 pro iso
- download Intel Rapid Storage Technology driver from [Dell's driver page][irst] and extract it to the usb stick
- connect dock with power and lan
- boot from usb stick
- load additional driver in partitioning screen from extracted IRST's `production/windows10-x64/15063/Drivers/VMD` directory
- install using whole disk
### Nixos
- create bootable usb stick from installer iso
- connect dock with power and lan
- boot from usb stick
- set keyboard layout
- run gparted
- shrink windows data partition
- create 512 MB fat32 boot partition `/dev/nvme0n1p5` with an `esp` and `boot` flag
- create unformatted partition from rest `/dev/nvme0n1p6`
- encrypt and open unformatted partition:
```
cryptsetup -y -v luksFormat /dev/nvme0n1p6
cryptsetup -v luksOpen /dev/nvme0n1p6 nixos
```
- create lvm volumes:
```
pvcreate /dev/mapper/nixos
vgcreate nixos /dev/mapper/nixos
lvcreate -L 32G -n swap nixos
lvcreate -L 128 -n root nixos
lvcreate -L 128 -n docker nixos
lvcreate -l 100%FREE -n home nixos
```
- format partitions:
```
mkswap -L swap /dev/nixos/swap
mkfs.ext4 -L root /dev/nixos/root
mkfs.ext4 -L home /dev/nixos/home
mkfs.ext4 -L docker /dev/nixos/docker
```
- mount filesystems:
```
mount /dev/disk/by-label/root /mnt/
mkdir -p /mnt/home
mount /dev/disk/by-label/home /mnt/home
mkdir -p /mnt/var/lib/docker
mount /dev/disk/by-label/docker /mnt/var/lib/docker
mkdir -p /mnt/boot
mount /dev/disk/by-label/boot /mnt/boot/
swapon /dev/disk/by-label/swap
```
- generate nixos config:
`nixos-generate-config --root /mnt`
- change hostname:
`sed -i 's/# networking\.hostName.*/networking.hostName = "xps";/' /mnt/etc/nixos/configuration.nix`
- enable sshd with root login in `/mnt/etc/nixos/configuration.nix`:
```
services.openssh = {
enable = true;
settings.PermitRootLogin = "yes";
};
```
- configure luks initrd device:
```
boot.initrd.luks.devices = {
nixos = {
device = "/dev/disk/by-uuid/`blkid /dev/nvme0n1p6`";
preLVM = true;
};
};
```
- run install and reboot:
```
nixos-install
reboot
```
- from other nixos, copy config to xps:
`scp -r nixos-config root@xps:`
- ssh to xps:
`ssh root@xps`
- edit config:
- clone p330 machine config and edit:
- set hostname in `configuration.nix`
- delete `home-mandlm.nix`
- replace `hardware-configuration.nix` with `/etc/nixos/hardware-configuration.nix`
- in `flake.nix,` add new machine block
- rename `/etc/nixos` for backup
- move config to `/etc/nixos`
- rebuild with new config:
`nixos-rebuild switch`
[irst]: https://www.dell.com/support/home/de-de/product-support/product/xps-13-9320-laptop/drivers