Compare commits
315 Commits
master
...
7ac4e74334
| Author | SHA1 | Date | |
|---|---|---|---|
|
7ac4e74334
|
|||
|
909b81a962
|
|||
|
d6edae2a88
|
|||
|
3d612ca0d7
|
|||
|
b93dae8b1b
|
|||
|
a7ba12ad91
|
|||
|
7a2be8965f
|
|||
|
493c452b46
|
|||
|
80a7e0d155
|
|||
|
938fe6f905
|
|||
|
d1e659d868
|
|||
|
8aaeb0db89
|
|||
|
b1cd681d04
|
|||
|
ba699c6387
|
|||
|
492082ae84
|
|||
|
4e70ca0246
|
|||
|
6657038f15
|
|||
|
5b6c0d08a6
|
|||
|
6dec53dc8f
|
|||
|
a7fc8ead60
|
|||
|
a081654767
|
|||
|
51d2796ba0
|
|||
|
559bb1d471
|
|||
|
b9649d4a58
|
|||
|
c513749219
|
|||
|
cb22c507cf
|
|||
|
48bd5f4bcd
|
|||
|
f66e6cdd87
|
|||
|
ed7178b731
|
|||
|
be063f3329
|
|||
|
7404a25391
|
|||
|
725e17a86a
|
|||
|
b7131b817a
|
|||
|
f2ce5eb64c
|
|||
|
6e50052e29
|
|||
|
59c6c2cbac
|
|||
|
35c370732a
|
|||
|
ff72abc318
|
|||
|
da85e39d7d
|
|||
|
8516a5f463
|
|||
|
9518dceff5
|
|||
|
cb086876fd
|
|||
|
81873c0f68
|
|||
|
96cbf1f428
|
|||
|
a1dbcf00b4
|
|||
|
e0b9c7187e
|
|||
|
f0dc6ede97
|
|||
|
00cadeed67
|
|||
|
a558b811bf
|
|||
|
cf7fdb2aec
|
|||
|
8fd939bc34
|
|||
|
a5ca09b7ec
|
|||
|
4edd789c20
|
|||
|
f5f23388ce
|
|||
|
97a9f4d78a
|
|||
|
60fe34de9d
|
|||
|
7ed23a63a3
|
|||
|
7fbab2b1f6
|
|||
|
df1cadae60
|
|||
|
b5cb085083
|
|||
|
2a2d96d97e
|
|||
|
307a8b5fb7
|
|||
|
9861866c6f
|
|||
|
05dd3fd75f
|
|||
|
15e2290267
|
|||
|
3646bceff9
|
|||
|
f429a50206
|
|||
|
024908500a
|
|||
|
c7098e2208
|
|||
|
0e86ca0371
|
|||
|
663f21bdda
|
|||
|
2533183d80
|
|||
|
f259b7d326
|
|||
|
ac1b8c9f07
|
|||
|
00e3713682
|
|||
|
84eabaa4d3
|
|||
|
d0916c49e5
|
|||
|
91c35fd55c
|
|||
|
166c35caec
|
|||
|
c204312423
|
|||
|
ddc5722bbe
|
|||
|
cadd7bd949
|
|||
|
2fbf61c052
|
|||
|
5d699a2d58
|
|||
|
593437fa94
|
|||
|
00e412cb20
|
|||
|
1290f14cb7
|
|||
|
132e52e4ad
|
|||
|
29970472f8
|
|||
|
6507cbc0e0
|
|||
|
7e3985bd34
|
|||
|
57b8980ebe
|
|||
|
f1ddccb0df
|
|||
|
0fb5c79df4
|
|||
|
b2915bdd90
|
|||
|
49ef17ac33
|
|||
|
debe85da8e
|
|||
|
558c497c74
|
|||
|
c4451939d5
|
|||
|
d1f010dcc8
|
|||
|
3d5a0f8cb5
|
|||
|
0831730903
|
|||
|
004eff3abf
|
|||
|
592e7e4bb9
|
|||
|
ec7247bc77
|
|||
|
e1d041f010
|
|||
|
84fec63204
|
|||
|
b434aaaccc
|
|||
|
4639fd8c7e
|
|||
|
7f22089765
|
|||
|
8c53eaf570
|
|||
|
c9a4b1a428
|
|||
|
288496afa1
|
|||
|
34f61d4f27
|
|||
|
77f169fef4
|
|||
|
8576db096f
|
|||
|
d20ce66646
|
|||
|
226b72dccf
|
|||
|
6147801194
|
|||
|
a1b8bc9555
|
|||
|
83ffca5e21
|
|||
|
eb782a67cb
|
|||
|
85a12edbcc
|
|||
|
a056e4d98b
|
|||
|
5f17a04fbb
|
|||
|
f514387f64
|
|||
|
c328c188b8
|
|||
|
585f74ce0f
|
|||
|
8263fe01eb
|
|||
|
d61e6f8b9c
|
|||
|
7c7c195083
|
|||
|
2e78898c5a
|
|||
|
1f61e9958c
|
|||
|
c8954e5854
|
|||
|
e772d93f23
|
|||
|
4c17560020
|
|||
|
e1542a1168
|
|||
|
a351bf59ba
|
|||
|
7a62f38084
|
|||
|
b50c5f9f71
|
|||
|
0087145957
|
|||
|
48c77e9654
|
|||
|
71d06d61b1
|
|||
|
75d024111e
|
|||
|
b67aee2a64
|
|||
|
554a76b585
|
|||
|
d9e7e315da
|
|||
|
daee8da3ae
|
|||
|
c2b661adbb
|
|||
|
aa4ebfbc06
|
|||
|
db850552e3
|
|||
|
63afac3d04
|
|||
|
645fc64ead
|
|||
|
6561d4c979
|
|||
|
f1ed339968
|
|||
|
50d14ecf83
|
|||
|
1cdc3f25e0
|
|||
|
9e62f755bb
|
|||
|
d0e6fe072a
|
|||
|
86ea11c8e8
|
|||
|
1adacf5e1e
|
|||
|
e53787deae
|
|||
|
efce5c6293
|
|||
|
6069a12e64
|
|||
|
91bd79a051
|
|||
|
9bec5f42b1
|
|||
|
602aa4cd56
|
|||
|
3573a705af
|
|||
|
615d886a98
|
|||
|
4416f39f0c
|
|||
|
0bb481c037
|
|||
|
98a3788f4f
|
|||
|
ac4b005f9b
|
|||
|
901f58a527
|
|||
|
9a5bc3e981
|
|||
|
fe69d39769
|
|||
|
2f675e96f0
|
|||
|
56512194ef
|
|||
|
d1a6aafed5
|
|||
|
6305d9ca2e
|
|||
|
887f7db0c7
|
|||
|
d8dbdbc5de
|
|||
|
4014ed0318
|
|||
|
87fa954937
|
|||
|
934644c5e2
|
|||
|
0bda035ccd
|
|||
|
6e999ffa02
|
|||
|
807388d032
|
|||
|
9b1a7c73e6
|
|||
|
da729f8c22
|
|||
|
d08d795adf
|
|||
|
ffc2516353
|
|||
|
135e1e5701
|
|||
|
5b2fc78889
|
|||
|
4cbe9885b2
|
|||
|
9b43074248
|
|||
|
be3f6baa17
|
|||
|
837233b552
|
|||
|
ca0c718f3b
|
|||
|
3c68574aea
|
|||
|
aa668d04d3
|
|||
|
d16b645078
|
|||
|
b71264b864
|
|||
|
6ed1882429
|
|||
|
952802d4f7
|
|||
|
53fc6eedc8
|
|||
|
2e0f378c9e
|
|||
|
abab1cf2b4
|
|||
|
ad3210f150
|
|||
|
afe74b8fa1
|
|||
|
8f5a9d753f
|
|||
|
d45a9946bb
|
|||
|
c0f8356205
|
|||
|
72a8dcb8d5
|
|||
|
da548f10bb
|
|||
|
9bfbbc0dc9
|
|||
|
26ac3a8e02
|
|||
|
632fcc3dab
|
|||
|
a204951964
|
|||
|
9aea533693
|
|||
|
a07499813d
|
|||
|
6e2a64a50c
|
|||
|
80d932838f
|
|||
|
4bed2e7021
|
|||
|
75ffcc5c6e
|
|||
|
cb14d79586
|
|||
|
9b41d5552e
|
|||
|
3d50b8fea7
|
|||
|
5aec2aa971
|
|||
|
b799d86823
|
|||
|
d505394753
|
|||
|
06cf86fa20
|
|||
|
a4272ea92c
|
|||
|
89739e3af0
|
|||
|
52a99db8e0
|
|||
|
7848fb7274
|
|||
|
397d1b014c
|
|||
|
7f1ce57994
|
|||
|
a1f495f138
|
|||
|
4e9003e0c5
|
|||
|
380e11edb2
|
|||
|
a2153c4418
|
|||
|
abdcbe2ce9
|
|||
|
fa286dce16
|
|||
|
c4454daab6
|
|||
|
a03c9d8227
|
|||
|
9db5d91da6
|
|||
|
72716230ea
|
|||
|
2919e797ed
|
|||
|
86d669c2ab
|
|||
|
77ac5b70b8
|
|||
|
54839be395
|
|||
|
714e3e0683
|
|||
|
a8d7d1e666
|
|||
|
40bcc14304
|
|||
|
fa5bd0eefd
|
|||
|
6182ada581
|
|||
|
4acddcec09
|
|||
|
5c14817464
|
|||
|
38920bd3d7
|
|||
|
b89934d13f
|
|||
|
734dfcadfc
|
|||
|
2c959fdc0c
|
|||
|
e00c4f49f5
|
|||
|
61131ca598
|
|||
|
9c1a39d699
|
|||
|
32de6e24b7
|
|||
|
78e554cc30
|
|||
|
f65617deed
|
|||
|
aa3a881d58
|
|||
|
7f99b73635
|
|||
|
c1360e5c2c
|
|||
|
ca9e66bc35
|
|||
|
eac705bdfb
|
|||
|
69beab4812
|
|||
|
515110ff7d
|
|||
|
9a9bffd637
|
|||
|
f1b269e3ee
|
|||
|
f09dee5ad8
|
|||
|
f246eacdb3
|
|||
|
b7e2bba8f0
|
|||
|
25ae0f4b85
|
|||
|
d12b247368
|
|||
|
25e9128875
|
|||
|
eee28f57fc
|
|||
|
ea03e2266f
|
|||
|
5e422d05c9
|
|||
|
eaa36cfce2
|
|||
|
572d0bfe9e
|
|||
|
385ca27f8c
|
|||
|
4c18fd8c8e
|
|||
|
bf0c55669c
|
|||
|
86a5e79079
|
|||
|
7d429a4720
|
|||
|
2e9a4b13d1
|
|||
|
73eeff9a0e
|
|||
|
d216a8018d
|
|||
|
b09d854e50
|
|||
|
ff39dd1df2
|
|||
|
98c520e0bd
|
|||
|
7e3d3ca4a5
|
|||
|
c8a76751f3
|
|||
|
12a10bee82
|
|||
|
767309885a
|
|||
|
6d360ed782
|
|||
|
ddccd51b5a
|
|||
|
1fef42e5d4
|
|||
|
0d20883f4f
|
|||
|
cec5ec5493
|
|||
|
5833dff19e
|
|||
|
7b4c2df7af
|
|||
|
1643f30906
|
|||
|
79c617cc91
|
|||
|
474a8badf4
|
|||
|
17368396cf
|
BIN
FastFetch.png
BIN
FastFetch.png
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 2.6 MiB |
BIN
NeoVim.png
BIN
NeoVim.png
Binary file not shown.
|
Before Width: | Height: | Size: 747 KiB |
172
README.md
172
README.md
@ -1,159 +1,43 @@
|
||||
# NixFlake
|
||||
# NixOS Configuration
|
||||
|
||||
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.
|
||||
Modular NixOS configuration, using [Niri](https://github.com/niri-wm/niri) and [Waybar](https://github.com/Alexays/Waybar) for a light desktop.
|
||||
|
||||
## 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.
|
||||
|
||||
## Hosts
|
||||
- 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`
|
||||
|
||||
| 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 |
|
||||
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.
|
||||
|
||||
## Usage
|
||||
## NixFlake/home
|
||||
|
||||
```bash
|
||||
# Enter dev shell (provides helper utilities)
|
||||
nix develop
|
||||
Contains all the home-manager configurations.
|
||||
|
||||
# Rebuild system + user config together
|
||||
nh os switch
|
||||
nh os boot
|
||||
- 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`
|
||||
|
||||
# Or with nixos-rebuild
|
||||
sudo nixos-rebuild switch --flake .#nixinator
|
||||
```
|
||||
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.
|
||||
|
||||
## Info
|
||||
## NixFlake/derivations
|
||||
|
||||
Home-manager runs as a NixOS module (not standalone). A single `nixos-rebuild switch` rebuilds both system and user configuration together.
|
||||
Contains all the stuff I packaged.
|
||||
Each derivation is loaded into `NixFlake/derivations/default.nix`.
|
||||
|
||||
### Components
|
||||
## NixFlake/overlays
|
||||
|
||||
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).
|
||||
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.
|
||||
|
||||
@ -121,6 +121,12 @@
|
||||
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,6 +69,12 @@
|
||||
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 = "33.0.5-apache";
|
||||
nextcloudVersion = "31.0.6-apache";
|
||||
in {
|
||||
systemd.services.nextcloud-cron = {
|
||||
enable = true;
|
||||
|
||||
Reference in New Issue
Block a user