Compare commits
319 Commits
7ac4e74334
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
3d8fcf9be3
|
|||
|
02a8f00f13
|
|||
|
6ccb26547a
|
|||
|
c50e53a322
|
|||
| 503d57c95e | |||
| a9745bfa14 | |||
| efee0d3e1c | |||
| 3f5dd1a686 | |||
| 87a9d1f5ae | |||
| cade967fb0 | |||
| da0c4e9afe | |||
| dc756c70b2 | |||
| eea61457ad | |||
| 18554a5c5d | |||
| 1b5a94c86c | |||
| 4fb3ec33ea | |||
| 5b0949deed | |||
| 40634b0a40 | |||
| 80c10b6229 | |||
| b1d677ed78 | |||
| 3dd314b1ee | |||
| f08c8c99ad | |||
| 296c84e5eb | |||
| 3aa5216310 | |||
| 6894d6e6af | |||
| 29d1ddc672 | |||
| 0773fd4ffd | |||
| d1808b93af | |||
| 9f01c4ecf1 | |||
| 8e401947eb | |||
| de50a5975a | |||
| aefec1a3a1 | |||
| 2b04e3c253 | |||
| bf9d625581 | |||
| 98b9eb4340 | |||
| d63df5ae9d | |||
| cd0d2c6d0a | |||
| ffa7ccf9b3 | |||
| c88de7f26d | |||
| 0a295e56df | |||
| 8a2c7ed678 | |||
| dc91fd6428 | |||
| 1bbd9b6bbe | |||
| 4e1cf920ee | |||
| aaefea1987 | |||
| 1d29a86ddc | |||
| fb85102582 | |||
| c4259ab0f5 | |||
| 59d1f84c7a | |||
| 08b1c358e3 | |||
| 1899f6baa8 | |||
| a5778ea445 | |||
| 81457e71a3 | |||
| c5cafdb5fb | |||
| 5f6c023f44 | |||
| be261a4de5 | |||
| e6cfe48e5d | |||
| bbf4dd74d2 | |||
| fe70449e97 | |||
| 2d51aab59e | |||
| 82be0d8d39 | |||
| 6c28e38e0b | |||
| be1c65bc5d | |||
| 7c5d88f63a | |||
| 637281e1d0 | |||
| ce971bb732 | |||
| 1c149332d6 | |||
| c14a6c852c | |||
| 9eee68e2a5 | |||
| 1c62518304 | |||
| 06f6488224 | |||
| 77bcef2d50 | |||
| d2a5fc6794 | |||
| 2ded742916 | |||
| 304f4f0b41 | |||
| 5622ddbcfb | |||
| bfe57e7028 | |||
| 32c7c9fbe0 | |||
| cc5a687353 | |||
| 10ceedca05 | |||
| 92918c6e7c | |||
| 8488134867 | |||
| 26551d4465 | |||
| 4954e69353 | |||
| 73b84c49ae | |||
| 4b43067cf8 | |||
| dc53669636 | |||
| 8ca69b50e4 | |||
| 5473b47b7f | |||
| f9baae061a | |||
| aa42d0e283 | |||
| e88199483e | |||
| 790f14fedf | |||
| 52084d1ada | |||
| 4a7ee425b3 | |||
| fa1b204b38 | |||
| b72288a216 | |||
| 7856a08b9b | |||
| a935a63de0 | |||
| 69f4b791f4 | |||
| f59f8ca4ae | |||
| e132544548 | |||
| 502f1ffd82 | |||
| a1a0c23ecd | |||
| 6194629c81 | |||
| 6c608842c4 | |||
| 4c11df5817 | |||
| e00f5868b9 | |||
| 67e3ab081b | |||
| 6027779453 | |||
| a7140ce078 | |||
| 95f0ffa65c | |||
| f3e5daf08a | |||
| c43f8b136d | |||
| 57ee699302 | |||
| 7aa4dc4980 | |||
| 9a7a27c013 | |||
| daa9d28624 | |||
| c765e92f17 | |||
| ace7e30343 | |||
| 758b2ac5b5 | |||
| 90a1016523 | |||
| fff0781acb | |||
| 08fa1e47ab | |||
| 58e6e31e0f | |||
| 5b6d9ef004 | |||
| c55b6b7fa3 | |||
| 655cfbfc1e | |||
| 8e35d7ce1a | |||
| 74ab6d8785 | |||
| 102447bbd4 | |||
| d0f3211664 | |||
| d86c746644 | |||
| d5e8fd25d8 | |||
| 2400d2074e | |||
| f4fa9ecd06 | |||
| b04d6dd036 | |||
| 3e7c52e526 | |||
| c594bc5c10 | |||
| b8bebf1ff3 | |||
| 17247f0aaf | |||
| 333b1863ca | |||
| 53b8e1cf0e | |||
| 818f6b4059 | |||
| ab734d9e97 | |||
| a4ffea27b2 | |||
| 773ffe1c06 | |||
| 57e6c1528b | |||
| 5eb1aeace2 | |||
| c4e53d0a75 | |||
| bb5420b3b3 | |||
| 19fa6802e6 | |||
| 14a3037578 | |||
| f30a7ffb67 | |||
| 2c43950c77 | |||
| 273ad50629 | |||
| 7d950369f2 | |||
| 1aa38a5c3e | |||
| 634994ed0e | |||
| 03adf4e344 | |||
| ab6a6f872b | |||
| 895539f078 | |||
| 0ef8c8b46c | |||
| 8b61028dbe | |||
| 4dbc42fc1f | |||
| 72cb5ff553 | |||
| f8a8ea4ead | |||
| 410215749f | |||
| eacdba9a45 | |||
| ad35a92e44 | |||
| c63cff0ea3 | |||
| 8944b032ca | |||
| 8bc1b4a76c | |||
| 61201dde9c | |||
| b7f77597b0 | |||
| 4d2315766d | |||
| 5d40d4f707 | |||
| 822b111712 | |||
| 10fa21e69e | |||
| c54f69ac77 | |||
| 127b1acb7a | |||
| 4c2a60e60a | |||
| 1092ac0bfb | |||
| dd3b4a60cd | |||
| 3ec140ba67 | |||
| 915d58859b | |||
| 915b1939c1 | |||
| c29dc43ad7 | |||
| 90d5600f28 | |||
| e28d453194 | |||
| 16bf1a8480 | |||
| 40c40f9fca | |||
| 8a81f95b92 | |||
| 7e15b675b3 | |||
| 3153059801 | |||
| 02d1e4d434 | |||
| 17f832c8f2 | |||
| 0cb00937f0 | |||
| ccee2b0cad | |||
| 5967767e8c | |||
| 9476507c32 | |||
| a83045696b | |||
| 752a26bf84 | |||
| c83f81e257 | |||
| e13db3d09a | |||
| b1a3fda37b | |||
| 2ba67bd6f9 | |||
| 251e40562b | |||
| 24b9205af3 | |||
| c88b598bae | |||
| d294cae787 | |||
| 1c74ab1bf9 | |||
| 41f464cc77 | |||
| 93740a4216 | |||
| f3e87369cf | |||
| d8de5d1ba8 | |||
| ddfeae3de5 | |||
| 9244b599ad | |||
| 7c9c30238d | |||
| 88607b6b23 | |||
| e1e07558df | |||
| f654d4379b | |||
| 7c09c8a053 | |||
| 244d3a48c0 | |||
| 5d1ef1f4f6 | |||
| 0440b8b6cc | |||
| b14bd2758d | |||
| 68b0f800da | |||
| e049644ea6 | |||
| 63f704b5a5 | |||
| 7704a74b24 | |||
| 7f80174e22 | |||
| ecb496f029 | |||
| 1fab5fe65e | |||
| ba9422caa8 | |||
| 904686c8c2 | |||
| 7561cc434e | |||
| abd40375d4 | |||
| 173e84252e | |||
| 62f4e58641 | |||
| bf88d845cc | |||
| 42b4bf8262 | |||
| 9954fdfde5 | |||
| 5373df727f | |||
| 509a6d9c94 | |||
| edd6556117 | |||
| 9b4a2cbba9 | |||
| 328956d225 | |||
| 78ef141012 | |||
| 0d7933b5ce | |||
| ee898f020d | |||
| be8a17c5a5 | |||
| f1b69e1931 | |||
| 3375e9fccb | |||
| 5686c34f8f | |||
| 24e7d3dde2 | |||
| 670d159d6c | |||
| 259c2afd09 | |||
| a60bfe9a1d | |||
| 90a51abb19 | |||
| 924a4c4a03 | |||
| 3532769a33 | |||
| 0e243d6ecb | |||
| 644581df4d | |||
| 12f29928ca | |||
| 3b6d3b8b7f | |||
| 12a5a4252e | |||
| 72c403e8b1 | |||
| 368168a881 | |||
| ea9560dbd0 | |||
| 9bb9482c07 | |||
| 2ba5783657 | |||
| 95810cf709 | |||
| 37a04bfd2c | |||
| 1555cbd545 | |||
| 73936cf30c | |||
| dfbc7f2af0 | |||
| 7f9117769d | |||
| 2ccae9f16d | |||
| 298ceacb4d | |||
| 0b41950416 | |||
| 323de4a16a | |||
| e447483d18 | |||
| 503640e68f | |||
| 15da05572c | |||
| 5e0fbd8b21 | |||
| be35914344 | |||
| fc410c6178 | |||
| 17ca00589a | |||
| 4c048f451e | |||
| 8a97782c5c | |||
| 1b9375a241 | |||
| 2bff91fa1c | |||
| ec99b62cce | |||
| d3804d70d6 | |||
| ae47573018 | |||
| 83b63f581c | |||
| d9d81d19ce | |||
| 9d2a0d42e9 | |||
| bb1404aa38 | |||
| 576519a9d7 | |||
| 019767af56 | |||
| d3b946096b | |||
| 8e07dc56e5 | |||
| 6c6643f01c | |||
| bb020d4b9a | |||
| 930aa2dac7 | |||
| 0f8fa6cd88 | |||
| d1c98934cb | |||
| 243e0003bd | |||
| 2068b8a17d | |||
| 172d4bb3c4 | |||
| 74408ee5ea | |||
| 0e86f4aaab | |||
| 69f814d52e | |||
| 4cc975f756 | |||
| 65de8f1df4 | |||
| 20095ff676 | |||
| 9155652776 |
BIN
FastFetch.png
BIN
FastFetch.png
Binary file not shown.
|
Before Width: | Height: | Size: 2.6 MiB After Width: | Height: | Size: 1.8 MiB |
BIN
NeoVim.png
Normal file
BIN
NeoVim.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 747 KiB |
172
README.md
172
README.md
@ -1,43 +1,159 @@
|
||||
# NixOS Configuration
|
||||
# NixFlake
|
||||
|
||||
Modular NixOS configuration, using [Niri](https://github.com/niri-wm/niri) and [Waybar](https://github.com/Alexays/Waybar) for a light desktop.
|
||||
NixOS flake with [Niri](https://github.com/niri-wm/niri), [Waybar](https://github.com/Alexays/Waybar) for a lightweight desktop and [home-manager](https://github.com/nix-community/home-manager) for declarative `~/` configuration.
|
||||
|
||||

|
||||

|
||||
## Screenshots
|
||||
|
||||
To install, run `nixos-rebuild` with the `--flake` parameter from the `NixFlake` directory: `nixos-rebuild switch --flake .#nixinator`.
|
||||
Alternatively, use `nh os switch` or `nh os boot`.
|
||||

|
||||
|
||||
## NixFlake/system
|
||||

|
||||
|
||||
Contains all the system configurations.
|
||||

|
||||
|
||||
- There is a common configuration used for all systems: `NixFlake/system/default.nix`
|
||||
- Every system has its own special configuration: `NixFlake/system/<hostname>/default.nix`
|
||||
- System modules are located in `NixFlake/system/systemmodules`
|
||||
- Hosted services are located in `NixFlake/system/services`
|
||||
## Hosts
|
||||
|
||||
When creating a NixOS configuration inside the `NixFlake/flake.nix` the common configuration is imported.
|
||||
Because the hostname is propagated to the common configuration, it can import the host-specific config by itself.
|
||||
| Host | Type | GPU | Features |
|
||||
|-|-|-|-|
|
||||
| `nixinator` | Desktop (x86_64) | NVIDIA | [disko](https://github.com/nix-community/disko) partitioning, [lanzaboote](https://github.com/nix-community/lanzaboote) Secure Boot, [impermanence](https://github.com/nix-community/impermanence) opt-in state, [sops-nix](https://github.com/Mic92/sops-nix) secrets |
|
||||
| `nixtop` | Laptop (x86_64) | Intel | Obsolete trash computer |
|
||||
| `servenix` | Headless (x86_64) | NVIDIA | Jellyfin, Nextcloud, Gitea, ... |
|
||||
| `thinknix` | Headless (x86_64) | - | AdGuard DNS, Nginx, ... |
|
||||
| `darwinix` | macOS (aarch64) | - | nix-darwin with home-manager |
|
||||
|
||||
## NixFlake/home
|
||||
## Usage
|
||||
|
||||
Contains all the home-manager configurations.
|
||||
```bash
|
||||
# Enter dev shell (provides helper utilities)
|
||||
nix develop
|
||||
|
||||
- There is a common configuration for each user: `NixFlake/home/<username>/default.nix`
|
||||
- There is a configuration for a single system of this user: `NixFlake/home/<username>/<hostname>/default.nix`
|
||||
- Home-Manager modules are located in `NixFlake/home/homemodules`
|
||||
# Rebuild system + user config together
|
||||
nh os switch
|
||||
nh os boot
|
||||
|
||||
When creating a NixOS configuration inside the `NixFlake/flake.nix` the common configuration is imported.
|
||||
Because the hostname is propagated to the common configuration, it can import the host-specific config by itself.
|
||||
# Or with nixos-rebuild
|
||||
sudo nixos-rebuild switch --flake .#nixinator
|
||||
```
|
||||
|
||||
## NixFlake/derivations
|
||||
## Info
|
||||
|
||||
Contains all the stuff I packaged.
|
||||
Each derivation is loaded into `NixFlake/derivations/default.nix`.
|
||||
Home-manager runs as a NixOS module (not standalone). A single `nixos-rebuild switch` rebuilds both system and user configuration together.
|
||||
|
||||
## NixFlake/overlays
|
||||
### Components
|
||||
|
||||
Contains all overlays, e.g. package version overrides.
|
||||
The `NixFlake/overlays/default.nix` imports all overlays and all derivations.
|
||||
It is then imported by the top-level `NixFlake/flake.nix`, to make everything available to the system/home configurations.
|
||||
Per-host config consists of three layers:
|
||||
|
||||
1. **Common Config**: `system/default.nix` (NixOS) / `home/christoph/default.nix` (home-manager)
|
||||
2. **Host Config**: `system/<hostname>/default.nix` (NixOS) / `home/christoph/<hostname>/default.nix` (home-manager)
|
||||
3. **Hardware**: `system/<hostname>/hardware-configuration.nix`
|
||||
|
||||
### Modules
|
||||
|
||||
There are two module hierarchies (NixOS and home-manager modules):
|
||||
|
||||
```
|
||||
system/systemmodules/<name>/ home/homemodules/<name>/
|
||||
- options.nix # declares options - options.nix # declares options
|
||||
- default.nix # implementation - default.nix # implementation
|
||||
```
|
||||
|
||||
## Files
|
||||
|
||||
```
|
||||
NixFlake/
|
||||
├── flake.nix # flake entrypoint: inputs, outputs, host definitions
|
||||
├── flake.lock # flake lockfile
|
||||
├── shell.nix # dev shell (nix develop)
|
||||
├── system/ # NixOS system configurations
|
||||
│ ├── default.nix # global system defaults (all hosts)
|
||||
│ ├── <hostname>/ # per-host overrides + hardware-config
|
||||
│ ├── systemmodules/ # reusable system modules
|
||||
│ └── services/ # OCI container services
|
||||
├── home/ # home-manager user configuration
|
||||
│ └── christoph/
|
||||
│ ├── default.nix # global user defaults
|
||||
│ ├── <hostname>/ # per-host user overrides
|
||||
│ └── homemodules/ # reusable home-manager modules
|
||||
├── lib/ # shared helpers
|
||||
├── derivations/ # custom packages
|
||||
├── overlays/ # package overrides
|
||||
├── config/ # linked dotfiles
|
||||
└── wallpapers/ # backgrounds
|
||||
```
|
||||
|
||||
## System Modules
|
||||
|
||||
| Module | Description |
|
||||
|--------|-------------|
|
||||
| `bootloader` | systemd-boot, lanzaboote Secure Boot signing |
|
||||
| `desktopportal` | xdg-desktop-portal backends (Niri, GTK) |
|
||||
| `docker` | Docker / podman daemon config |
|
||||
| `fonts` | System fonts and fontconfig |
|
||||
| `impermanence` | Opt-in state persistence (wipes `/` on boot) |
|
||||
| `mime` | MIME type associations |
|
||||
| `network` | systemd-networkd wired/wireless config |
|
||||
| `polkit` | Polkit rules for desktop users |
|
||||
| `sops-nix` | Secrets decryption at boot |
|
||||
|
||||
## Home-Manager Modules
|
||||
|
||||
### Shell & Terminal
|
||||
`fish` `terminal` `kitty` `tmux` `paths`
|
||||
|
||||
### Editors
|
||||
`neovim` `vscode` `zed`
|
||||
|
||||
### Desktop / WM
|
||||
`niri` `waybar` `rofi` `color` `fcitx`
|
||||
|
||||
### Media
|
||||
`mpd` `rmpc` `cava` `beets` `jellyfin-tui`
|
||||
|
||||
### Browsers
|
||||
`firefox` `qutebrowser`
|
||||
|
||||
### Tools
|
||||
`git` `ssh` `bat` `btop` `fastfetch` `lazygit` `yazi` `zathura`
|
||||
|
||||
## Services
|
||||
|
||||
All server services run as OCI containers (podman). Each service is defined in `system/services/<name>.nix`.
|
||||
|
||||
| Service | Purpose |
|
||||
|---------|---------|
|
||||
| `adguard` | DNS ad blocking |
|
||||
| `authelia` | SSO |
|
||||
| `fileflows` | Media processing |
|
||||
| `gitea` | Git server |
|
||||
| `immich` | Photo cloud |
|
||||
| `jellyfin` | Streaming server |
|
||||
| `kiwix` | Offline mirrors |
|
||||
| `kopia` | Docker volume backup |
|
||||
| `nextcloud` | File sync |
|
||||
| `nginx-proxy-manager` | Reverse proxy with Let's Encrypt |
|
||||
| `ntfy` | Push notification server |
|
||||
| `paperless` | Document management |
|
||||
| `portainer` | Container status monitor |
|
||||
| `teamspeak` | Voice chat server |
|
||||
| `tinymediamanager` | Media metadata management |
|
||||
|
||||
## Overlays
|
||||
|
||||
Package modifications live in `overlays/default.nix`.
|
||||
|
||||
## Secrets
|
||||
|
||||
Secrets are managed with sops-nix. Public age keys are stored in `flake.nix` under `publicKeys`. Encrypted `.yaml`/`.json` files are referenced via `sops.secrets.<name>`. Decryption happens at activation time.
|
||||
|
||||
## Shared Helpers (`lib/`)
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `nixos.nix` | Host config builders (NixOS + darwin) |
|
||||
| `modules.nix` | Option helpers |
|
||||
| `networking.nix` | systemd-networkd config generators |
|
||||
| `generators.nix` | Lua code generation |
|
||||
| `containers.nix` | OCI container helpers for services |
|
||||
| `color.nix` | Color utilities |
|
||||
| `rofi.nix` | Rofi menu helpers |
|
||||
|
||||
Available to all modules as `mylib` (injected via special args).
|
||||
|
||||
@ -121,12 +121,6 @@
|
||||
fsType = "nfs";
|
||||
options = ["defaults" "rw" "noatime" "_netdev" "bg" "hard"];
|
||||
};
|
||||
|
||||
"/media/Box" = {
|
||||
device = "192.168.86.20:/mnt/Seagate4TB/Box";
|
||||
fsType = "nfs";
|
||||
options = ["defaults" "rw" "relatime" "_netdev" "bg" "hard"];
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
|
||||
@ -69,12 +69,6 @@
|
||||
fsType = "nfs";
|
||||
options = ["defaults" "rw" "relatime" "_netdev" "bg" "hard"];
|
||||
};
|
||||
|
||||
"/media/Box" = {
|
||||
device = "192.168.86.20:/mnt/Seagate4TB/Box";
|
||||
fsType = "nfs";
|
||||
options = ["defaults" "rw" "relatime" "_netdev" "bg" "hard"];
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
nextcloudVersion = "31.0.6-apache";
|
||||
nextcloudVersion = "33.0.5-apache";
|
||||
in {
|
||||
systemd.services.nextcloud-cron = {
|
||||
enable = true;
|
||||
|
||||
Reference in New Issue
Block a user