No description
Find a file
2023-01-16 10:47:58 +01:00
defaults Remove obsolete packages 2023-01-16 10:47:58 +01:00
fcc-unlock@18db2b9659 Update to nixos 22.11 2022-12-08 15:44:32 +01:00
home/fhauser Remove obsolete packages 2023-01-16 10:47:58 +01:00
host Update to nixos 22.11 2022-12-08 15:44:32 +01:00
modules Use modules from qois-infrastructure 2022-04-10 17:21:49 +02:00
overlays Add hardware config and fix hummelberg build 2022-04-11 15:05:05 +02:00
qois-infrastructure@cbbee65983 Update inputs 2023-01-09 09:48:43 +01:00
.gitignore Migrate to flake 2022-04-10 16:15:44 +02:00
.gitlab-ci.yml Make nixfmt veery happy 🤗 2020-04-20 21:37:37 +00:00
.gitmodules Update inputs 2022-11-29 12:48:04 +01:00
flake.lock Update inputs 2023-01-12 14:59:33 +01:00
flake.nix Update inputs and switch to unstable temporarly 2023-01-07 01:02:49 +01:00
README.adoc Add rudimentary installation instructions 2022-03-31 17:11:04 +02:00
shell.nix Add develop shell 2022-04-11 15:05:27 +02:00
STATEFUL.adoc WIP: Add stateful docs 2022-04-17 10:20:09 +02:00

= fabian's nixconfig

This repository contains fabian's personal nixos configurations.

== Structure

`hardware`:: Hardware specific configuration files, e.g. for wireless
cards.
`host`:: Main nixos `configuration.nix` for every host. The
`configuration.nix` is symlinked to the specific host file.
`defaults`:: Configuration defaults
`modules` :: Custom modules

== Development

* The nix files shoud be formatted using nixfmt:
** `nixfmt -c $(git ls-files *.nix)`


== Setup

# Boot nixos live cd
# Connect network
# sudo passwd root
# From other machine: `ssh -A root@nixos`
# Partitioning:

   parted /dev/nvme0n1
     mklabel gpt
     unit mib

     # Create EFI Partition
     mkpart boot fat32 1 750
     set 1 esp on

     # Main Crypto LVM
     mkpart luks 1500 100%
     quit
# `partprobe`
# Make filesystems:
## `mkfs.fat -F 32 -n boot /dev/disk/by-partlabel/boot`
## `cryptsetup luksFormat --label luks /dev/disk/by-partlabel/luks && cryptsetup open /dev/disk/by-partlabel/luks lvm`
## `pvcreate /dev/mapper/lvm`
## `vgcreate lvmvg /dev/mapper/lvm`
## `lvcreate -L 10G lvmvg -n swap` && `mkswap -L /dev/mapper/lvmvg-swap` && `swapon /dev/mapper/lvmvg-swap`
## `lvcreate -L 800G lvmvg -n hv_ochsenchopf` && mkfs.btrfs -L hv_ochsenchopf /dev/mapper/lvmvg-hv_ochsenchopf
## `sync`
# Create btrfs subvolumes
## `mkdir /mnt/btrfs-root && mount /dev/mapper/lvmvg-hv_ochsenchopf /mnt/btrfs-root && pushd /mnt/btrfs-root`
## `btrfs subvolume create nixos`
## `btrfs subvolume create home`
## `popd && umount /mnt/btrfs-root && rmdir /mnt/btrfs-root`
# Mount Filesystems for installation
## `mount -o subvol=nixos /dev/mapper/lvmvg-hv_ochsenchopf /mnt`
## `mkdir /mnt/{etc,boot,home}`
## `mount -o subvol=home /dev/mapper/lvmvg-hv_ochsenchopf /mnt/home`
## `mount /dev/disk/by-label/boot /mnt/boot`
# Create system configuration
## `nixos-generate-config --root /mnt && mv /mnt/etc/{nixos,nixos_generated}`
## `nix-shell -p git`
## `git clone --recurse-submodules git@github.com:fabianhauser/nixconfig.git /mnt/etc/nixos`
# Adjust configuration manually (Symlink host config, customize partition/disk names etc.
## `rm -r /mnt/etc/nixos_generated`
## Update nixos channels (TODO: With flakes, this is not neccessary anymore)
## pushd /mnt/etc/nixos; ln -s host/ochsenchopf/default.nix configuration.nix; popd
# `nixos-install`
# `reboot`
# Whoop whoop