1
Fork 0
Modular NixOS configuration.
Find a file
caem b5d3970e71
nvim: Switch to clangd and use libcxx to support c++23 headers
For some fucking unknown reason the clang-tools package doesn't build
with libcxx by default and thus doesn't have the print header from C++23
which I need. I also don't know if they're fucking using the gcc13 c++
stdlib because the gcc14 one FUCKING HAS THE HEADER. I lost hours of
life which I am never going to get back to this fucking bullshit.
2024-12-10 14:39:49 +01:00
assets Add the x220 host 2024-10-30 15:32:07 +01:00
dotfiles nvim: Switch to clangd and use libcxx to support c++23 headers 2024-12-10 14:39:49 +01:00
home Add the x220 host 2024-10-30 15:32:07 +01:00
hosts x220: Enable bluetooth support 2024-12-08 11:47:38 +01:00
lib Simplify mkHosts 2024-07-25 21:32:55 +02:00
modules nvim: Switch to clangd and use libcxx to support c++23 headers 2024-12-10 14:39:49 +01:00
.gitattributes kde: Add sddm background and persist more stuff 2024-08-28 22:41:29 +02:00
.gitignore Add support for distrobox 2024-07-31 16:39:15 +02:00
flake.lock Remove NUR as it is no longer needed 2024-12-08 11:49:25 +01:00
flake.nix Remove NUR as it is no longer needed 2024-12-08 11:49:25 +01:00
README.md Fix readme mistake 2024-08-28 23:11:54 +02:00

nixos-system-config

My modular NixOS configuration.

About

This is the NixOS configuration that I daily drive on my system. Feel free to use, modify and share this configuration to your heart's content, no attribution required.

Screenshots

KDE Plasma Hyprland
plasma screenshot hyprland screenshot

Layout

├── assets                                  ; Binary assets tracked in git
│   ├── screenshot.png
│   └── wallpaper.jpg
├── dotfiles                                ; Distro agnostic dotfiles
│   └── ...                                 ; Stores configurations that do not depend on Nix
├── flake.lock
├── flake.nix                               ; Entry point
├── home                                    ; home-manager configuration
│   ├── default.nix                         ; User and home-manager options
│   ├── packages                            ; Per-package home-manager configuration
│   │   └── ...
│   └── persist.nix                         ; Home opt-in state directories and files
├── hosts                                   ; Host configurations
│   └── workstation
│       ├── default.nix                     ; Host configuration.nix equivalent
│       ├── hardware-configuration.nix      ; Host hardware specific configuration
│       └── persist.nix                     ; System wide opt-in state directories and files
├── lib                                     ; Custom helper functions
│   ├── default.nix
│   └── ...
├── modules                                 ; System modules and sets of packages
│   ├── desktop
│   │   ├── apps
│   │   │   └── ...
│   │   └── environments
│   │       └── ...
│   └── system
│       └── ...
├── README.md
└── secrets                                 ; Location of secrets not tracked in the git tree
    └── pass

Installing

This configuration uses impermanence with btrfs snapshots so you'll have to partition your system in a certain way.

First you'll need this partition layout, assuming you're installing on nvme0n1.

DEVICE              FILESYSTEM      PURPOSE
/dev/nvme0n1
├─/dev/nvme0n1p1    vfat            EFI partition
└─/dev/nvme0n1p2    btrfs           Partition to house all the subvolumes

Inside of the btrfs root volume we're going to need 2 subvolumes.

SUBVOLUME           MOUNT           PURPOSE
root                /               Impermanent data
nix                 /nix            Permanent data

You'll also need to create a read-only snapshot of the root subvolume and call it root-blank.

After you've mounted all the subvolumes and EFI partition (/boot) in /mnt clone this repository in to /mnt/nix/config. Adjust all the block ids of the partitions in hardware-configuration.nix and create a hashed password using mkpasswd and store it in the secrets directory as pass.

Finally, in the config directory run nixos-install --flake '.#', reboot and you're done.

Updating

This configuration sets up nh for a prettier and more convenient way of keeping the system up to date. To update you can simply run:

nix flake update /nix/config
nh os switch