No description
Find a file
2026-05-18 00:08:42 +09:30
configuration.nix initial 2026-05-12 05:09:44 +09:30
flake.lock initial 2026-05-12 05:09:44 +09:30
flake.nix moar 2026-05-12 05:33:53 +09:30
hardware-configuration.nix initial 2026-05-12 05:09:44 +09:30
home-manager.nix direnv n vlc 2026-05-18 00:08:42 +09:30
README.md moar 2026-05-12 05:33:53 +09:30

nix

NixOS configurations and other things.

Installing

A new system could be set up roughly like so:

cfdisk /dev/sdX # one ~5G part (type EFI), another using the rest

cryptsetup luksFormat /dev/sdX2 --label cryptroot
cryptsetup open /dev/sdX2 cryptroot

pvcreate /dev/mapper/cryptroot
vgcreate lvmroot /dev/mapper/cryptroot
lvcreate -l 100%FREE lvmroot -n root

mkfs.vfat /dev/sdX1
mkfs.ext4 /dev/mapper/lvmroot-root

mount /dev/mapper/lvmroot-root /mnt
mkdir -p /mnt/boot /etc/nixos
mount -o umask=0077 /dev/sdX1 /mnt/boot

git clone https://git.cateat.fish/me/nix /mnt/etc/nixos
# ensure hardware-configuration.nix (nixos-generate-config) is still accurate
nixos-install --root /mnt --flake /etc/nixos#hostname
nixos-enter --root /mnt -c 'passwd username'

umount -R /mnt
swapoff /dev/mapper/lvmroot-swap
vgchange -a n lvmroot
cryptsetup close /dev/mapper/cryptroot

reboot

Also make sure to generate or copy some SSH keys.