68 lines
3.3 KiB
Markdown
68 lines
3.3 KiB
Markdown
# nix
|
|
|
|
my [nixos](https://nixos.org/) configuration, structured with [den](https://github.com/vic/den) and [flake-parts](https://github.com/hercules-ci/flake-parts).
|
|
|
|
## structure
|
|
|
|
```nix/flake.nix#L1-2
|
|
outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./modules);
|
|
```
|
|
|
|
modules are automatically discovered via [import-tree](https://github.com/vic/import-tree) and composed using `den.aspects`.
|
|
|
|
```
|
|
modules/
|
|
├── core/ # System fundamentals (desktop, audio, graphics, network, theme)
|
|
├── hosts/ # Per-machine includes (nix, laptop, box)
|
|
├── infra/ # Infrastructure (syncthing, cloudflared tunnels)
|
|
├── services/ # Self-hosted services (searxng, gitea, copyparty, ...)
|
|
├── software/ # User software (firefox, nixcord, beets, ...)
|
|
└── users/ # User accounts
|
|
```
|
|
|
|
---
|
|
|
|
## hosts
|
|
|
|
| Host | Role | GPU | Switch Command |
|
|
|------|------|-----|----------------|
|
|
| `nix` | desktop | nvidia | `nh os switch ~/nix --impure -H nix` |
|
|
| `laptop` | laptop | amd | `nh os switch ~/nix --impure -H laptop` |
|
|
| `box` | homeserver | — | `nh os switch ~/nix --impure -H box` |
|
|
|
|
---
|
|
|
|
## self-hosted services
|
|
|
|
all services on `box` are proxied through cloudflared tunnels to `*.bug.tools`.
|
|
|
|
| Service | URL | Description |
|
|
|---------|-----|-------------|
|
|
| [searxng](https://github.com/searxng/searxng) | [search.bug.tools](https://search.bug.tools) | Privacy-respecting metasearch engine |
|
|
| [redlib](https://github.com/redlib-org/redlib) | [reddit.bug.tools](https://reddit.bug.tools) | Private Reddit frontend *(disabled)* |
|
|
| [copyparty](https://github.com/9001/copyparty) | [files.bug.tools](https://files.bug.tools) | File server / uploader |
|
|
| [gitea](https://gitea.io/) | [git.bug.tools](https://git.bug.tools) | Self-hosted Git with org mirrors |
|
|
| [glances](https://github.com/nicolargo/glances) | [monitor.bug.tools](https://monitor.bug.tools) | System monitoring |
|
|
| [nixos-mailserver](https://gitlab.com/simple-nixos-mailserver/nixos-mailserver) | [mail.bug.tools](https://mail.bug.tools) | Email server |
|
|
| [invidious](https://github.com/iv-org/invidious) | [tube.bug.tools](https://tube.bug.tools) | YouTube frontend *(disabled)* |
|
|
| [matrix](https://matrix.org/) | [matrix.bug.tools](https://matrix.bug.tools) | Matrix homeserver *(disabled)* |
|
|
| [sish](https://docs.ssi.sh/) | [tuns.bug.tools](https://tuns.bug.tools) | SSH tunnels *(disabled)* |
|
|
| vscode-server | — | Remote VS Code access |
|
|
|
|
---
|
|
|
|
## flake inputs
|
|
|
|
| Input | Purpose |
|
|
|-------|---------|
|
|
| [nixpkgs](https://github.com/nixos/nixpkgs) (unstable) | Package set |
|
|
| [home-manager](https://github.com/nix-community/home-manager) | User environment management |
|
|
| [flake-parts](https://github.com/hercules-ci/flake-parts) | Flake structure |
|
|
| [den](https://github.com/vic/den) | Dendritic aspect system |
|
|
| [import-tree](https://github.com/vic/import-tree) | Auto module discovery |
|
|
| [stylix](https://github.com/nix-community/stylix) | System-wide theming |
|
|
| [catppuccin/nix](https://github.com/catppuccin/nix) | Catppuccin theme modules |
|
|
| [nixcord](https://github.com/FlameFlag/nixcord) | Declarative Vesktop/Discord |
|
|
| [nix-flatpak](https://github.com/gmodena/nix-flatpak) | Declarative Flatpak |
|
|
| [copyparty](https://github.com/9001/copyparty) | File server |
|