Compare commits

..

14 Commits

Author SHA1 Message Date
pure_sagacity 524cd2dfd1 goals. 2026-07-07 01:21:07 -05:00
pure_sagacity 9a77104d2c update + comments 2026-07-07 01:14:38 -05:00
pure_sagacity 43a1af6a17 made podman the default oci runtime
removed the bootloader from the core table in markdown
2026-07-07 00:06:56 -05:00
pure_sagacity 0b4d797202 added hostname configuration 2026-07-06 13:12:39 -05:00
pure_sagacity a0b0f7701a i forgot to remove the bootloader options in the configuration 2026-07-06 12:35:34 -05:00
pure_sagacity 232f8ca5f8 removed the grub/systemd choice. fuck freedom 2026-07-06 12:19:06 -05:00
pure_sagacity 01198893ff just testing this, maybe this'll work? 2026-07-06 00:17:39 -05:00
pure_sagacity 1ca40aee8d added the hardware-configuration file 2026-07-06 00:15:40 -05:00
pure_sagacity 3a17b271f7 debugging...
apperently I only needed to change like 5 lines?? I locked the hell in
2026-07-06 00:09:24 -05:00
pure_sagacity 0ee2bdb3f8 created a disks folder that contains all disko formats
added the default normal layout
2026-07-06 00:01:49 -05:00
pure_sagacity fcd15bb854 configuration has been created (its so damn short too!!)
cheatsheet, kinda broken, kinda outdated
2026-07-05 23:59:01 -05:00
pure_sagacity 4e925f8a89 holy shit im stupid, a lot of changes.
also added the configuration bc idk how to add only certain files but
whatever
2026-07-05 23:43:35 -05:00
pure_sagacity 4f9269315b moved config files from home/river/* to home/* 2026-07-05 23:31:58 -05:00
pure_sagacity 3c5133f721 bootloader choice 2026-07-05 23:27:25 -05:00
156 changed files with 408 additions and 77 deletions
+217
View File
@@ -0,0 +1,217 @@
Youll also need to import the modules in your host config (they arent wired in `flake.nix` yet), e.g.:
```nix
imports = [
./hardware-configuration.nix
../../modules/core
../../modules/networking
../../modules/virtualization
];
```
---
## `homelab.core`
Base system setup: kernel, bootloader, primary user, SSH, unfree packages.
| Option | Type | Default | Notes |
| --------------------- | ------------------------------------------------ | ---------------- | -------------------------------------------------------------------- |
| `kernel` | `"stable"` \| `"lts"` \| `"latest"` | `"lts"` | Maps to `linuxPackages`, `linuxPackages_lts`, `linuxPackages_latest` |
| |
| `user.name` | string | `"river"` | |
| `user.fullName` | string | `"Maaz Khokhar"` | |
| `user.shell` | string (typed as list in options — likely a bug) | `"fish"` | Used as `programs.${shell}.enable` |
| `allowUnfree` | bool | `true` | |
| `ssh.permitRootLogin` | bool | `false` | |
**Minimal core block:**
```nix
homelab.core = {
kernel = "lts";
# user / allowUnfree / ssh all have sensible defaults
};
```
**What you actually need to set:** bootloader details for your hardware (`grub.device` or `systemd.enable`). Everything else can stay default.
---
## `homelab.networking`
Split into `core` (always active when module is imported), `wireguard`, and `tailscale`.
### Top-level
| Option | Type | Default |
| ------ | ------ | --------- | --------------------------------- |
| `user` | string | `"river"` | Used by Tailscale as `--operator` |
### `homelab.networking.core` (always on)
| Option | Type | Default |
| -------------------- | ---------------------------------- | --------------------------------------- |
| `firewall.allowPing` | bool | `true` |
| `firewall.ports.tcp` | list of ints | `[ 22 80 ]` |
| `firewall.ports.udp` | list of ints | `[ 53 ]` |
| `extraHosts` | list of `{ ip_address, hostname }` | `[]` |
| `nameservers` | list of strings | `["192.168.1.193" "1.1.1.1" "1.0.0.1"]` |
**Required only when you add `extraHosts` entries:** `ip_address` and `hostname` (no defaults on those sub-options).
**Minimal core block:**
```nix
homelab.networking = {
core = {
nameservers = [ "1.1.1.1" "1.0.0.1" ];
# firewall defaults are usually fine
};
};
```
### `homelab.networking.wireguard` (optional)
| Option | Type | Default |
| ------------ | ---------------------------- | --------------------------------------------- |
| `enable` | bool | `false` |
| `interfaces` | attrset of interface configs | _(no default — use `{}` or omit if disabled)_ |
**Per interface** (`interfaces.<name>`):
| Option | Required? | Default |
| ---------------- | -------------------------------- | ------- |
| `enable` | no | `false` |
| `address` | no | `[]` |
| `privateKeyFile` | **yes** (when interface enabled) | — |
| `peers` | no | `[]` |
**Per peer:**
| Option | Required? | Default |
| --------------------- | --------- | ------- |
| `publicKey` | **yes** | — |
| `allowedIPs` | no | `[]` |
| `endpoint` | no | `""` |
| `persistentKeepalive` | no | `null` |
**Example when enabled:**
```nix
homelab.networking.wireguard = {
enable = true;
interfaces.wg0 = {
enable = true;
address = [ "10.0.0.2/24" ];
privateKeyFile = "/path/to/private.key";
peers = [{
publicKey = "...";
allowedIPs = [ "0.0.0.0/0" ];
endpoint = "vpn.example.com:51820";
}];
};
};
```
**Note:** `wireguard.nix` exists but is **not** imported in `modules/networking/default.nix` — only `core` and `tailscale` are. Youd need to add `./wireguard.nix` to that imports list for WireGuard to work.
### `homelab.networking.tailscale` (optional)
| Option | Type | Default |
| -------- | ---- | ------- |
| `enable` | bool | `false` |
**Minimal:**
```nix
homelab.networking.tailscale.enable = true;
# uses homelab.networking.user (default "river") as operator
```
---
## `homelab.virtualization`
Split into `podman` and `qemu`.
### Top-level
| Option | Type | Default |
| ------ | ------ | --------- | ----------------------------------------- |
| `user` | string | `"river"` | Added to `libvirtd`/`kvm`/`podman` groups |
### `homelab.virtualization.podman`
| Option | Type | Default |
| ----------------- | ---- | ------- | ----------------------------------------------------- |
| `enable` | bool | `false` |
| `packages.enable` | bool | `false` | Installs `podman`, `podman-compose`, `podman-desktop` |
**Minimal:**
```nix
homelab.virtualization.podman = {
enable = true;
packages.enable = true; # optional
};
```
### `homelab.virtualization.qemu`
| Option | Type | Default |
| --------------------- | --------------- | --------------------------- | ----------------------------------------------------------------------------------------------- |
| `enable` | bool | `false` |
| `containers.enable` | bool | `false` | _(defined in options but not wired in `qemu.nix` — containers are always enabled when qemu is)_ |
| `spiceUSBRedirection` | bool | `false` |
| `virtManager` | bool | `false` |
| `bootModules` | list of strings | `[ "kvm-intel" "kvm-amd" ]` |
**Minimal:**
```nix
homelab.virtualization.qemu = {
enable = true;
virtManager = true; # optional GUI
};
```
When `qemu.enable = true`, the module sets up `libvirtd`, adds your user to `libvirtd`/`kvm`, and loads KVM modules.
---
## Full skeleton for `hosts/test/configuration.nix`
```nix
{ config, lib, pkgs, ... }:
{
imports = [
./hardware-configuration.nix
../../modules/core
../../modules/networking
../../modules/virtualization
];
homelab.core = {
kernel = "lts";
bootloader = {
type = "systemd";
systemd.enable = true;
};
};
homelab.networking = {
core.nameservers = [ "1.1.1.1" "1.0.0.1" ];
tailscale.enable = true;
};
homelab.virtualization = {
podman.enable = true;
qemu = {
enable = true;
virtManager = true;
};
};
}
```
+35
View File
@@ -0,0 +1,35 @@
{ disk, ... }:
{
disko.devices = {
disk = {
${disk} = {
device = "/dev/disk/by-id/${disk}";
type = "disk";
content = {
type = "gpt";
partitions = {
ESP = {
type = "EF00";
size = "2G";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
}
Generated
+8 -9
View File
@@ -27,11 +27,11 @@
]
},
"locked": {
"lastModified": 1782358560,
"narHash": "sha256-vCcLh9pw3XO/+Lxk8r6xv6QnoCrTfGqiACcI7O637Wg=",
"lastModified": 1783388784,
"narHash": "sha256-w+YU5vatysjLZIg1wOKSzo/RL9Z66eBQuIjVnBM/1Zg=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "3a70e333f2950c302e875c44cfcfaff3f80f36bc",
"rev": "63d02d1c19f1c2b47a5bc7e55c620b6af7b218a6",
"type": "github"
},
"original": {
@@ -42,12 +42,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1781577229,
"narHash": "sha256-lrp67w8AulE9Ks53n27I45ADSzbOCn4H+CNW1Ck8B+8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "567a49d1913ce81ac6e9582e3553dd90a955875f",
"type": "github"
"lastModified": 1783224372,
"narHash": "sha256-FGQ8TfSm9WviNE/fQAWsKs+y4GkX8fU4EScewpw54Y8=",
"rev": "d407951447dcd00442e97087bf374aad70c04cea",
"type": "tarball",
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1027867.d407951447dc/nixexprs.tar.xz"
},
"original": {
"id": "nixpkgs",
+22 -19
View File
@@ -23,27 +23,30 @@
system = "x86_64-linux";
in
{
# nixosConfigurations.pc = nixpkgs.lib.nixosSystem {
# inherit system;
# specialArgs = { inherit inputs; };
# modules = [
# ./hosts/pc/configuration.nix
# home-manager.nixosModules.default
nixosConfigurations.test = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs;
disk = "nvme-SAMSUNG_MZVLB256HBHQ-000H1_S4GNNX2RC66163";
};
modules = [
./hosts/test/configuration.nix
home-manager.nixosModules.default
# {
# home-manager = {
# useGlobalPkgs = true;
# useUserPackages = true;
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
# backupFileExtension = "backup";
backupFileExtension = "backup";
# users = {
# river = import ./home/river;
# aariz = import ./home/aariz;
# };
# };
# }
# ];
# };
users.river = import ./home;
};
}
inputs.disko.nixosModules.disko
./disks/normal.nix
];
};
};
}

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 116 KiB

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Some files were not shown because too many files have changed in this diff Show More