33 Commits

Author SHA1 Message Date
50b2aaae60 Merge pull request 'refactor(readme): separate installation doc from main readme' (#18) from feature/documentation into main
Reviewed-on: #18
2026-02-08 10:17:27 +00:00
920b128ed7 refactor(readme): separate installation doc from main readme 2026-02-08 11:16:13 +01:00
978bd0e12b Merge pull request 'feature(update): update flake' (#17) from feature/update into main
Reviewed-on: #17
2026-02-08 10:01:27 +00:00
2ab6ccb7a0 feature(update): update flake 2026-02-08 11:00:01 +01:00
b8e7708b59 Merge pull request 'feature/update_flake' (#16) from feature/update_flake into main
Reviewed-on: #16
2026-02-01 12:13:28 +00:00
0783fc03b3 feature(flake): update flake file and update all packages 2026-02-01 13:11:28 +01:00
f9327d9e14 feature(networking): add update-resolved for vpn 2026-02-01 13:11:27 +01:00
e84c99e6b2 Merge pull request 'feature(networking): add update-resolved for vpn' (#15) from feature/add_update_resolved into main
Reviewed-on: #15
2026-02-01 11:59:10 +00:00
efec8e6def feature(networking): add update-resolved for vpn 2026-02-01 12:44:53 +01:00
a23e167014 feature(flake): update flake file and update all packages 2026-01-31 17:21:43 +01:00
7f078d2452 Merge pull request 'feature(ghostty): add home-manager module for ghostty' (#14) from feature/add_ghostty_hm into main
Reviewed-on: #14
2026-01-27 12:47:02 +00:00
53bf108799 feature(ghostty): add home-manager module for ghostty 2026-01-27 13:34:47 +01:00
853cfba840 Merge pull request 'feature(fonts): add fonts user module and add 0xProto font' (#13) from feature/add_fonts into main
Reviewed-on: #13
2026-01-26 10:45:11 +00:00
e0626a3644 fix(fonts): fix typo 2026-01-26 11:34:57 +01:00
b7ee91cf1a fix(fonts): add fonts to user 2026-01-26 11:33:50 +01:00
4f7ea84a8b feature(fonts): add fonts user module and add 0xProto font 2026-01-26 11:25:45 +01:00
a8468bf13f Merge pull request 'feature(ssl/tls): add my homelab pki root ca to the trust store' (#12) from feature/add_homelab_ca into main
Reviewed-on: #12
2026-01-23 19:20:42 +00:00
35319f58de feature(ssl/tls): add my homelab pki root ca to the trust store 2026-01-23 20:20:12 +01:00
4b6bdf0c86 Merge pull request 'chore(flake): update flake lock to the latest version' (#11) from feature/update_flake into main
Reviewed-on: #11
2026-01-23 18:37:39 +00:00
427b5315b7 chore(flake): update flake lock to the latest version 2026-01-23 19:36:34 +01:00
cfa9aa2e14 Merge pull request 'feature(vpn): enable tailscaled on the system at startup' (#10) from feature/tailscale into main
Reviewed-on: #10
2026-01-16 19:25:43 +00:00
98617c4099 feature(vpn): enable tailscaled on the system at startup 2026-01-16 20:22:48 +01:00
61cebd469b Merge pull request 'chore(flake): update flake lock to the latest commits' (#9) from feature/update_flake into main
Reviewed-on: #9
2026-01-15 20:45:49 +00:00
86729827e8 chore(flake): update flake lock to the latest commits 2026-01-15 21:30:55 +01:00
60bf6173c7 Merge pull request 'feature/fix_boot_errors' (#8) from feature/fix_boot_errors into main
Reviewed-on: #8
2026-01-10 22:51:49 +00:00
90df3e5ed9 feature(bootloader): add terminus-font to the bootloader dependencies 2026-01-10 23:51:29 +01:00
22df1df1d7 feature(terminal-font): add terminus terminal font for eye candy 2026-01-10 23:47:01 +01:00
f5d629d5f5 chore(bootloader): lets just not look at those acpi errors during boot 2026-01-10 23:46:12 +01:00
9885867cc2 Merge pull request 'feature(fwupd): install and enable fwupd for firmware upgrades' (#7) from feature/firmwareupdates into main
Reviewed-on: #7
2026-01-09 20:14:11 +00:00
2cb495848f feature(fwupd): install and enable fwupd for firmware upgrades 2026-01-09 21:12:55 +01:00
7e84ba21dc Merge pull request 'chore(update): upgrade flake' (#6) from feature/nix_upgrade into main
Reviewed-on: #6
2026-01-09 06:47:44 +00:00
54dc51eec4 chore(update): upgrade flake 2026-01-09 07:44:13 +01:00
3c3dd262ae Merge pull request 'feature(steam): add proton-ge compatibility layer to steam' (#5) from feature/proton-ge into main
Reviewed-on: #5
2026-01-04 12:04:53 +00:00
13 changed files with 226 additions and 142 deletions

125
INSTALLATION.md Normal file
View File

@@ -0,0 +1,125 @@
# basic system installation
- The installations presented in this repository are always luks encrypted
- For simplicity I'm using device labels rather than uuids
1. the partitioning layout should look somewhat like this after the installation
```bash
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
nvme0n1 259:0 0 476.9G 0 disk
├─nvme0n1p1 259:1 0 2G 0 part /boot
└─nvme0n1p2 259:2 0 474.9G 0 part
└─cryptroot 254:0 0 474.9G 0 crypt
├─lvmroot-swap 254:1 0 20G 0 lvm [SWAP]
├─lvmroot-home 254:2 0 250G 0 lvm /home
└─lvmroot-root 254:3 0 204.9G 0 lvm /nix/store
```
2. prepare the installation
```bash
# format the boot partition
mkfs.fat -F 32 /dev/sda1 -n "nixboot"
# create an encrypted partition
cryptsetup luksFormat -y --label="nixcrypt" /dev/sda2
# open the encrypted partition and map it to /dev/mapper/cryptroot
cryptsetup luksOpen /dev/sda2 cryptroot
# create the physical volume
pvcreate /dev/mapper/cryptroot
# create a volume group inside
vgcreate lvmroot /dev/mapper/cryptroot
# create the swap volume
lvcreate --size 8G lvmroot --name nwap
# if you desire, create a home volume
lvcreate --size 150G lvmroot --name home
# create the root volume
lvcreate -l 100%FREE lvmroot --name root
# format as usual for root partition
mkfs.ext4 -L "nixroot" /dev/mapper/lvmroot-root
# if you previously made the home partition, do it too
mkfs.ext4 -L "nixhome" /dev/mapper/lvmroot-home
# format the swap partition
mkswap -L "nixswap" /dev/mapper/lvmroot-swap
# mount root
mount /dev/disk/by-label/nixroot /mnt
# mount boot
mount --mkdir /dev/sda1 /mnt/boot
# again, if you did the home volume
mount --mkdir /dev/disk/by-label/nixhome /mnt/home
# turn on swap
swapon /dev/disk/by-label/nixswap
```
3. prepare nixos
```bash
# generate templates and update the hardware-configuration.nix
sudo nixos-generate-config --root /mnt
# add cryptd to the kernelModules
boot.initrd.kernelModules = [ "dm-snapshot" "cryptd" ];
# add file systems using labels
fileSystems."/" =
{ device = "/dev/disk/by-label/nixroot";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-label/nixboot";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/home" =
{ device = "/dev/disk/by-label/nixhome";
fsType = "ext4";
};
swapDevices =
[ { device = "/dev/disk/by-label/nixswap"; }
];
# point the bootloader to the luks device
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-label/nixcrypt";
```
4. install nixos
```bash
cd /mnt
sudo nixos-install
```
## how to deploy the inital config
- Don't forget to install the bootloader, if you changed it since `nixos-install`
```bash
$ sudo nixos-rebuild --install-bootloader switch --flake .#host_name
```
## how to upgrade the system
```bash
$ cd /path/to/repo
$ sudo nix flake update
$ sudo nixos-rebuild switch --flake .#host_name
$ sudo nix-collect-garbage
```
## how to use nix-helper
The tool nix-helper is installed by this configuration. It simplifies administrating nixos and adds more output to the rebuild command. It also features a diff after a successful build. The command uses the `NH_FLAKE` environment variable to be able to run from whatever directory.
Basic commands with a set `NH_FLAKE` variable are:
```bash
$ nh os switch
$ nh os build
$ nh os test
$ nh clean all --keep 5
```
There is also the option to interface with home-manager by using `nh home switch` but this isn't necessary since home-manager is imported as a module in this config.

143
README.md
View File

@@ -1,133 +1,30 @@
# 0x29a nixos config # NixOS config
My personal nixos configuration files for different environments. My personal NixOS configurations.
## basic system installation ## config structure
- The installations presented in this repository are always luks encrypted
- For simplicity I'm using device labels rather than uuids
1. the partitioning layout should look somewhat like this after the installation
```bash ```bash
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS .
nvme0n1 259:0 0 476.9G 0 disk ├── flake.lock
├─nvme0n1p1 259:1 0 2G 0 part /boot ├── flake.nix # flake definition
└─nvme0n1p2 259:2 0 474.9G 0 part ├── hosts
└─cryptroot 254:0 0 474.9G 0 crypt │   └── neon
├─lvmroot-swap 254:1 0 20G 0 lvm [SWAP] │   ├── configuration.nix # import nix-modules for specific host
├─lvmroot-home 254:2 0 250G 0 lvm /home │   └── hardware-configuration.nix # hardware configs for specific host
└─lvmroot-root 254:3 0 204.9G 0 lvm /nix/store ├── modules
``` │   ├── home-manager
│   │   ├── xyz_module.nix
2. prepare the installation │   └── nixos
│   └── xyz_module.nix
```bash └── users
# format the boot partition └── aaron
mkfs.fat -F 32 /dev/sda1 -n "nixboot" └── home.nix # import home-manager modules for specific user
# create an encrypted partition
cryptsetup luksFormat -y --label="nixcrypt" /dev/sda2
# open the encrypted partition and map it to /dev/mapper/cryptroot
cryptsetup luksOpen /dev/sda2 cryptroot
# create the physical volume
pvcreate /dev/mapper/cryptroot
# create a volume group inside
vgcreate lvmroot /dev/mapper/cryptroot
# create the swap volume
lvcreate --size 8G lvmroot --name nwap
# if you desire, create a home volume
lvcreate --size 150G lvmroot --name home
# create the root volume
lvcreate -l 100%FREE lvmroot --name root
# format as usual for root partition
mkfs.ext4 -L "nixroot" /dev/mapper/lvmroot-root
# if you previously made the home partition, do it too
mkfs.ext4 -L "nixhome" /dev/mapper/lvmroot-home
# format the swap partition
mkswap -L "nixswap" /dev/mapper/lvmroot-swap
# mount root
mount /dev/disk/by-label/nixroot /mnt
# mount boot
mount --mkdir /dev/sda1 /mnt/boot
# again, if you did the home volume
mount --mkdir /dev/disk/by-label/nixhome /mnt/home
# turn on swap
swapon /dev/disk/by-label/nixswap
``` ```
3. prepare nixos ## installation
For more details about the installation procedure see: [INSTALLATION.md](INSTALLATION.md)
```bash
# generate templates and update the hardware-configuration.nix
sudo nixos-generate-config --root /mnt
# add cryptd to the kernelModules
boot.initrd.kernelModules = [ "dm-snapshot" "cryptd" ];
# add file systems using labels
fileSystems."/" =
{ device = "/dev/disk/by-label/nixroot";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-label/nixboot";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/home" =
{ device = "/dev/disk/by-label/nixhome";
fsType = "ext4";
};
swapDevices =
[ { device = "/dev/disk/by-label/nixswap"; }
];
# point the bootloader to the luks device
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-label/nixcrypt";
```
4. install nixos
```bash
cd /mnt
sudo nixos-install
```
## how to deploy the inital config
- Don't forget to install the bootloader, if you changed it since `nixos-install`
```bash
$ sudo nixos-rebuild --install-bootloader switch --flake .#host_name
```
## how to upgrade the system
```bash
$ cd /path/to/repo
$ sudo nix flake update
$ sudo nixos-rebuild switch --flake .#host_name
$ sudo nix-collect-garbage
```
## how to use nix-helper
The tool nix-helper is installed by this configuration. It simplifies administrating nixos and adds more output to the rebuild command. It also features a diff after a successful build. The command uses the `NH_FLAKE` environment variable to be able to run from whatever directory.
Basic commands with a set `NH_FLAKE` variable are:
```bash
$ nh os switch
$ nh os build
$ nh os test
$ nh clean all --keep 5
```
There is also the option to interface with home-manager by using `nh home switch`but this isn't necessary since home-manager is imported as a module in this config.
## author ## author

30
flake.lock generated
View File

@@ -8,11 +8,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1765835352, "lastModified": 1769996383,
"narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=", "narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "a34fae9c08a15ad73f295041fec82323541400a9", "rev": "57928607ea566b5db3ad13af0e57e921e6b12381",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -28,11 +28,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1767048910, "lastModified": 1770491427,
"narHash": "sha256-KLFTeA/xquN+F3XHLAXcserk0L0nijbhzuldxNDF1eE=", "narHash": "sha256-8b+0vixdqGnIIcgsPhjdX7EGPdzcVQqYxF+ujjex654=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "d99b4ca5debaa082c7d76015aa2b7f3fc7e8b5f7", "rev": "cbd8a72e5fe6af19d40e2741dc440d9227836860",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -43,11 +43,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1766902085, "lastModified": 1770197578,
"narHash": "sha256-coBu0ONtFzlwwVBzmjacUQwj3G+lybcZ1oeNSQkgC0M=", "narHash": "sha256-AYqlWrX09+HvGs8zM6ebZ1pwUqjkfpnv8mewYwAo+iM=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c0b0e0fddf73fd517c3471e546c0df87a42d53f4", "rev": "00c21e4c93d963c50d4c0c89bfa84ed6e0694df2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -66,11 +66,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1767002962, "lastModified": 1770388595,
"narHash": "sha256-HGFRwMRUwt56E+SiVX9YQOzpOwHy0/rtEqMoEbkF8Yg=", "narHash": "sha256-0NvpmDqFcJAtRFJE3RDZWnN7PDJBZutoDtN+Cl8a3DY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "63c957603751f0a107c4d9c2cbaff1c8749fc9f1", "rev": "51abc532525e486176f9a7b24b17908c60017b54",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -86,11 +86,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1767099893, "lastModified": 1770543184,
"narHash": "sha256-Z39jG7z4XD+H2KPSgWR0rQS3di1mTblRI5kyqcL3g7w=", "narHash": "sha256-2FFYjurrYjCAT6bpN2Fv63G6vDuWybB91uvqBjJfcWE=",
"owner": "noctalia-dev", "owner": "noctalia-dev",
"repo": "noctalia-shell", "repo": "noctalia-shell",
"rev": "015ff66fbd85abda4573d864466ecf9fc64f233b", "rev": "bf1a0f76bb5ca48991d51130022af6bead64d153",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -4,6 +4,7 @@
imports = [ imports = [
../../modules/nixos/audio.nix ../../modules/nixos/audio.nix
../../modules/nixos/bootloader.nix ../../modules/nixos/bootloader.nix
../../modules/nixos/certificates.nix
../../modules/nixos/gnupg.nix ../../modules/nixos/gnupg.nix
../../modules/nixos/locales.nix ../../modules/nixos/locales.nix
../../modules/nixos/networking.nix ../../modules/nixos/networking.nix

View File

@@ -0,0 +1,11 @@
{ config, pkgs, inputs, ... }:
{
# user fonts
home.packages = with pkgs; [
nerd-fonts._0xproto
nerd-fonts.sauce-code-pro
powerline-fonts
powerline-symbols
];
}

View File

@@ -0,0 +1,20 @@
{ config, pkgs, inputs, ... }:
{
programs.ghostty = {
enable = true;
settings = {
clipboard-paste-protection = false;
clipboard-read = "allow";
font-family = "0xProto Nerd Font Mono";
font-size = 9;
gtk-titlebar = false;
scrollback-limit = 10000;
shell-integration = "zsh";
theme = "noctalia"; # generated by noctalia-shell
window-decoration = "auto";
window-padding-x = 10;
window-padding-y = 10;
};
};
}

View File

@@ -6,9 +6,6 @@
discord discord
fastfetch fastfetch
keepassxc keepassxc
nerd-fonts.sauce-code-pro
powerline-fonts
powerline-symbols
screenfetch screenfetch
]; ];

View File

@@ -17,11 +17,13 @@
}; };
# kernel options # kernel options
boot.kernelParams = [ "quiet" "loglevel=2" ]; boot.kernelParams = [ "quiet" "acpi.debug_level=0"];
boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = pkgs.linuxPackages_latest;
boot.consoleLogLevel = 2;
# Add boot-related packages # Add boot-related packages
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
efibootmgr efibootmgr
terminus_font
]; ];
} }

View File

@@ -0,0 +1,22 @@
{ config, lib, pkgs, ... }:
let
caddyRootCA = ''
-----BEGIN CERTIFICATE-----
MIIBozCCAUmgAwIBAgIQf2N1DGp2HVOoPaGuGDEnwjAKBggqhkjOPQQDAjAwMS4w
LAYDVQQDEyVDYWRkeSBMb2NhbCBBdXRob3JpdHkgLSAyMDI1IEVDQyBSb290MB4X
DTI1MTEwNjE5NDA1OFoXDTM1MDkxNTE5NDA1OFowMDEuMCwGA1UEAxMlQ2FkZHkg
TG9jYWwgQXV0aG9yaXR5IC0gMjAyNSBFQ0MgUm9vdDBZMBMGByqGSM49AgEGCCqG
SM49AwEHA0IABGR9mSgKCSjvcv7LvvIcO84Wpf/KtC/aexT5shSKXd1R97kIyMI5
SUYz0MzbRZHJ4QMpIeALirOK9Eoy2zht0dKjRTBDMA4GA1UdDwEB/wQEAwIBBjAS
BgNVHRMBAf8ECDAGAQH/AgEBMB0GA1UdDgQWBBRHKfIfJrrA2DACFrunVSmdnJHO
1zAKBggqhkjOPQQDAgNIADBFAiAoqc0+cHeq/8SQN16CKjVvXpZuMkg7NLDoWYMw
KgmzowIhAJlkxzBdVngwnJu8uPrVizTGF6XtmUHdJ0NDeccEqUCr
-----END CERTIFICATE-----
'';
in
{
security.pki.certificates = [
caddyRootCA # self-signed pki ca for my home-lab
];
}

View File

@@ -17,5 +17,6 @@
# Add network-related packages # Add network-related packages
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
wireguard-tools wireguard-tools
update-systemd-resolved
]; ];
} }

View File

@@ -9,6 +9,8 @@
dnsutils dnsutils
ethtool ethtool
file file
fwupd
fwupd-efi
ghostty ghostty
git git
imagemagick imagemagick
@@ -31,8 +33,10 @@
pciutils pciutils
sddm-astronaut sddm-astronaut
socat socat
sof-firmware
strace strace
sysstat sysstat
terminus_font
tree tree
unzip unzip
usbutils usbutils

View File

@@ -5,5 +5,7 @@
services = { services = {
tuned.enable = true; tuned.enable = true;
upower.enable = true; upower.enable = true;
fwupd.enable = true;
tailscale.enable = true;
}; };
} }

View File

@@ -2,7 +2,9 @@
{ {
imports = [ imports = [
../../modules/home-manager/fonts.nix
../../modules/home-manager/git.nix ../../modules/home-manager/git.nix
../../modules/home-manager/ghostty.nix
../../modules/home-manager/nixvim.nix ../../modules/home-manager/nixvim.nix
../../modules/home-manager/programs.nix ../../modules/home-manager/programs.nix
../../modules/home-manager/shell.nix ../../modules/home-manager/shell.nix