Compare commits
5
Commits
05ad9b2295
...
945e80206f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
945e80206f | ||
|
|
9f71b32db9 | ||
|
|
96e935d319 | ||
|
|
a781e2c428 | ||
|
|
1a50c8a668 |
No files matched your search
+11
@@ -0,0 +1,11 @@
|
|||||||
|
keys:
|
||||||
|
- &server age18q3lr2z4yeg2f86my42ym4hx0dvcwgjshmchyhdkgwvf4k37dsyq3mcjse
|
||||||
|
- &laptop age1pln9sxy5j93lklqklfwp3qepx7x4cs4y2w63n9y3ykt68qgra5ysqleesg
|
||||||
|
|
||||||
|
creation_rules:
|
||||||
|
- path_regex: nixos/secrets\.yaml$
|
||||||
|
key_groups:
|
||||||
|
- pgp: []
|
||||||
|
age:
|
||||||
|
- *server
|
||||||
|
- *laptop
|
||||||
@@ -13,7 +13,7 @@ This repository is the central control plane for the `roadtotech.me` homelab clu
|
|||||||
- `socket-proxy` must remain restricted to read-only endpoints (`POST=0`, `DELETE=0`).
|
- `socket-proxy` must remain restricted to read-only endpoints (`POST=0`, `DELETE=0`).
|
||||||
3. **Zero Hardcoded Secrets**:
|
3. **Zero Hardcoded Secrets**:
|
||||||
- Never commit raw `.env` files, password strings, database files (`*.db`, `*.sqlite3`), or SSL certificates (`acme.json`, `*.key`).
|
- Never commit raw `.env` files, password strings, database files (`*.db`, `*.sqlite3`), or SSL certificates (`acme.json`, `*.key`).
|
||||||
- All runtime secrets are managed declaratively in `~/Config/hosts/desktop/secrets.yaml` via SOPS and rendered to `/run/secrets/rendered/`.
|
- All runtime secrets are managed declaratively in `nixos/secrets.yaml` via SOPS and rendered to `/run/secrets/` at boot.
|
||||||
4. **License Invariant**:
|
4. **License Invariant**:
|
||||||
- Preserve and maintain `The Unlicense` (public domain) across all Core and Sites repositories.
|
- Preserve and maintain `The Unlicense` (public domain) across all Core and Sites repositories.
|
||||||
|
|
||||||
|
|||||||
@@ -45,17 +45,17 @@ User and service applications (e.g. `dashboard`, `docs`, `jellyfin`, `excalidraw
|
|||||||
|
|
||||||
The security model is built on zero hardcoded secrets and defense-in-depth:
|
The security model is built on zero hardcoded secrets and defense-in-depth:
|
||||||
|
|
||||||
```
|
```text
|
||||||
[~/Config/hosts/desktop/secrets.yaml] (Encrypted with SOPS + age keys)
|
[nixos/secrets.yaml] (Encrypted with SOPS + age keys)
|
||||||
│
|
│
|
||||||
▼ (Decrypted at boot by sops-nix using SSH host key)
|
▼ (Decrypted at boot by sops-nix using host SSH key)
|
||||||
[/run/secrets/rendered/homeserver.env] & [/run/secrets/rendered/traefik-deployments.env]
|
[/run/secrets/rendered/homeserver.env] & [/run/secrets/rendered/traefik-deployments.env]
|
||||||
│
|
│
|
||||||
▼ (Fed via --env-file and appctl)
|
▼ (Fed via --env-file and appctl)
|
||||||
[Core & Sites Containers]
|
[Core & Sites Containers]
|
||||||
```
|
```
|
||||||
|
|
||||||
1. **SOPS & sops-nix Integration:** All sensitive tokens (Dynu API key, Authelia session secrets, JWT keys, database passwords) are encrypted in `~/Config/hosts/desktop/secrets.yaml` and decrypted by NixOS at runtime into in-memory `/run/secrets/rendered/`.
|
1. **SOPS & sops-nix Integration:** All sensitive tokens (Dynu API key, Authelia session secrets, JWT keys, database passwords) are encrypted in `nixos/secrets.yaml` and decrypted by NixOS at runtime into in-memory `/run/secrets/` and `/run/secrets/rendered/`.
|
||||||
2. **Edge TLS & HSTS:** All external traffic is forced over HTTPS using Let's Encrypt wildcard certificates with strict redirect schemes (`https-redirect@docker`).
|
2. **Edge TLS & HSTS:** All external traffic is forced over HTTPS using Let's Encrypt wildcard certificates with strict redirect schemes (`https-redirect@docker`).
|
||||||
3. **Authelia ForwardAuth:** Applications that require authentication declare `traefik.http.routers.<name>.middlewares=authelia-auth@docker`, delegating identity verification to Authelia.
|
3. **Authelia ForwardAuth:** Applications that require authentication declare `traefik.http.routers.<name>.middlewares=authelia-auth@docker`, delegating identity verification to Authelia.
|
||||||
4. **Socket Isolation:** Direct Docker daemon sockets are completely hidden behind `socket-proxy`.
|
4. **Socket Isolation:** Direct Docker daemon sockets are completely hidden behind `socket-proxy`.
|
||||||
@@ -170,15 +170,42 @@ appctl up myapp
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## ⚙️ NixOS Service Management
|
## ❄️ Declarative NixOS Appliance
|
||||||
|
|
||||||
The Core Control Plane runs as a native systemd unit managed declaratively by NixOS:
|
This repository is a self-contained NixOS appliance. It defines the operating system, Docker infrastructure, firewall rules, automated DDNS updates, and host shell environment in a single flake.
|
||||||
|
|
||||||
* **Service Unit:** `homeserver-core.service`
|
### Repository NixOS Layout:
|
||||||
* **Nix Module:** [`~/Config/hosts/desktop/homeserver.nix`](file:///home/kiskaadee/Config/hosts/desktop/homeserver.nix)
|
* **[`flake.nix`](flake.nix)** — Flake entrypoint defining `nixosConfigurations.server`.
|
||||||
* **Status Inspection:** `systemctl status homeserver-core`
|
* **[`nixos/configuration.nix`](nixos/configuration.nix)** — Standalone headless host configuration (locale, SSH, Docker, packages).
|
||||||
* **Logs:** `journalctl -u homeserver-core -f`
|
* **[`nixos/hardware-configuration.nix`](nixos/hardware-configuration.nix)** — Server hardware, disk mounts, and kernel parameters.
|
||||||
* **Restart:** `sudo systemctl restart homeserver-core`
|
* **[`nixos/secrets.yaml`](nixos/secrets.yaml)** — SOPS-encrypted secrets for the server.
|
||||||
|
* **[`nixos/modules/homeserver.nix`](nixos/modules/homeserver.nix)** — `homeserver-core.service`, `homelab-gitops.service`, and Authelia secrets.
|
||||||
|
* **[`nixos/modules/traefik-deployments.nix`](nixos/modules/traefik-deployments.nix)** — Traefik applications environment secrets (`traefik-deployments.env`).
|
||||||
|
* **[`nixos/modules/dynu.nix`](nixos/modules/dynu.nix)** — Dynu DDNS smart IP monitor timer and ddclient credentials.
|
||||||
|
* **[`nixos/modules/shell.nix`](nixos/modules/shell.nix)** — Server-tailored bash shell profile, aliases, and utilities.
|
||||||
|
|
||||||
|
### Common Operations:
|
||||||
|
```bash
|
||||||
|
# Rebuild and switch the running system
|
||||||
|
sudo nixos-rebuild switch --flake ~/Core#server
|
||||||
|
# (or use the built-in alias: nix-switch)
|
||||||
|
|
||||||
|
# Inspect core service units
|
||||||
|
systemctl status homeserver-core
|
||||||
|
journalctl -u homeserver-core -f
|
||||||
|
|
||||||
|
# Inspect GitOps webhook dispatcher
|
||||||
|
systemctl status homelab-gitops
|
||||||
|
|
||||||
|
# Inspect dynamic IP monitor
|
||||||
|
systemctl status dynu-monitor
|
||||||
|
```
|
||||||
|
|
||||||
|
### Disaster Recovery:
|
||||||
|
Any clean machine can be provisioned into this server:
|
||||||
|
```bash
|
||||||
|
nixos-install --flake ~/Core#server
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -29,8 +29,8 @@ The most critical security feature. No container (including Traefik or Portainer
|
|||||||
Despite the hardening, you should remain vigilant about the following:
|
Despite the hardening, you should remain vigilant about the following:
|
||||||
|
|
||||||
### 1. Host-Level Security (The Foundation)
|
### 1. Host-Level Security (The Foundation)
|
||||||
If an attacker gains SSH access to your Arch Linux host, they have total control.
|
If an attacker gains SSH access to your host, they have control over the system.
|
||||||
- **Action**: Use SSH Keys only (disable password login). Install `fail2ban`. Keep the host kernel updated (`pacman -Syu`).
|
- **Action**: Use SSH Keys exclusively (`PermitRootLogin = "no"` is enforced by NixOS). Keep your Nix flake inputs and system updated (`sudo nixos-rebuild switch --flake ~/Core#server`).
|
||||||
|
|
||||||
### 2. Application-Specific Vulnerabilities
|
### 2. Application-Specific Vulnerabilities
|
||||||
A zero-day exploit in Gitea or Ollama could allow an attacker to execute code *inside* that specific container.
|
A zero-day exploit in Gitea or Ollama could allow an attacker to execute code *inside* that specific container.
|
||||||
|
|||||||
+30
-29
@@ -22,8 +22,8 @@ All sensitive tokens, encryption keys, and credentials are encrypted using **`so
|
|||||||
|
|
||||||
### Secrets Lifecycle:
|
### Secrets Lifecycle:
|
||||||
|
|
||||||
```
|
```text
|
||||||
[~/Config/hosts/desktop/secrets.yaml] (Encrypted with Age)
|
[nixos/secrets.yaml] (Encrypted with Age)
|
||||||
│
|
│
|
||||||
▼ (Decrypted at boot by sops-nix daemon)
|
▼ (Decrypted at boot by sops-nix daemon)
|
||||||
1. [/run/secrets/rendered/homeserver.env] --> Fed to Core Compose Stack
|
1. [/run/secrets/rendered/homeserver.env] --> Fed to Core Compose Stack
|
||||||
@@ -39,55 +39,56 @@ All sensitive tokens, encryption keys, and credentials are encrypted using **`so
|
|||||||
|
|
||||||
To update credentials (e.g. changing your Dynu API key or updating Authelia user passwords):
|
To update credentials (e.g. changing your Dynu API key or updating Authelia user passwords):
|
||||||
|
|
||||||
1. Navigate to your NixOS configuration repository:
|
1. Navigate to the core repository:
|
||||||
```bash
|
```bash
|
||||||
cd ~/Config
|
cd ~/Core
|
||||||
```
|
```
|
||||||
2. Decrypt and open the secrets file in your editor:
|
2. Decrypt and open the secrets file in your editor:
|
||||||
```bash
|
```bash
|
||||||
nix-shell -p sops --run "sops hosts/desktop/secrets.yaml"
|
sops nixos/secrets.yaml
|
||||||
```
|
```
|
||||||
3. Update or append keys under the root block:
|
3. Update or append keys under the root block:
|
||||||
```yaml
|
```yaml
|
||||||
dynu_api_key: "your_dynu_api_key"
|
dynu:
|
||||||
acme_email: "your_email@domain.com"
|
api_key: "your_dynu_api_key"
|
||||||
authelia_session_secret: "secure_64_char_secret"
|
traefik:
|
||||||
authelia_storage_encryption_key: "secure_64_char_key"
|
acme_email: "your_email@domain.com"
|
||||||
authelia_identity_validation_reset_password_jwt_secret: "secure_64_char_jwt_secret"
|
authelia:
|
||||||
authelia_user_kiskaadee_password_hash: "$argon2id$v=19$m=65536..."
|
session_secret: "secure_64_char_secret"
|
||||||
|
storage_encryption_key: "secure_64_char_key"
|
||||||
|
jwt_secret: "secure_64_char_jwt_secret"
|
||||||
|
users:
|
||||||
|
kiskaadee:
|
||||||
|
password_hash: "$argon2id$v=19$m=65536..."
|
||||||
```
|
```
|
||||||
*To generate an Argon2 password hash securely, run:*
|
*To generate an Argon2 password hash securely, run:*
|
||||||
```bash
|
```bash
|
||||||
docker run --rm -it authelia/authelia:latest authelia crypto hash generate argon2
|
docker run --rm -it authelia/authelia:latest authelia crypto hash generate argon2
|
||||||
```
|
```
|
||||||
4. Save and close. SOPS will automatically encrypt the modified file before saving.
|
4. Save and close. SOPS will automatically encrypt the modified file before saving.
|
||||||
|
5. Rebuild the system to apply new secret templates:
|
||||||
|
```bash
|
||||||
|
sudo nixos-rebuild switch --flake ~/Core#server
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## ⚙️ Declarative NixOS Modules
|
## ⚙️ Declarative NixOS Modules
|
||||||
|
|
||||||
The Core stack and deployment environments are defined declaratively in `~/Config`:
|
The Core stack and deployment environments are defined declaratively in `nixos/modules/`:
|
||||||
|
|
||||||
### 1. Control Plane Module ([`hosts/desktop/homeserver.nix`](file:///home/kiskaadee/Config/hosts/desktop/homeserver.nix))
|
### 1. Control Plane Module ([`nixos/modules/homeserver.nix`](../nixos/modules/homeserver.nix))
|
||||||
Generates `/run/secrets/rendered/homeserver.env` and manages the `homeserver-core.service` systemd daemon:
|
Generates `/run/secrets/rendered/homeserver.env`, `/run/secrets/rendered/users.yml`, and manages the `homeserver-core.service` and `homelab-gitops.service` systemd daemons.
|
||||||
```nix
|
|
||||||
sops.templates."homeserver.env" = {
|
|
||||||
owner = "kiskaadee";
|
|
||||||
content = lib.generators.toKeyValue {} {
|
|
||||||
DOMAIN = "roadtotech.me";
|
|
||||||
DOCKER_API_VERSION = "1.40";
|
|
||||||
DYNU_API_KEY = config.sops.placeholder.dynu_api_key;
|
|
||||||
ACME_EMAIL = config.sops.placeholder.acme_email;
|
|
||||||
AUTHELIA_SESSION_SECRET = config.sops.placeholder.authelia_session_secret;
|
|
||||||
AUTHELIA_STORAGE_ENCRYPTION_KEY = config.sops.placeholder.authelia_storage_encryption_key;
|
|
||||||
AUTHELIA_IDENTITY_VALIDATION_RESET_PASSWORD_JWT_SECRET = config.sops.placeholder.authelia_identity_validation_reset_password_jwt_secret;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2. Applications Secret Module ([`hosts/desktop/traefik-deployments.nix`](file:///home/kiskaadee/Config/hosts/desktop/traefik-deployments.nix))
|
### 2. Applications Secret Module ([`nixos/modules/traefik-deployments.nix`](../nixos/modules/traefik-deployments.nix))
|
||||||
Generates `/run/secrets/rendered/traefik-deployments.env` consumed by `appctl`.
|
Generates `/run/secrets/rendered/traefik-deployments.env` consumed by `appctl`.
|
||||||
|
|
||||||
|
### 3. Dynamic DNS Module ([`nixos/modules/dynu.nix`](../nixos/modules/dynu.nix))
|
||||||
|
Configures the smart IP monitor timer and updates ddclient when IP rotations occur.
|
||||||
|
|
||||||
|
### 4. Server Shell Module ([`nixos/modules/shell.nix`](../nixos/modules/shell.nix))
|
||||||
|
Defines interactive bash aliases, git helpers, and terminal tools via system `/etc/bashrc`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🚀 Running and Managing the Stack
|
## 🚀 Running and Managing the Stack
|
||||||
|
|||||||
Generated
+45
@@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1789006805,
|
||||||
|
"narHash": "sha256-q+GdZ3yq4Y2LXHRK0vKTM32Hwy7RCgUgy+hjwZLI5pY=",
|
||||||
|
"rev": "8ce4ef6cb6f871616146b9fe26d2a5ae594e94fe",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1070770.8ce4ef6cb6f8/nixexprs.tar.zst"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.zst"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"sops-nix": "sops-nix"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sops-nix": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1788914643,
|
||||||
|
"narHash": "sha256-4GuMPW90JSxXWDPUB9M+1m7fYbe3H0apOd86/zBQ2Kw=",
|
||||||
|
"owner": "Mic92",
|
||||||
|
"repo": "sops-nix",
|
||||||
|
"rev": "13616fff713a9f94055c66f15687ebdc17a335df",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "Mic92",
|
||||||
|
"repo": "sops-nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
description = "Homelab Core — Turnkey Declarative NixOS Appliance for roadtotech.me";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.zst";
|
||||||
|
|
||||||
|
sops-nix = {
|
||||||
|
url = "github:Mic92/sops-nix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, sops-nix, ... }@inputs: {
|
||||||
|
nixosConfigurations.server = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
specialArgs = { inherit inputs; };
|
||||||
|
modules = [
|
||||||
|
./nixos/configuration.nix
|
||||||
|
sops-nix.nixosModules.sops
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,131 @@
|
|||||||
|
# 🌐 Server NixOS Configuration — Turnkey Headless Homelab Appliance
|
||||||
|
# Standalone declarative configuration for the roadtotech.me homelab server.
|
||||||
|
# No Home Manager. No shared desktop modules.
|
||||||
|
# Goal: wipe & restore from any NixOS installation via `nixos-install --flake ~/Core#server`
|
||||||
|
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./hardware-configuration.nix # Server-specific disk and CPU configuration
|
||||||
|
./modules/homeserver.nix # Core services: systemd units, Authelia, SOPS secrets
|
||||||
|
./modules/traefik-deployments.nix # Traefik deployment secrets and env templates
|
||||||
|
./modules/dynu.nix # Dynu DDNS smart IP monitor service
|
||||||
|
./modules/shell.nix # Declarative bash environment for the server
|
||||||
|
];
|
||||||
|
|
||||||
|
# ── SOPS secrets configuration ──────────────────────────────────────────────
|
||||||
|
# Set once here to avoid duplicate-option conflicts across submodules
|
||||||
|
sops.defaultSopsFile = ./secrets.yaml;
|
||||||
|
sops.defaultSopsFormat = "yaml";
|
||||||
|
|
||||||
|
# ── Nix settings ─────────────────────────────────────────────────────────────
|
||||||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
|
# Pin nixpkgs registry to the flake input (avoids GitHub API calls from the CLI)
|
||||||
|
nix.registry.nixpkgs.flake = inputs.nixpkgs;
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
# ── Regional & locale settings ───────────────────────────────────────────────
|
||||||
|
time.timeZone = "America/Bogota";
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
|
# ── Console ──────────────────────────────────────────────────────────────────
|
||||||
|
console = {
|
||||||
|
font = "Lat2-Terminus16";
|
||||||
|
keyMap = "us";
|
||||||
|
};
|
||||||
|
|
||||||
|
# ── Bootloader ───────────────────────────────────────────────────────────────
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
# ── Network ──────────────────────────────────────────────────────────────────
|
||||||
|
networking.hostName = "server";
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
# ── User account ─────────────────────────────────────────────────────────────
|
||||||
|
users.users.kiskaadee = {
|
||||||
|
isNormalUser = true;
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICAVPPMk+WApUd/fo78+lsRGnLKSlY4GDZiNGKwBAifD"
|
||||||
|
];
|
||||||
|
extraGroups = [
|
||||||
|
"wheel" # sudo access
|
||||||
|
"docker" # run docker without sudo
|
||||||
|
"networkmanager" # modify network settings
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# ── SSH ──────────────────────────────────────────────────────────────────────
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
ports = [ 22 ];
|
||||||
|
settings.PermitRootLogin = "no";
|
||||||
|
};
|
||||||
|
|
||||||
|
# ── Virtualisation ───────────────────────────────────────────────────────────
|
||||||
|
virtualisation.docker.enable = true;
|
||||||
|
|
||||||
|
# ── Dynamic binary support ───────────────────────────────────────────────────
|
||||||
|
programs.nix-ld = {
|
||||||
|
enable = true;
|
||||||
|
libraries = with pkgs; [
|
||||||
|
stdenv.cc.cc.lib
|
||||||
|
zlib
|
||||||
|
glib
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# ── Headless optimizations ───────────────────────────────────────────────────
|
||||||
|
# Disable peripheral hardware & desktop services not needed on a headless server
|
||||||
|
services.pipewire.enable = false;
|
||||||
|
services.printing.enable = false;
|
||||||
|
hardware.bluetooth.enable = false;
|
||||||
|
|
||||||
|
# Disable power-saving sleep/suspend to keep the homelab always active
|
||||||
|
systemd.targets.sleep.enable = false;
|
||||||
|
systemd.targets.suspend.enable = false;
|
||||||
|
systemd.targets.hibernate.enable = false;
|
||||||
|
systemd.targets.hybrid-sleep.enable = false;
|
||||||
|
|
||||||
|
# Kernel-level power management tuning
|
||||||
|
powerManagement.powertop.enable = true;
|
||||||
|
|
||||||
|
# ── CLI tools ────────────────────────────────────────────────────────────────
|
||||||
|
# Minimal server-appropriate tooling (no desktop apps or user dotfiles)
|
||||||
|
programs.tmux.enable = true;
|
||||||
|
programs.neovim = {
|
||||||
|
enable = true;
|
||||||
|
defaultEditor = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# Monitoring & diagnostics
|
||||||
|
htop
|
||||||
|
iotop
|
||||||
|
iftop
|
||||||
|
ncdu
|
||||||
|
# Secrets tooling (required for sops-nix secret decryption and manual re-encryption)
|
||||||
|
sops
|
||||||
|
age
|
||||||
|
# Python runtime (hard requirement for appctl and gitops_dispatcher.py)
|
||||||
|
python3
|
||||||
|
# Modern shell utilities
|
||||||
|
eza # ls replacement
|
||||||
|
ripgrep # rg — fast grep
|
||||||
|
fd # fast find
|
||||||
|
tree # directory tree viewer
|
||||||
|
# Network & transfer
|
||||||
|
git
|
||||||
|
curl
|
||||||
|
wget
|
||||||
|
rclone
|
||||||
|
jq
|
||||||
|
];
|
||||||
|
|
||||||
|
# ── State version ─────────────────────────────────────────────────────────────
|
||||||
|
# Do not modify this value after the first install.
|
||||||
|
system.stateVersion = "26.05";
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usbhid" ];
|
||||||
|
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/mapper/nixos_vg-root";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/66E6-7442";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0022" "dmask=0022" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/media" =
|
||||||
|
{ device = "/dev/mapper/nixos_vg-media";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/home" =
|
||||||
|
{ device = "/dev/mapper/nixos_vg-home";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
# 🌐 Dynu DDNS IP Monitor & Updater Service
|
||||||
|
# This NixOS module configures a smart, local-first IP change detector.
|
||||||
|
# It queries public IP providers, maintains a history log of WAN IP rotations,
|
||||||
|
# and triggers ddclient only when an actual change is detected to prevent API rate limits.
|
||||||
|
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
# Declaratively read the external Python script into the Nix store at evaluation time
|
||||||
|
ipMonitorScript = pkgs.writers.writePython3Bin "dynu-ip-monitor" { } (builtins.readFile ../scripts/monitor.py);
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# Define the keys to decrypt
|
||||||
|
sops.secrets."dynu/user" = { };
|
||||||
|
sops.secrets."dynu/domain" = { };
|
||||||
|
sops.secrets."dynu/password" = { };
|
||||||
|
sops.secrets."system/pdf_decrypt_password" = {
|
||||||
|
owner = "kiskaadee";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Assemble the ddclient config file securely at boot time in /run/secrets/
|
||||||
|
# Defaults to owner root:root (which avoids dynamic user evaluation issues)
|
||||||
|
sops.templates."ddclient.conf" = {
|
||||||
|
content = builtins.replaceStrings
|
||||||
|
[ "@dynu_user@" "@dynu_password@" "@dynu_domain@" ]
|
||||||
|
[
|
||||||
|
config.sops.placeholder."dynu/user"
|
||||||
|
config.sops.placeholder."dynu/password"
|
||||||
|
config.sops.placeholder."dynu/domain"
|
||||||
|
]
|
||||||
|
(builtins.readFile ../scripts/ddclient.conf);
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable ddclient and feed it the decrypted configuration template via systemd credentials
|
||||||
|
services.ddclient = {
|
||||||
|
enable = true;
|
||||||
|
configFile = "/run/credentials/ddclient.service/ddclient.conf";
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.ddclient = {
|
||||||
|
serviceConfig = {
|
||||||
|
# Securely load the root-owned secret file into the dynamic ddclient service
|
||||||
|
LoadCredential = [ "ddclient.conf:${config.sops.templates."ddclient.conf".path}" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Disable ddclient's automatic timer.
|
||||||
|
# This stops ddclient from polling every 10 minutes on its own.
|
||||||
|
systemd.timers.ddclient.enable = false;
|
||||||
|
|
||||||
|
# Define the smart IP change detector service
|
||||||
|
systemd.services.dynu-monitor = {
|
||||||
|
description = "Dynu DDNS Smart IP Change Monitor";
|
||||||
|
after = [ "network-online.target" ];
|
||||||
|
wants = [ "network-online.target" ];
|
||||||
|
path = with pkgs; [
|
||||||
|
systemd # Required for systemctl
|
||||||
|
];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
User = "root";
|
||||||
|
Group = "root";
|
||||||
|
StateDirectory = "dynu";
|
||||||
|
Environment = "HISTORY_FILE=/var/lib/dynu/ip_history.jsonl";
|
||||||
|
ExecStart = "${ipMonitorScript}/bin/dynu-ip-monitor";
|
||||||
|
TimeoutSec = 30;
|
||||||
|
|
||||||
|
# Hardening
|
||||||
|
NoNewPrivileges = true;
|
||||||
|
PrivateTmp = true;
|
||||||
|
ProtectSystem = "strict";
|
||||||
|
ProtectHome = true;
|
||||||
|
ReadWritePaths = "/var/lib/dynu";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Run the smart IP change monitor periodically (every 30 minutes)
|
||||||
|
systemd.timers.dynu-monitor = {
|
||||||
|
description = "Run Dynu IP monitor periodically";
|
||||||
|
timerConfig = {
|
||||||
|
OnBootSec = "5min";
|
||||||
|
OnUnitActiveSec = "30min";
|
||||||
|
AccuracySec = "1min";
|
||||||
|
Persistent = true;
|
||||||
|
};
|
||||||
|
wantedBy = [ "timers.target" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,118 @@
|
|||||||
|
# 🌐 Homeserver Core Environment Secrets & Systemd service configuration
|
||||||
|
# This NixOS module manages secrets and the systemd lifecycle for the core homeserver stack.
|
||||||
|
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
# Declarative user database for Authelia
|
||||||
|
autheliaUsers = {
|
||||||
|
kiskaadee = {
|
||||||
|
displayName = "kiskaadee";
|
||||||
|
email = "fcortesbio@gmail.com";
|
||||||
|
groups = [ "admins" "dev" ];
|
||||||
|
passwordPlaceholder = config.sops.placeholder."authelia/users/kiskaadee/password_hash";
|
||||||
|
};
|
||||||
|
misa = {
|
||||||
|
displayName = "misa";
|
||||||
|
email = "icdf0728@gmail.com";
|
||||||
|
groups = [ "users" ];
|
||||||
|
passwordPlaceholder = config.sops.placeholder."authelia/users/misa/password_hash";
|
||||||
|
};
|
||||||
|
valenvg = {
|
||||||
|
displayName = "valenvg";
|
||||||
|
email = "vegavalentina069@gmail.com";
|
||||||
|
groups = [ "users" ];
|
||||||
|
passwordPlaceholder = config.sops.placeholder."authelia/users/valenvg/password_hash";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
renderUser = username: user: " " + username + ":\n"
|
||||||
|
+ " displayname: \"" + user.displayName + "\"\n"
|
||||||
|
+ " password: '" + user.passwordPlaceholder + "'\n"
|
||||||
|
+ " email: \"" + user.email + "\"\n"
|
||||||
|
+ " groups:\n"
|
||||||
|
+ (lib.concatMapStringsSep "\n" (g: " - " + g) user.groups);
|
||||||
|
|
||||||
|
renderedUsersYaml = "users:\n" + (lib.concatStringsSep "\n\n" (lib.mapAttrsToList renderUser autheliaUsers)) + "\n";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# Define the keys to decrypt from secrets.yaml
|
||||||
|
sops.secrets = lib.genAttrs [
|
||||||
|
"dynu/api_key"
|
||||||
|
"traefik/acme_email"
|
||||||
|
"authelia/session_secret"
|
||||||
|
"authelia/storage_encryption_key"
|
||||||
|
"authelia/jwt_secret"
|
||||||
|
"authelia/users/kiskaadee/password_hash"
|
||||||
|
"authelia/users/misa/password_hash"
|
||||||
|
"authelia/users/valenvg/password_hash"
|
||||||
|
] (name: { owner = "kiskaadee"; });
|
||||||
|
|
||||||
|
# Generate the unified environment file at runtime in /run/secrets/homeserver.env
|
||||||
|
sops.templates."homeserver.env" = {
|
||||||
|
owner = "kiskaadee";
|
||||||
|
content = lib.generators.toKeyValue {} {
|
||||||
|
DOMAIN = "roadtotech.me";
|
||||||
|
DOCKER_API_VERSION = "1.40";
|
||||||
|
DYNU_API_KEY = config.sops.placeholder."dynu/api_key";
|
||||||
|
ACME_EMAIL = config.sops.placeholder."traefik/acme_email";
|
||||||
|
AUTHELIA_SESSION_SECRET = config.sops.placeholder."authelia/session_secret";
|
||||||
|
AUTHELIA_STORAGE_ENCRYPTION_KEY = config.sops.placeholder."authelia/storage_encryption_key";
|
||||||
|
AUTHELIA_IDENTITY_VALIDATION_RESET_PASSWORD_JWT_SECRET = config.sops.placeholder."authelia/jwt_secret";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Generate the declarative Authelia user database file at runtime in /run/secrets/users.yml
|
||||||
|
sops.templates."users.yml" = {
|
||||||
|
owner = "kiskaadee";
|
||||||
|
content = renderedUsersYaml;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Define the declarative systemd service to manage the homeserver container stack
|
||||||
|
systemd.services.homeserver-core = {
|
||||||
|
description = "Homeserver Core Stack (Traefik, Authelia, Homepage, etc.)";
|
||||||
|
after = [ "network-online.target" "docker.service" ];
|
||||||
|
wants = [ "network-online.target" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
RemainAfterExit = true;
|
||||||
|
WorkingDirectory = "/home/kiskaadee/Core";
|
||||||
|
ExecStart = "${pkgs.docker-compose}/bin/docker-compose --env-file ${config.sops.templates."homeserver.env".path} up -d --remove-orphans";
|
||||||
|
ExecStop = "${pkgs.docker-compose}/bin/docker-compose down";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Declarative Dynamic GitOps Webhook Service (Internal Port 9000)
|
||||||
|
systemd.services.homelab-gitops = {
|
||||||
|
description = "Dynamic Homelab GitOps Webhook Dispatcher";
|
||||||
|
after = [ "network-online.target" "docker.service" ];
|
||||||
|
wants = [ "network-online.target" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
|
path = with pkgs; [ git docker docker-compose python3 coreutils bash openssh ];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
User = "kiskaadee";
|
||||||
|
WorkingDirectory = "/home/kiskaadee/Core";
|
||||||
|
ExecStart = "${pkgs.webhook}/bin/webhook -hooks ${pkgs.writeText "hooks.json" (builtins.toJSON [
|
||||||
|
{
|
||||||
|
id = "deploy";
|
||||||
|
execute-command = "/home/kiskaadee/Core/scripts/gitops_dispatcher.py";
|
||||||
|
pass-arguments-to-command = [
|
||||||
|
{ source = "entire-payload"; }
|
||||||
|
];
|
||||||
|
command-working-directory = "/home/kiskaadee/Core";
|
||||||
|
response-message = "Deployment payload dispatched successfully.";
|
||||||
|
}
|
||||||
|
])} -port 9000 -verbose";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = "5s";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Open ports in the firewall for Traefik, Gitea SSH, and GitOps Webhook Receiver
|
||||||
|
networking.firewall.allowedTCPPorts = [ 80 443 2223 9000 ];
|
||||||
|
}
|
||||||
@@ -0,0 +1,212 @@
|
|||||||
|
# 🐚 Server Shell Configuration
|
||||||
|
# Declarative bash environment tailored for the headless homelab server.
|
||||||
|
# This replaces the laptop-inherited ~/.bashrc with a clean, server-appropriate profile.
|
||||||
|
# Delivered via /etc/bashrc — no Home Manager required.
|
||||||
|
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# ── Shell-integrated programs ─────────────────────────────────────────────────
|
||||||
|
# These handle both installation and bash hook injection automatically
|
||||||
|
programs.zoxide.enable = true; # smart cd with bash init wired into /etc/bashrc
|
||||||
|
programs.starship.enable = true; # cross-shell prompt
|
||||||
|
programs.direnv.enable = true; # per-project env vars via .envrc files
|
||||||
|
|
||||||
|
# ── Additional shell packages ─────────────────────────────────────────────────
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
fastfetch # system info dashboard on shell entry
|
||||||
|
fzf # fuzzy finder (keybindings handled in interactiveShellInit)
|
||||||
|
bat # syntax-highlighted cat
|
||||||
|
qpdf # PDF decryption (used by pdf_dc function)
|
||||||
|
];
|
||||||
|
|
||||||
|
# ── Bash configuration ────────────────────────────────────────────────────────
|
||||||
|
programs.bash = {
|
||||||
|
shellAliases = {
|
||||||
|
# Traversal
|
||||||
|
".." = "cd ..";
|
||||||
|
"..." = "cd ../..";
|
||||||
|
"...." = "cd ../../..";
|
||||||
|
"....." = "cd ../../../..";
|
||||||
|
|
||||||
|
# eza-based directory listing
|
||||||
|
ls = "eza --group-directories-first --header --icons";
|
||||||
|
la = "eza -a";
|
||||||
|
ll = "eza -l";
|
||||||
|
lla = "eza -la";
|
||||||
|
lt = "eza --tree";
|
||||||
|
# zoxide interactive jump with eza preview
|
||||||
|
zi = "zoxide query -i --preview 'eza --tree --level 2 --color=always {}'";
|
||||||
|
|
||||||
|
# Git shortcuts
|
||||||
|
ga = "git add";
|
||||||
|
gc = "git commit -m";
|
||||||
|
gp = "git push";
|
||||||
|
gpl = "git pull";
|
||||||
|
gs = "git status";
|
||||||
|
gst = "git stash";
|
||||||
|
gsp = "git stash && git pull";
|
||||||
|
gfo = "git fetch origin";
|
||||||
|
gcheck = "git checkout";
|
||||||
|
gadc = "git add -A && git diff --staged";
|
||||||
|
|
||||||
|
# Editor & system
|
||||||
|
v = "nvim";
|
||||||
|
ff = "fastfetch --logo none";
|
||||||
|
reload = "exec bash";
|
||||||
|
pgoog = "ping google.com -c 3";
|
||||||
|
wifi = "nmtui";
|
||||||
|
# NixOS rebuild targeting this flake
|
||||||
|
nix-switch = "sudo nixos-rebuild switch --flake ~/Core#server";
|
||||||
|
};
|
||||||
|
|
||||||
|
interactiveShellInit = ''
|
||||||
|
# ── User PATH ────────────────────────────────────────────────────────────
|
||||||
|
export PATH="$HOME/Core/scripts:$HOME/.local/bin:$HOME/.cargo/bin:$PATH"
|
||||||
|
|
||||||
|
# ── History ───────────────────────────────────────────────────────────────
|
||||||
|
HISTFILESIZE=100000
|
||||||
|
HISTSIZE=10000
|
||||||
|
shopt -s histappend
|
||||||
|
shopt -s extglob
|
||||||
|
shopt -s globstar
|
||||||
|
shopt -s checkjobs
|
||||||
|
|
||||||
|
# ── Readline keybindings ─────────────────────────────────────────────────
|
||||||
|
if [[ -n "$BASH_VERSION" ]]; then
|
||||||
|
bind '"\C-w": "\eb\ed"' 2>/dev/null # Ctrl+W: delete word backward
|
||||||
|
bind '"\e[3;5~": kill-word' 2>/dev/null # Ctrl+Delete: delete word forward
|
||||||
|
bind '"\e\x7f": backward-kill-word' 2>/dev/null
|
||||||
|
bind '"\e\b": backward-kill-word' 2>/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ── fzf shell integration ─────────────────────────────────────────────────
|
||||||
|
if command -v fzf &>/dev/null; then
|
||||||
|
eval "$(fzf --bash)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ── Shell entry dashboard ─────────────────────────────────────────────────
|
||||||
|
fastfetch --logo none
|
||||||
|
|
||||||
|
# ── Git workflow functions ────────────────────────────────────────────────
|
||||||
|
|
||||||
|
# gacp: Stage all, commit with message, and push to current branch
|
||||||
|
gacp() {
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
echo "Usage: gacp <commit-message>"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
git add -A
|
||||||
|
git commit -m "$1"
|
||||||
|
local branch_name
|
||||||
|
branch_name=$(git branch --show-current)
|
||||||
|
git push origin "$branch_name"
|
||||||
|
echo "Pushed to origin/$branch_name"
|
||||||
|
}
|
||||||
|
|
||||||
|
# gitignore: Append pattern(s) to .gitignore and auto-commit
|
||||||
|
gitignore() {
|
||||||
|
if [ $# -eq 0 ]; then
|
||||||
|
echo "Usage: gitignore <pattern> [pattern...]"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
local GIT_ROOT
|
||||||
|
GIT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
|
||||||
|
if [ -z "$GIT_ROOT" ]; then
|
||||||
|
echo "Error: Not a Git repository."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
local GIT_IGNORE_FILE="$GIT_ROOT/.gitignore"
|
||||||
|
[ -f "$GIT_IGNORE_FILE" ] || touch "$GIT_IGNORE_FILE"
|
||||||
|
if [ -s "$GIT_IGNORE_FILE" ] && [ "$(tail -c1 "$GIT_IGNORE_FILE" | wc -l)" -eq 0 ]; then
|
||||||
|
echo "" >> "$GIT_IGNORE_FILE"
|
||||||
|
fi
|
||||||
|
local added_count=0 commit_msg_list=""
|
||||||
|
for pattern in "$@"; do
|
||||||
|
if rg -Fxq "$pattern" "$GIT_IGNORE_FILE" 2>/dev/null; then
|
||||||
|
echo "Skipping '$pattern' (already in .gitignore)"
|
||||||
|
else
|
||||||
|
echo "$pattern" >> "$GIT_IGNORE_FILE"
|
||||||
|
echo "Added '$pattern'"
|
||||||
|
(( added_count++ ))
|
||||||
|
commit_msg_list+="$pattern, "
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ "$added_count" -gt 0 ]; then
|
||||||
|
commit_msg_list="''${commit_msg_list%, }"
|
||||||
|
git add "$GIT_IGNORE_FILE"
|
||||||
|
git commit -m "Add to .gitignore: $commit_msg_list"
|
||||||
|
git push
|
||||||
|
else
|
||||||
|
echo "No new patterns were added."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# ── PDF utilities ─────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
# pdf_dc: Decrypt a password-protected PDF
|
||||||
|
# Reads password from /run/secrets/pdf_decrypt_password if not supplied
|
||||||
|
pdf_dc() {
|
||||||
|
local secret_file="/run/secrets/pdf_decrypt_password"
|
||||||
|
local input_file="$1"
|
||||||
|
local password="$2"
|
||||||
|
if [[ -z "$password" ]] && [[ -f "$secret_file" ]]; then
|
||||||
|
password=$(cat "$secret_file")
|
||||||
|
fi
|
||||||
|
if [[ -z "$password" ]]; then
|
||||||
|
echo "Error: No password provided and default secret not found" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
if [[ ! -f "$input_file" ]]; then
|
||||||
|
echo "Error: Input file '$input_file' not found" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
local output_file="''${input_file%.pdf}_decrypted.pdf"
|
||||||
|
if [[ -f "$output_file" ]]; then
|
||||||
|
read -rp "Output '$output_file' exists. Overwrite? (y/n): " overwrite
|
||||||
|
[[ "$overwrite" != "y" ]] && { echo "Operation cancelled."; return 1; }
|
||||||
|
fi
|
||||||
|
echo "Decrypting $input_file..."
|
||||||
|
if qpdf --password="$password" --decrypt "$input_file" "$output_file"; then
|
||||||
|
echo "✅ Decryption successful: $output_file"
|
||||||
|
else
|
||||||
|
local exit_code=$?
|
||||||
|
echo "❌ Decryption failed (qpdf exit code: $exit_code)"
|
||||||
|
return "$exit_code"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# ── Fuzzy directory navigation ────────────────────────────────────────────
|
||||||
|
|
||||||
|
# Internal: fuzzy-select a subdirectory with eza preview
|
||||||
|
_fuzzy_select_dir() {
|
||||||
|
local base="$1" query="$2" max_depth="''${3:-2}"
|
||||||
|
[[ -d "$base" ]] || return 1
|
||||||
|
(echo "$base"; fd . "$base" --type d --mindepth 1 --max-depth "$max_depth" 2>/dev/null) |
|
||||||
|
fzf --query="$query" --select-1 --exit-0 \
|
||||||
|
--preview 'eza --tree --level 2 --icons=always --color=always {}' \
|
||||||
|
--preview-window="right:50%:rounded"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Internal: cd into a directory
|
||||||
|
_jump_to() {
|
||||||
|
local dir="$1"
|
||||||
|
[[ -d "$dir" ]] || return 1
|
||||||
|
cd "$dir" || return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# jump: Fuzzy-select and enter a subdirectory under a base path
|
||||||
|
jump() {
|
||||||
|
local dir
|
||||||
|
dir=$(_fuzzy_select_dir "$1" "$2" "''${3:-2}") || return
|
||||||
|
_jump_to "$dir"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Shorthand jump targets
|
||||||
|
prj() { jump "$HOME/Projects" "$1"; } # workspace projects
|
||||||
|
dep() { jump "$HOME/Deployments" "$1"; } # deployment directories
|
||||||
|
med() { jump "/media" "$1"; } # mounted media storage
|
||||||
|
core() { jump "$HOME/Core" "$1"; } # homelab-core subdirectories
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
# 🌐 Traefik Deployments Environment Secrets configuration
|
||||||
|
# This NixOS module manages secrets and environment variables for the unified apps in /traefik-deployments
|
||||||
|
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# Define the keys to decrypt from secrets.yaml (avoiding repeating the owner boilerplate)
|
||||||
|
sops.secrets = lib.genAttrs [
|
||||||
|
"learning/turso_db_url"
|
||||||
|
"learning/turso_auth_token"
|
||||||
|
"mongo/root_username"
|
||||||
|
"mongo/root_password"
|
||||||
|
"ollama/api_key"
|
||||||
|
"postgres/user"
|
||||||
|
"postgres/password"
|
||||||
|
"postgres/db"
|
||||||
|
"gitea/runner_token"
|
||||||
|
] (name: { owner = "kiskaadee"; });
|
||||||
|
|
||||||
|
# Generate the unified environment file at runtime in /run/secrets/traefik-deployments.env
|
||||||
|
sops.templates."traefik-deployments.env" = {
|
||||||
|
owner = "kiskaadee";
|
||||||
|
content = lib.generators.toKeyValue {} {
|
||||||
|
# --- Core / Infrastructure Settings ---
|
||||||
|
PROXY_NETWORK = "proxy-net";
|
||||||
|
CERT_RESOLVER = "myresolver";
|
||||||
|
DOMAIN_SUFFIX = "roadtotech.me";
|
||||||
|
|
||||||
|
# --- Dashboard & Landing ---
|
||||||
|
DASHBOARD_DOMAIN = "dashboard.roadtotech.me";
|
||||||
|
LANDING_DOMAIN = "roadtotech.me";
|
||||||
|
|
||||||
|
# --- Docs ---
|
||||||
|
DOCS_DOMAIN = "docs.roadtotech.me";
|
||||||
|
DOCS_PROJECT_PATH = "/home/kiskaadee/Brain";
|
||||||
|
|
||||||
|
# --- Excalidraw ---
|
||||||
|
EXCALIDRAW_DOMAIN = "excalidraw.roadtotech.me";
|
||||||
|
|
||||||
|
# --- Gitea ---
|
||||||
|
GITEA_DOMAIN = "gitea.roadtotech.me";
|
||||||
|
GITEA_SSH_DOMAIN = "gitea.roadtotech.me";
|
||||||
|
GITEA_SSH_PORT = "2223";
|
||||||
|
GITEA_AUTH_MIDDLEWARE = "https-redirect@docker";
|
||||||
|
GITEA_RUNNER_TOKEN = config.sops.placeholder."gitea/runner_token";
|
||||||
|
|
||||||
|
# --- Jellyfin ---
|
||||||
|
JELLYFIN_SERVICE_NAME = "jellyfin";
|
||||||
|
JELLYFIN_CONTAINER_NAME = "jellyfin";
|
||||||
|
JELLYFIN_IMAGE_TAG = "latest";
|
||||||
|
JELLYFIN_DOMAIN = "jellyfin.roadtotech.me";
|
||||||
|
JELLYFIN_TZ = "UTC";
|
||||||
|
JELLYFIN_PUID = "1000";
|
||||||
|
JELLYFIN_PGID = "1000";
|
||||||
|
JELLYFIN_MEDIA_PATH = "/media";
|
||||||
|
JELLYFIN_HTTP_ENTRYPOINT = "web";
|
||||||
|
JELLYFIN_HTTPS_ENTRYPOINT = "websecure";
|
||||||
|
JELLYFIN_RATE_LIMIT_AVG = "100";
|
||||||
|
JELLYFIN_RATE_LIMIT_BURST = "50";
|
||||||
|
|
||||||
|
# --- Learning Dashboard ---
|
||||||
|
LEARNING_SERVICE_NAME = "learning-hub";
|
||||||
|
LEARNING_DOMAIN = "learning.roadtotech.me";
|
||||||
|
LEARNING_APP_PORT = "8000";
|
||||||
|
LEARNING_SOCKET_PROXY_NETWORK = "socket-net";
|
||||||
|
LEARNING_DOCKER_HOST = "tcp://socket-proxy:2375";
|
||||||
|
TURSO_DATABASE_URL = config.sops.placeholder."learning/turso_db_url";
|
||||||
|
TURSO_AUTH_TOKEN = config.sops.placeholder."learning/turso_auth_token";
|
||||||
|
|
||||||
|
# --- Mermaid ---
|
||||||
|
MERMAID_DOMAIN = "mermaid.roadtotech.me";
|
||||||
|
MERMAID_SERVICE_NAME = "mermaid";
|
||||||
|
|
||||||
|
# --- Minecraft ---
|
||||||
|
MINECRAFT_DOMAIN = "minecraft.roadtotech.me";
|
||||||
|
|
||||||
|
# --- MongoDB ---
|
||||||
|
MONGO_ROOT_USERNAME = config.sops.placeholder."mongo/root_username";
|
||||||
|
MONGO_ROOT_PASSWORD = config.sops.placeholder."mongo/root_password";
|
||||||
|
MONGO_DOMAIN = "mongodb.roadtotech.me";
|
||||||
|
|
||||||
|
# --- PostgreSQL ---
|
||||||
|
POSTGRES_USER = config.sops.placeholder."postgres/user";
|
||||||
|
POSTGRES_PASSWORD = config.sops.placeholder."postgres/password";
|
||||||
|
POSTGRES_DB = config.sops.placeholder."postgres/db";
|
||||||
|
POSTGRES_DOMAIN = "pgsql.roadtotech.me";
|
||||||
|
|
||||||
|
# --- Ollama ---
|
||||||
|
OLLAMA_DOMAIN = "ollama.roadtotech.me";
|
||||||
|
OLLAMA_API_KEY = config.sops.placeholder."ollama/api_key";
|
||||||
|
OLLAMA_REPLICAS = "1";
|
||||||
|
OLLAMA_DATA_VOLUME = "ollama_data";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# General configuration
|
||||||
|
syslog=no
|
||||||
|
pid=/run/ddclient/ddclient.pid
|
||||||
|
cache=/var/lib/ddclient/ddclient.cache
|
||||||
|
usev4=webv4
|
||||||
|
|
||||||
|
# Provider definition using credentials decrypted at runtime
|
||||||
|
protocol=dyndns2
|
||||||
|
server=api.dynu.com
|
||||||
|
login=@dynu_user@
|
||||||
|
password=@dynu_password@
|
||||||
|
@dynu_domain@
|
||||||
@@ -0,0 +1,204 @@
|
|||||||
|
"""
|
||||||
|
Dynu DDNS Smart IP Change Monitor and Updater.
|
||||||
|
|
||||||
|
This script determines the current public IPv4 address by querying multiple
|
||||||
|
external resolvers sequentially. It compares the discovered IP against the last
|
||||||
|
recorded successful IP in a local history log. If a change is detected, it
|
||||||
|
triggers the `ddclient.service` on-demand to perform the DNS record update.
|
||||||
|
|
||||||
|
This local-first state verification prevents making redundant API requests to
|
||||||
|
the DNS provider, avoiding rate-limiting, IP bans, or API abuse flags.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
import urllib.error
|
||||||
|
import urllib.request
|
||||||
|
from datetime import datetime, timezone
|
||||||
|
|
||||||
|
# History file location storing the transition log of public IP states.
|
||||||
|
# Defaults to a state directory managed securely by the systemd service unit.
|
||||||
|
HISTORY_FILE = os.environ.get("HISTORY_FILE", "/var/lib/dynu/ip_history.jsonl")
|
||||||
|
|
||||||
|
# Fallback sequence of external services to discover the public WAN IP.
|
||||||
|
PROVIDERS = [
|
||||||
|
"https://api.ipify.org",
|
||||||
|
"https://ifconfig.me/ip",
|
||||||
|
"https://icanhazip.com",
|
||||||
|
"https://wtfismyip.com/text"
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def is_valid_public_ipv4(ip):
|
||||||
|
"""
|
||||||
|
Validates that a string is a properly formatted public IPv4 address.
|
||||||
|
|
||||||
|
This function excludes standard private, loopback, link-local, and CGNAT
|
||||||
|
blocks to avoid recording temporary, local, or invalid network states.
|
||||||
|
"""
|
||||||
|
match = re.match(r"^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$", ip)
|
||||||
|
if not match:
|
||||||
|
return False
|
||||||
|
octets = [int(x) for x in match.groups()]
|
||||||
|
if any(x > 255 for x in octets):
|
||||||
|
return False
|
||||||
|
a, b, _c, _d = octets
|
||||||
|
|
||||||
|
# RFC 1918 Private ranges: 10.0.0.0/8, 192.168.0.0/16, 172.16.0.0/12
|
||||||
|
if a == 10:
|
||||||
|
return False
|
||||||
|
if a == 192 and b == 168:
|
||||||
|
return False
|
||||||
|
if a == 172 and 16 <= b <= 31:
|
||||||
|
return False
|
||||||
|
|
||||||
|
# Carrier-Grade NAT (CGNAT) RFC 6598: 100.64.0.0/10
|
||||||
|
if a == 100 and 64 <= b <= 127:
|
||||||
|
return False
|
||||||
|
|
||||||
|
# Loopback address range: 127.0.0.0/8
|
||||||
|
if a == 127:
|
||||||
|
return False
|
||||||
|
|
||||||
|
# Link-local addresses: 169.254.0.0/16
|
||||||
|
return not (a == 169 and b == 254)
|
||||||
|
|
||||||
|
|
||||||
|
def get_public_ip():
|
||||||
|
"""
|
||||||
|
Queries public IP providers until a valid public IPv4 is returned.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
str: The validated public IP string, or None if all providers fail.
|
||||||
|
"""
|
||||||
|
errors = []
|
||||||
|
for provider in PROVIDERS:
|
||||||
|
try:
|
||||||
|
req = urllib.request.Request(
|
||||||
|
provider,
|
||||||
|
headers={
|
||||||
|
'User-Agent': 'Mozilla/5.0 (NixOS WAN Monitor)'
|
||||||
|
}
|
||||||
|
)
|
||||||
|
# Fetch with 5s timeout to avoid hanging the systemd service
|
||||||
|
with urllib.request.urlopen(req, timeout=5) as response:
|
||||||
|
ip = response.read().decode('utf-8').strip()
|
||||||
|
if is_valid_public_ipv4(ip):
|
||||||
|
return ip
|
||||||
|
else:
|
||||||
|
errors.append(f"{provider}: invalid public IPv4 '{ip}'")
|
||||||
|
except (urllib.error.URLError, OSError, ValueError) as e:
|
||||||
|
errors.append(f"{provider}: {e!s}")
|
||||||
|
|
||||||
|
print(
|
||||||
|
f"Error: All IP discovery providers failed. Details: {errors}",
|
||||||
|
file=sys.stderr
|
||||||
|
)
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def get_last_recorded_ip():
|
||||||
|
"""
|
||||||
|
Reads the history log to locate the last successful IP address.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
str: The last successfully updated IP, or None if no log exists yet.
|
||||||
|
"""
|
||||||
|
if not os.path.exists(HISTORY_FILE):
|
||||||
|
return None
|
||||||
|
try:
|
||||||
|
with open(HISTORY_FILE, "r") as f:
|
||||||
|
lines = f.readlines()
|
||||||
|
if not lines:
|
||||||
|
return None
|
||||||
|
# Search backwards to find the most recent successful transition
|
||||||
|
for line in reversed(lines):
|
||||||
|
try:
|
||||||
|
entry = json.loads(line)
|
||||||
|
if entry.get("status") == "success":
|
||||||
|
return entry.get("ip")
|
||||||
|
except json.JSONDecodeError:
|
||||||
|
continue
|
||||||
|
except OSError as e:
|
||||||
|
print(f"Warning: Failed to read history file: {e}", file=sys.stderr)
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def record_ip(ip, status, details=None):
|
||||||
|
"""
|
||||||
|
Appends a new event entry into the JSONLines history registry.
|
||||||
|
"""
|
||||||
|
os.makedirs(os.path.dirname(HISTORY_FILE), exist_ok=True)
|
||||||
|
entry = {
|
||||||
|
"timestamp": datetime.now(tz=timezone.utc).isoformat(),
|
||||||
|
"ip": ip,
|
||||||
|
"status": status
|
||||||
|
}
|
||||||
|
if details:
|
||||||
|
entry["details"] = details
|
||||||
|
try:
|
||||||
|
with open(HISTORY_FILE, "a") as f:
|
||||||
|
f.write(json.dumps(entry) + "\n")
|
||||||
|
except OSError as e:
|
||||||
|
print(f"Error: Failed to write to history file: {e}", file=sys.stderr)
|
||||||
|
|
||||||
|
|
||||||
|
def trigger_ddclient():
|
||||||
|
"""
|
||||||
|
Invokes the systemd service unit for `ddclient` on-demand.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
tuple: (bool, str) representing (success_boolean, error_details_string)
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
# Run ddclient as a one-shot activation via systemd to perform API call
|
||||||
|
res = subprocess.run(
|
||||||
|
["systemctl", "start", "ddclient.service"],
|
||||||
|
capture_output=True,
|
||||||
|
text=True,
|
||||||
|
check=False,
|
||||||
|
)
|
||||||
|
if res.returncode == 0:
|
||||||
|
return True, None
|
||||||
|
else:
|
||||||
|
err_msg = (
|
||||||
|
f"systemctl exited with {res.returncode}: "
|
||||||
|
f"{res.stderr.strip()}"
|
||||||
|
)
|
||||||
|
return False, err_msg
|
||||||
|
except (OSError, subprocess.SubprocessError) as e:
|
||||||
|
return False, str(e)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
"""
|
||||||
|
Orchestrator logic for DDNS state management.
|
||||||
|
"""
|
||||||
|
current_ip = get_public_ip()
|
||||||
|
if not current_ip:
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
last_ip = get_last_recorded_ip()
|
||||||
|
if current_ip == last_ip:
|
||||||
|
# IP matches last recorded working IP; do nothing to conserve quota
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
|
print(f"IP rotation detected! Old: {last_ip}, New: {current_ip}")
|
||||||
|
|
||||||
|
# Trigger ddclient to perform the DNS record update
|
||||||
|
success, error_msg = trigger_ddclient()
|
||||||
|
if success:
|
||||||
|
print("Dynu DDNS update via ddclient triggered successfully.")
|
||||||
|
record_ip(current_ip, "success")
|
||||||
|
else:
|
||||||
|
err_msg = f"Error: Failed to trigger ddclient update: {error_msg}"
|
||||||
|
print(err_msg, file=sys.stderr)
|
||||||
|
record_ip(current_ip, "failed_update", details=error_msg)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
authelia:
|
||||||
|
session_secret: ENC[AES256_GCM,data:TmujJ9I51cQrzRMcvFkhFnG1CICebOM332NUTwXSj33niFdrV3xfHWR3h83/WcNk+M/i0AjcFtZ7fRYNW5VV2766p2BAfsaihSN8yQPrsQRNPyQKvSgij2xWL/B5I1a7NQGRh7xX6yiQYqaPzrwKnlcv8kmKp8aFPlkdmWYOCPc=,iv:Pcj6yu1MvZBJ0VPfuEO4RiTiE5SOULI/jGAz8dy/X4g=,tag:firz8cjG9HP8HEgKM4c53Q==,type:str]
|
||||||
|
storage_encryption_key: ENC[AES256_GCM,data:ycsfhh9cAsIbSEVaPvCH8ky0t+zayLtI6NVLcb+v2HIJMYSqD8eXu7JCvp5E0u1PkGTyaAoatXtcdChb2ABEiUNeqlOPXciF4ED+4yFAXftfMKy/M4AAYgp9jBA1v8JsE5mfBEOfmnBWV5SwGSaHBcQgUoJubKqcODPfHOmkKwg=,iv:1bgvgcClI+2VG6wXa5el5jfOrkCx+bj33VYiFdA1gas=,tag:0n7nJaZomtllFzSH2+Z8yw==,type:str]
|
||||||
|
jwt_secret: ENC[AES256_GCM,data:C1FnoRi49PSaIZNp+SAS6Q5+odYwai75OR4UfvGx1Jk8wb4nVDUASpaOgm7ZFJysTX4WjuQi99PYyG5GshlHoJ5dVbLSFpEq7MSSiY8tZA2PqnHmIODNYARfFw6lB7udPjz8ANyU2UcrnwRKXnDD+T2Pa1uL9joW5rg7vWZlRks=,iv:IDZ2/wbmCPoR14b1imZrTJR5LuQp6V91tcZ/Z5Znl0w=,tag:d0UQ49QcEqgD+PCIBoOJ7Q==,type:str]
|
||||||
|
users:
|
||||||
|
kiskaadee:
|
||||||
|
password_hash: ENC[AES256_GCM,data:/Sz5Z5YH2+ksjLw60/PkL/P3PJgYR4FEHV3CFlLShP1RASpJ+b3c8ywXlkUEKqNacfIkgaZsYsIpeNwApEYFt+4QLpDOPrX1wyF1sFnD5bDaeKJkV7wVgDO18D6LWJPX4A==,iv:TivrHulGSMtqDtWYyFHL36MHzLCymmceH0ptzF+dvBk=,tag:WQce4BeqHg4jS30gHSqZMw==,type:str]
|
||||||
|
misa:
|
||||||
|
password_hash: ENC[AES256_GCM,data:pYNPWzT1m+uYjrz8ZMWROz+q7qcp6+TaYsVmXT5899ItWVX5S2wF0cz08uTu3fveF3iHp27IWOwd3TBpmc0xmkYyeY31LCCMXrtRhuqVzfshVy29jHI/QNgeH4T3kU6UVg==,iv:7kS2+OiUWlApeReOunbJ1i4nYFpl9dcFryjTIOLUEe0=,tag:JYiV8/NJSzetvyzAzWMnWg==,type:str]
|
||||||
|
valenvg:
|
||||||
|
password_hash: ENC[AES256_GCM,data:GYf6/rvz2WK5w2T0usPbAP8LQY8EqOKPcFQJrHVEjjN/dVaQqg9IMm5cA0+dyYuJpW/+bdALdIDLjSYIFF3L7KgLij0jiIJhJxxV+7e1HIto+WhoavKBNfv5OREmW9cM7Q==,iv:zZeAL5v0YOHGca8ZebQirucUA7UtR5gnucKVfNJSzTc=,tag:cgm1qBzQKmpD5ttZKWHHjw==,type:str]
|
||||||
|
traefik:
|
||||||
|
acme_email: ENC[AES256_GCM,data:U2IPYioGlfgSpfZy5E+2+VM0iXQ=,iv:zQ5Txq9H7mF7GcaZfyPPjSQFKa0736/DI7Y4XARMFqM=,tag:7Q4YN9OPA1rRVpXuapewQQ==,type:str]
|
||||||
|
dynu:
|
||||||
|
api_key: ENC[AES256_GCM,data:f4dAZjCplklE08kll1yGuYYYDKKTVEwvSL0d6fM9K+g=,iv:xjR/5lNfRXxTPWJ+WM+/qzZGWTMf7iNua/FoGwTYXTg=,tag:PuZZWUJ+WoZVcWDVKwxM9g==,type:str]
|
||||||
|
user: ENC[AES256_GCM,data:RdKa9JmnllYQ,iv:2xW8vvzWvKp1rEV8G9fp+Jae38Wr3+lHAQ15htP3Sjs=,tag:tts/zHJqoBoK6vVnt7ho3A==,type:str]
|
||||||
|
domain: ENC[AES256_GCM,data:Towv0BFeoXhIaP/pzA==,iv:yzMv6t/Z3NEiE7t5u9lVA5siy5APsWHpdPvqYI8EmQU=,tag:8YTWCtA/sshOOLaHOMH+nw==,type:str]
|
||||||
|
password: ENC[AES256_GCM,data:oF8O3S5n2fuSFpgu8RVa0SwS4U4yYl/I7EMRTt640SQ=,iv:x0npliyj1cZocDce3hofvJYuQbXGOu+EU04GwR48cD4=,tag:ddNmxWp1uL2POW5mXdqfVQ==,type:str]
|
||||||
|
postgres:
|
||||||
|
user: ENC[AES256_GCM,data:ifJ3KSf6E6EQ,iv:Ryu/fce3mMRItSoRmwC6/HFWBebT3UXAwccfKMM+B1s=,tag:53ct7ZiF6UmklvPw0oeajw==,type:str]
|
||||||
|
password: ENC[AES256_GCM,data:wbLdF/1RZwL6fY/IXJdT,iv:5Xk0B0qtDh0hoAKDtwpzwKdhQHhsLvlsnHiwMJP9VeE=,tag:BGlHuEHp0YucoJopg1rzBQ==,type:str]
|
||||||
|
db: ENC[AES256_GCM,data:zBgGgioMBlVhUw==,iv:4X86eXVILuf98st1po5ipvEUDE2UG9jEPOso7CGR48k=,tag:ZXng+qF6/PUjP6D+Y/AC6w==,type:str]
|
||||||
|
mongo:
|
||||||
|
root_username: ENC[AES256_GCM,data:ImHe4j6Botsc,iv:dEXIA746kuh9//SLQO+RfDxIpObMMPZ2wfjgiwouS9Q=,tag:sD2uZKtwgbOgnKffv7DD4g==,type:str]
|
||||||
|
root_password: ENC[AES256_GCM,data:hETEsUQ+EMnV2rN+ZoOd,iv:8Zt1RLAOm6CCt8W/ie1IC+3PXs2qGzcLCTGTjNxWkI0=,tag:Q9iowfgg5JjaMekRCdUizA==,type:str]
|
||||||
|
ollama:
|
||||||
|
api_key: ENC[AES256_GCM,data:D2KSzK6WP9Xstx2l5A3I,iv:DbEnYwhrcVMWPipwfGQ1cvUOhZuB4Q64vCDcutb24Nw=,tag:V4KIOKM7in1i8rTNDLIzZA==,type:str]
|
||||||
|
gitea:
|
||||||
|
runner_token: ENC[AES256_GCM,data:aFk3l8rah+lj5iNVDT2RXF2Ie5aqwcBUi9UPjsWv0aRM+i97kYtybA==,iv:pkJpmgt5goEHotx3sCbw6jBy8detOwhaE77yO+NTQ5g=,tag:nLVNSwH1bfAq+gduwgRJuQ==,type:str]
|
||||||
|
learning:
|
||||||
|
turso_db_url: ENC[AES256_GCM,data:DveoFqwgimUHJv48Sozh2XqT7Ha9DeX3VAslT7SrqSVHab5RPlEujF+eIHyvAUiE81A=,iv:PgWZMty5hBUsmRJW85xilcvIMO/j54WY249Jsw6LfiM=,tag:osYPQc/Q9734L0FUo9hOCQ==,type:str]
|
||||||
|
turso_auth_token: ENC[AES256_GCM,data:lRdFDrsKWv90QSvNvYjqp07jU7DcWfrNlpg0bVljbOizixgstnFF70jjafN/QK4kId0nSJTx1DFlsTy7vG8+M00+UYl8SWDW7uTq/Ll1UGkaYinkhKFLNKUHXg5SUTfH3UA+nPBlZSNoZe6kdBgrt35TuV78lI/eUkxpVOI3D/70B6BP2DR4zmb70GztcxUY3e7xkGtVkCbyJd+BY8YOep/MgYvYg512LjESFwL/rJtJBYnh8XtQMcIDVDxRO5hGiy66xpXE4IC3wTPr4+/ZWS00H6VQccUcL0QVEVBkq+c9iytUlcTzTa7FkcYyiBnnlp1XGsk7OaE0E/VESaSaiUpQ6YQY7AllPTmhHs0uo+3KMbttjFLr,iv:OoPEVzYsmbdS2Po8C/lxo53UWxzA3gbPkrP3HZLB6Jo=,tag:1YKmvjWf5o3XZo40BZ6IWw==,type:str]
|
||||||
|
system:
|
||||||
|
gh_repo_token: ENC[AES256_GCM,data:QAsmG5iQQJ4TUhtrIbkq3wlw4JWbj2tFX6u2BbdB4werXfWyak8sdw==,iv:orGtlDW71QHDRSTED1xNfdOggF61hHsbGztWOUSdY+Y=,tag:4xe1I+hNjxWLc16BW4yTLA==,type:str]
|
||||||
|
pdf_decrypt_password: ENC[AES256_GCM,data:n3XTANd+PbejUw==,iv:y2VIabyv/DfTgztbjS6M/xIfRNKOL+U+r3eXsal32OQ=,tag:oFpXg2E9dDM5dwkjSZkLgw==,type:str]
|
||||||
|
sops:
|
||||||
|
age:
|
||||||
|
- enc: |
|
||||||
|
-----BEGIN AGE ENCRYPTED FILE-----
|
||||||
|
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBkeEdCUncxWS9CUDJmbFow
|
||||||
|
THJpbE9tSmtZcURMcXoyYnd5eHlrcVhNdURrCjJBSFNBTnVpRE9SdkkyWXAwRFFo
|
||||||
|
Um5UUDFTVVl2ZDBBT1hNMHdQZ0RLYjAKLS0tIDUrS3g2a0QralpuN2hiMHRkRVN6
|
||||||
|
MUdvK0FTemxZeGpPTUJiRkcrdWFCL2cKm7EEdZpYdoqQHgTNN1NkR+8xBzYj3ayx
|
||||||
|
2zp9GAJgiEz+XaRkVi52JeDkEr2NuZR8WvcF0hvDMuFBslV6N9JZ+g==
|
||||||
|
-----END AGE ENCRYPTED FILE-----
|
||||||
|
recipient: age18q3lr2z4yeg2f86my42ym4hx0dvcwgjshmchyhdkgwvf4k37dsyq3mcjse
|
||||||
|
- enc: |
|
||||||
|
-----BEGIN AGE ENCRYPTED FILE-----
|
||||||
|
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAwWjFNOERYbTg4RWQxS3ox
|
||||||
|
cDFycmFkaFRvaHg2aXQzTlk4QTVCYVc1ejNzCjR0bUJEc3ZiaHo2V21xYTlsMGgv
|
||||||
|
ajNPelFUT3JucFRFaDBkeGtVS0trdFEKLS0tIEVtdFZsUHZKNkFlL0NHUnF2UG5s
|
||||||
|
eEpDb1VLZ2dCVERQUXl5enhZYlZaR1UK8xnixMh5Xk5SkeHj30wPb5wbsKeWxh80
|
||||||
|
yvBksdjSVYITIR6E6sZJx4ujk8Gmu64UsHwxtASMZRQ60sUjLCo8+A==
|
||||||
|
-----END AGE ENCRYPTED FILE-----
|
||||||
|
recipient: age1pln9sxy5j93lklqklfwp3qepx7x4cs4y2w63n9y3ykt68qgra5ysqleesg
|
||||||
|
lastmodified: "2026-09-11T19:59:23Z"
|
||||||
|
mac: ENC[AES256_GCM,data:BcBncbSLf5CdYQxLn5THA6aMyxqipHpTwTgPOSZXf4B8PwO7yH4J7mL/sKEZ08448nAUaOABOrgFHoLlvVzGrUVJegRC/G9OgFQT8A4v1Dkq0yx0VSplMtf2q4ylyTjLHQb5bd4r4OzfBNFjmruyrZHS3ydxn8gfbgOft50w2vM=,iv:dTzR9j4crCaaG/wjMRxiGjVZMyBNOCN+qKlSN34m0m8=,tag:D8go58ulc1nu5biQWq1TpA==,type:str]
|
||||||
|
unencrypted_suffix: _unencrypted
|
||||||
|
version: 3.13.3
|
||||||
Reference in new issue
Block a user