Full Code of pinpox/nixos for AI

main 3537c4ac42ef cached
402 files
758.3 KB
240.3k tokens
25 symbols
1 requests
Download .txt
Showing preview only (870K chars total). Download the full file or copy to clipboard to get everything.
Repository: pinpox/nixos
Branch: main
Commit: 3537c4ac42ef
Files: 402
Total size: 758.3 KB

Directory structure:
gitextract_pevrk36z/

├── .envrc
├── .github/
│   ├── FUNDING.yml
│   └── workflows/
│       ├── check-upstream-todos.yml
│       └── manual.yml
├── .gitignore
├── .pre-commit-config.yaml
├── .woodpecker/
│   └── x86-64-linux.yaml
├── LICENSE
├── README.md
├── clan-service-modules/
│   ├── machine-type/
│   │   ├── default.nix
│   │   ├── desktop.nix
│   │   ├── mobile.nix
│   │   ├── nextcloud-desktop.nix
│   │   ├── scanners.nix
│   │   └── server.nix
│   ├── monitoring/
│   │   ├── alert-rules.nix
│   │   ├── alertmanager-irc-relay.nix
│   │   ├── blackbox.nix
│   │   ├── default.nix
│   │   ├── grafana.nix
│   │   ├── loki.nix
│   │   ├── node-exporter.nix
│   │   └── prometheus.nix
│   ├── navidrome.nix
│   └── thelounge.nix
├── flake.nix
├── formatter.nix
├── home-manager/
│   ├── colorscheme.nix
│   ├── modules/
│   │   ├── audio-recording/
│   │   │   └── default.nix
│   │   ├── calendar/
│   │   │   └── default.nix
│   │   ├── chromium/
│   │   │   └── default.nix
│   │   ├── claude-code/
│   │   │   └── default.nix
│   │   ├── credentials/
│   │   │   ├── age-recipients
│   │   │   └── default.nix
│   │   ├── easyeffects/
│   │   │   └── default.nix
│   │   ├── email/
│   │   │   ├── aerc-style.nix
│   │   │   └── default.nix
│   │   ├── firefox/
│   │   │   ├── default.nix
│   │   │   └── userchrome.css.mustache
│   │   ├── fonts/
│   │   │   └── default.nix
│   │   ├── foot/
│   │   │   └── default.nix
│   │   ├── games/
│   │   │   └── default.nix
│   │   ├── git/
│   │   │   └── default.nix
│   │   ├── go/
│   │   │   └── default.nix
│   │   ├── grobi/
│   │   │   └── default.nix
│   │   ├── gtk/
│   │   │   ├── banana.nix
│   │   │   └── default.nix
│   │   ├── helix/
│   │   │   └── default.nix
│   │   ├── k9s/
│   │   │   └── default.nix
│   │   ├── kanshi/
│   │   │   └── default.nix
│   │   ├── mako/
│   │   │   └── default.nix
│   │   ├── mpv/
│   │   │   └── default.nix
│   │   ├── neomutt/
│   │   │   └── default.nix
│   │   ├── newsboat/
│   │   │   └── default.nix
│   │   ├── obs-studio/
│   │   │   └── default.nix
│   │   ├── pandoc/
│   │   │   └── default.nix
│   │   ├── pi-mono/
│   │   │   └── default.nix
│   │   ├── rio/
│   │   │   ├── config/
│   │   │   │   └── rio/
│   │   │   │       ├── config.toml
│   │   │   │       └── themes/
│   │   │   │           ├── pinpox-dark.toml
│   │   │   │           ├── pinpox-light.toml
│   │   │   │           ├── wildcharm-dark.toml
│   │   │   │           └── wildcharm-light.toml
│   │   │   └── default.nix
│   │   ├── river/
│   │   │   ├── default.nix
│   │   │   ├── json.lua
│   │   │   ├── layout.lua
│   │   │   └── river-config
│   │   ├── shell/
│   │   │   ├── default.nix
│   │   │   ├── fish.nix
│   │   │   ├── starship.nix
│   │   │   ├── zellij-chooser
│   │   │   ├── zsh.nix
│   │   │   ├── zshrc
│   │   │   ├── zshrc-coffee
│   │   │   └── zshrc-extra
│   │   ├── ssh/
│   │   │   ├── default.nix
│   │   │   ├── ssh-key-cert.pub
│   │   │   └── ssh-key.pub
│   │   ├── sway/
│   │   │   └── default.nix
│   │   ├── swaylock/
│   │   │   ├── default.nix
│   │   │   └── style.css
│   │   ├── taskwarrior/
│   │   │   └── default.nix
│   │   ├── theme-switcher/
│   │   │   ├── default.nix
│   │   │   └── toggle-theme.sh
│   │   ├── tmux/
│   │   │   ├── default.nix
│   │   │   └── tmux.conf
│   │   ├── waybar/
│   │   │   ├── default.nix
│   │   │   └── style.css
│   │   ├── xdg/
│   │   │   └── default.nix
│   │   ├── zed/
│   │   │   └── default.nix
│   │   ├── zellij/
│   │   │   └── default.nix
│   │   └── zk/
│   │       ├── config.toml
│   │       ├── default.md
│   │       ├── default.nix
│   │       └── journal.md
│   └── profiles/
│       ├── common.nix
│       ├── desktop/
│       │   └── default.nix
│       ├── mobile/
│       │   └── default.nix
│       └── server/
│           └── default.nix
├── images/
│   ├── configuration.nix
│   └── raspi.nix
├── inventory.json
├── inventory.nix
├── machines/
│   ├── birne/
│   │   ├── configuration.nix
│   │   └── hardware-configuration.nix
│   ├── clementine/
│   │   ├── configuration.nix
│   │   ├── disko.nix
│   │   └── facter.json
│   ├── fichte/
│   │   ├── configuration.nix
│   │   ├── disko-config-btrfs.nix
│   │   └── facter.json
│   ├── kartoffel/
│   │   ├── configuration.nix
│   │   ├── hardware-configuration.nix
│   │   └── retiolum.nix
│   ├── kfbox/
│   │   ├── configuration.nix
│   │   ├── hardware-configuration.nix
│   │   └── retiolum.nix
│   ├── kiwi/
│   │   ├── configuration.nix
│   │   ├── disko-config-btrfs.nix
│   │   ├── framework.nix
│   │   ├── ollama-local.nix
│   │   └── opencrow-geninf.nix
│   ├── limette/
│   │   ├── configuration.nix
│   │   ├── disko-config-btrfs.nix
│   │   └── disko-config-zfs.nix
│   ├── porree/
│   │   ├── blog.nix
│   │   ├── caddy.nix
│   │   ├── configuration.nix
│   │   ├── hardware-configuration.nix
│   │   ├── nostr/
│   │   │   └── nostr.json
│   │   └── retiolum.nix
│   ├── tanne/
│   │   ├── configuration.nix
│   │   └── disko-config-btrfs.nix
│   ├── traube/
│   │   ├── configuration.nix
│   │   ├── disko.nix
│   │   └── facter.json
│   └── uconsole/
│       ├── configuration.nix
│       └── disko-config.nix
├── modules/
│   ├── bluetooth/
│   │   └── default.nix
│   ├── caddy-security/
│   │   └── default.nix
│   ├── calibre-web/
│   │   └── default.nix
│   ├── ci/
│   │   └── default.nix
│   ├── clan-common/
│   │   └── default.nix
│   ├── environment/
│   │   └── default.nix
│   ├── fonts/
│   │   └── default.nix
│   ├── forgejo/
│   │   └── default.nix
│   ├── gitea/
│   │   └── default.nix
│   ├── hedgedoc/
│   │   └── default.nix
│   ├── hello/
│   │   ├── default.nix
│   │   └── test.nix
│   ├── home-assistant/
│   │   └── default.nix
│   ├── http2irc/
│   │   └── default.nix
│   ├── immich/
│   │   └── default.nix
│   ├── jitsi-matrix-presence/
│   │   └── default.nix
│   ├── kf-homepage/
│   │   ├── default.nix
│   │   └── page/
│   │       └── index.html
│   ├── locale/
│   │   └── default.nix
│   ├── lvm-grub/
│   │   └── default.nix
│   ├── miniflux/
│   │   └── default.nix
│   ├── minio/
│   │   ├── default.nix
│   │   └── policies/
│   │       ├── nextcloud-external.json
│   │       └── restic.json
│   ├── networking/
│   │   └── default.nix
│   ├── nextcloud/
│   │   └── default.nix
│   ├── nix-common/
│   │   └── default.nix
│   ├── ntfy-sh/
│   │   └── default.nix
│   ├── opencloud/
│   │   └── default.nix
│   ├── opencrow/
│   │   └── default.nix
│   ├── openssh/
│   │   ├── ca.pub
│   │   └── default.nix
│   ├── owncast/
│   │   └── default.nix
│   ├── paperless/
│   │   ├── default.nix
│   │   └── django-apps/
│   │       └── paperless_perms/
│   │           ├── __init__.py
│   │           └── apps.py
│   ├── radio/
│   │   └── default.nix
│   ├── restic/
│   │   └── default.nix
│   ├── screego/
│   │   └── default.nix
│   ├── sound/
│   │   └── default.nix
│   ├── storagebox/
│   │   └── default.nix
│   ├── twitch-first/
│   │   └── default.nix
│   ├── unbound-desktop/
│   │   └── default.nix
│   ├── unifi-controller/
│   │   └── default.nix
│   ├── vaultwarden/
│   │   └── default.nix
│   ├── vikunja/
│   │   └── default.nix
│   ├── virtualisation/
│   │   └── default.nix
│   ├── wastebin/
│   │   └── default.nix
│   ├── wayland/
│   │   └── default.nix
│   ├── web-vm/
│   │   └── default.nix
│   ├── yubikey/
│   │   └── default.nix
│   └── zsh/
│       └── default.nix
├── overlays/
│   ├── default.nix
│   └── nextcloud.patch
├── packages/
│   ├── fritzbox_exporter/
│   │   └── default.nix
│   ├── groups-relay/
│   │   └── default.nix
│   ├── hello-custom/
│   │   └── default.nix
│   ├── machine-report/
│   │   ├── default.nix
│   │   └── machine_report.sh
│   ├── manual/
│   │   ├── default.nix
│   │   └── template.html
│   ├── mqtt2prometheus/
│   │   └── default.nix
│   ├── noctalia-askpass/
│   │   └── default.nix
│   ├── raspi-image
│   ├── river-luatile/
│   │   └── default.nix
│   ├── smartmon-script/
│   │   ├── default.nix
│   │   └── smartmon.py
│   ├── woodpecker-pipeline/
│   │   └── default.nix
│   ├── zsh-abbrev-alias/
│   │   └── default.nix
│   ├── zsh-async/
│   │   └── default.nix
│   └── zsh-colored-man-pages/
│       └── default.nix
├── templates/
│   └── default/
│       └── flake.nix
├── users/
│   ├── pinpox-wraps/
│   │   ├── chromium/
│   │   │   └── default.nix
│   │   └── ffmpeg/
│   │       └── default.nix
│   ├── pinpox.nix
│   └── root.nix
├── utils/
│   └── default.nix
└── vars/
    ├── per-machine/
    │   ├── birne/
    │   │   ├── data-mesher-node-identity/
    │   │   │   ├── identity.pub/
    │   │   │   │   └── value
    │   │   │   └── peer.id/
    │   │   │       └── value
    │   │   ├── dm-pull-deploy-status-key/
    │   │   │   └── signing.pub/
    │   │   │       └── value
    │   │   ├── minio/
    │   │   │   └── .validation-hash
    │   │   ├── restic-server/
    │   │   │   └── .validation-hash
    │   │   ├── state-version/
    │   │   │   └── version/
    │   │   │       └── value
    │   │   ├── wireguard/
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-clan/
    │   │   │   ├── ipv4/
    │   │   │   │   └── value
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-clan-ip/
    │   │   │   └── ipv4/
    │   │   │       └── value
    │   │   └── yggdrasil/
    │   │       ├── address/
    │   │       │   └── value
    │   │       └── publicKey/
    │   │           └── value
    │   ├── clementine/
    │   │   ├── data-mesher-node-identity/
    │   │   │   ├── identity.pub/
    │   │   │   │   └── value
    │   │   │   └── peer.id/
    │   │   │       └── value
    │   │   ├── dm-pull-deploy-status-key/
    │   │   │   └── signing.pub/
    │   │   │       └── value
    │   │   ├── punchcard/
    │   │   │   └── .validation-hash
    │   │   ├── punchcard2/
    │   │   │   └── .validation-hash
    │   │   ├── state-version/
    │   │   │   └── version/
    │   │   │       └── value
    │   │   ├── trippy-track/
    │   │   │   └── .validation-hash
    │   │   ├── twitch-first/
    │   │   │   └── .validation-hash
    │   │   ├── wireguard-wg-clan/
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-clan-ip/
    │   │   │   └── ipv4/
    │   │   │       └── value
    │   │   ├── wireguard-wg-tunnel/
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-tunnel-ip/
    │   │   │   └── ipv4/
    │   │   │       └── value
    │   │   ├── yggdrasil/
    │   │   │   ├── address/
    │   │   │   │   └── value
    │   │   │   └── publicKey/
    │   │   │       └── value
    │   │   └── zerotier/
    │   │       ├── zerotier-ip/
    │   │       │   └── value
    │   │       └── zerotier-network-id/
    │   │           └── value
    │   ├── fichte/
    │   │   ├── data-mesher-node-identity/
    │   │   │   ├── identity.pub/
    │   │   │   │   └── value
    │   │   │   └── peer.id/
    │   │   │       └── value
    │   │   ├── dm-pull-deploy-status-key/
    │   │   │   └── signing.pub/
    │   │   │       └── value
    │   │   ├── state-version/
    │   │   │   └── version/
    │   │   │       └── value
    │   │   └── yggdrasil/
    │   │       ├── address/
    │   │       │   └── value
    │   │       └── publicKey/
    │   │           └── value
    │   ├── kartoffel/
    │   │   ├── data-mesher-node-identity/
    │   │   │   ├── identity.pub/
    │   │   │   │   └── value
    │   │   │   └── peer.id/
    │   │   │       └── value
    │   │   ├── dm-pull-deploy-status-key/
    │   │   │   └── signing.pub/
    │   │   │       └── value
    │   │   ├── state-version/
    │   │   │   └── version/
    │   │   │       └── value
    │   │   ├── wireguard/
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-clan/
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-clan-ip/
    │   │   │   └── ipv4/
    │   │   │       └── value
    │   │   └── yggdrasil/
    │   │       ├── address/
    │   │       │   └── value
    │   │       └── publicKey/
    │   │           └── value
    │   ├── kfbox/
    │   │   ├── caddy/
    │   │   │   └── .validation-hash
    │   │   ├── cert-irc/
    │   │   │   ├── .validation-hash
    │   │   │   ├── irc.crt/
    │   │   │   │   └── value
    │   │   │   └── irc.fullchain.crt/
    │   │   │       └── value
    │   │   ├── cert-music/
    │   │   │   ├── .validation-hash
    │   │   │   ├── music.crt/
    │   │   │   │   └── value
    │   │   │   └── music.fullchain.crt/
    │   │   │       └── value
    │   │   ├── data-mesher-host-key/
    │   │   │   └── public_key/
    │   │   │       └── value
    │   │   ├── data-mesher-node-identity/
    │   │   │   ├── identity.pub/
    │   │   │   │   └── value
    │   │   │   └── peer.id/
    │   │   │       └── value
    │   │   ├── dex/
    │   │   │   └── .validation-hash
    │   │   ├── dm-pull-deploy-status-key/
    │   │   │   └── signing.pub/
    │   │   │       └── value
    │   │   ├── go-karma-bot/
    │   │   │   └── .validation-hash
    │   │   ├── hedgedoc/
    │   │   │   └── .validation-hash
    │   │   ├── jitsi-presence/
    │   │   │   └── .validation-hash
    │   │   ├── restic-exporter/
    │   │   │   └── .validation-hash
    │   │   ├── state-version/
    │   │   │   └── version/
    │   │   │       └── value
    │   │   ├── vikunja/
    │   │   │   └── .validation-hash
    │   │   ├── wireguard/
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-clan/
    │   │   │   ├── ipv4/
    │   │   │   │   └── value
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-clan-ip/
    │   │   │   └── ipv4/
    │   │   │       └── value
    │   │   ├── wireguard-wg-star/
    │   │   │   ├── ipv6/
    │   │   │   │   └── value
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   └── yggdrasil/
    │   │       ├── address/
    │   │       │   └── value
    │   │       └── publicKey/
    │   │           └── value
    │   ├── kiwi/
    │   │   ├── cert-claw/
    │   │   │   ├── .validation-hash
    │   │   │   ├── claw.crt/
    │   │   │   │   └── value
    │   │   │   └── claw.fullchain.crt/
    │   │   │       └── value
    │   │   ├── data-mesher-host-key/
    │   │   │   └── public_key/
    │   │   │       └── value
    │   │   ├── data-mesher-node-identity/
    │   │   │   ├── identity.pub/
    │   │   │   │   └── value
    │   │   │   └── peer.id/
    │   │   │       └── value
    │   │   ├── dm-pull-deploy-status-key/
    │   │   │   └── signing.pub/
    │   │   │       └── value
    │   │   ├── openclaw/
    │   │   │   └── .validation-hash
    │   │   ├── opencrow/
    │   │   │   └── .validation-hash
    │   │   ├── opencrow-email/
    │   │   │   └── .validation-hash
    │   │   ├── opencrow-eversports/
    │   │   │   └── .validation-hash
    │   │   ├── opencrow-geninf/
    │   │   │   └── pubkey/
    │   │   │       └── value
    │   │   ├── opencrow-geninf-user/
    │   │   │   └── pubkey/
    │   │   │       └── value
    │   │   ├── opencrow-nextcloud/
    │   │   │   └── .validation-hash
    │   │   ├── opencrow-nextcloud-work/
    │   │   │   └── .validation-hash
    │   │   ├── opencrow-nostr-bot/
    │   │   │   └── nostr-public-key/
    │   │   │       └── value
    │   │   ├── opencrow-nostr-user/
    │   │   │   └── nostr-public-key/
    │   │   │       └── value
    │   │   ├── state-version/
    │   │   │   └── version/
    │   │   │       └── value
    │   │   ├── tor_tor/
    │   │   │   └── hostname/
    │   │   │       └── value
    │   │   ├── wireguard-wg-clan/
    │   │   │   ├── ipv4/
    │   │   │   │   └── value
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-clan-ip/
    │   │   │   └── ipv4/
    │   │   │       └── value
    │   │   ├── wireguard-wg-star/
    │   │   │   ├── ipv6/
    │   │   │   │   └── value
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-tunnel/
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-tunnel-ip/
    │   │   │   └── ipv4/
    │   │   │       └── value
    │   │   ├── yggdrasil/
    │   │   │   ├── address/
    │   │   │   │   └── value
    │   │   │   └── publicKey/
    │   │   │       └── value
    │   │   └── zerotier/
    │   │       └── zerotier-ip/
    │   │           └── value
    │   ├── limette/
    │   │   ├── data-mesher-node-identity/
    │   │   │   ├── identity.pub/
    │   │   │   │   └── value
    │   │   │   └── peer.id/
    │   │   │       └── value
    │   │   ├── dm-pull-deploy-status-key/
    │   │   │   └── signing.pub/
    │   │   │       └── value
    │   │   ├── state-version/
    │   │   │   └── version/
    │   │   │       └── value
    │   │   ├── wireguard/
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-clan/
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-clan-ip/
    │   │   │   └── ipv4/
    │   │   │       └── value
    │   │   └── yggdrasil/
    │   │       ├── address/
    │   │       │   └── value
    │   │       └── publicKey/
    │   │           └── value
    │   ├── porree/
    │   │   ├── alertmanager-ntfy/
    │   │   │   └── .validation-hash
    │   │   ├── caddy/
    │   │   │   └── .validation-hash
    │   │   ├── caddy-basicauth/
    │   │   │   └── .validation-hash
    │   │   ├── cert-prometheus/
    │   │   │   ├── .validation-hash
    │   │   │   ├── prometheus.crt/
    │   │   │   │   └── value
    │   │   │   └── prometheus.fullchain.crt/
    │   │   │       └── value
    │   │   ├── cert-status/
    │   │   │   ├── .validation-hash
    │   │   │   ├── status.crt/
    │   │   │   │   └── value
    │   │   │   └── status.fullchain.crt/
    │   │   │       └── value
    │   │   ├── data-mesher-node-identity/
    │   │   │   ├── identity.pub/
    │   │   │   │   └── value
    │   │   │   └── peer.id/
    │   │   │       └── value
    │   │   ├── dm-pull-deploy-status-key/
    │   │   │   └── signing.pub/
    │   │   │       └── value
    │   │   ├── matrix-hook/
    │   │   │   └── .validation-hash
    │   │   ├── opencrow/
    │   │   │   └── .validation-hash
    │   │   ├── opencrow-email/
    │   │   │   └── .validation-hash
    │   │   ├── opencrow-eversports/
    │   │   │   └── .validation-hash
    │   │   ├── opencrow-local/
    │   │   │   └── .validation-hash
    │   │   ├── opencrow-nextcloud/
    │   │   │   └── .validation-hash
    │   │   ├── opencrow-nextcloud-work/
    │   │   │   └── .validation-hash
    │   │   ├── restic-exporter/
    │   │   │   └── .validation-hash
    │   │   ├── state-version/
    │   │   │   └── version/
    │   │   │       └── value
    │   │   ├── tor_tor/
    │   │   │   └── hostname/
    │   │   │       └── value
    │   │   ├── vaultwarden/
    │   │   │   └── .validation-hash
    │   │   ├── wireguard/
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-clan/
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-clan-ip/
    │   │   │   └── ipv4/
    │   │   │       └── value
    │   │   ├── wireguard-wg-star/
    │   │   │   ├── ipv6/
    │   │   │   │   └── value
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   └── yggdrasil/
    │   │       ├── address/
    │   │       │   └── value
    │   │       └── publicKey/
    │   │           └── value
    │   ├── tanne/
    │   │   ├── data-mesher-node-identity/
    │   │   │   ├── identity.pub/
    │   │   │   │   └── value
    │   │   │   └── peer.id/
    │   │   │       └── value
    │   │   ├── dm-pull-deploy-status-key/
    │   │   │   └── signing.pub/
    │   │   │       └── value
    │   │   ├── state-version/
    │   │   │   └── version/
    │   │   │       └── value
    │   │   └── yggdrasil/
    │   │       ├── address/
    │   │       │   └── value
    │   │       └── publicKey/
    │   │           └── value
    │   ├── traube/
    │   │   ├── data-mesher-node-identity/
    │   │   │   ├── identity.pub/
    │   │   │   │   └── value
    │   │   │   └── peer.id/
    │   │   │       └── value
    │   │   ├── dm-pull-deploy-status-key/
    │   │   │   └── signing.pub/
    │   │   │       └── value
    │   │   ├── opencrow/
    │   │   │   └── .validation-hash
    │   │   ├── opencrow-traube/
    │   │   │   └── .validation-hash
    │   │   ├── state-version/
    │   │   │   └── version/
    │   │   │       └── value
    │   │   └── yggdrasil/
    │   │       ├── address/
    │   │       │   └── value
    │   │       └── publicKey/
    │   │           └── value
    │   ├── tunnelmonster/
    │   │   ├── abiotic-docker/
    │   │   │   └── .validation-hash
    │   │   ├── porkbun-dns/
    │   │   │   └── .validation-hash
    │   │   └── state-version/
    │   │       └── version/
    │   │           └── value
    │   └── uconsole/
    │       ├── data-mesher-node-identity/
    │       │   ├── identity.pub/
    │       │   │   └── value
    │       │   └── peer.id/
    │       │       └── value
    │       ├── dm-pull-deploy-status-key/
    │       │   └── signing.pub/
    │       │       └── value
    │       ├── state-version/
    │       │   └── version/
    │       │       └── value
    │       ├── wireguard-wg-clan/
    │       │   └── publickey/
    │       │       └── value
    │       ├── wireguard-wg-clan-ip/
    │       │   └── ipv4/
    │       │       └── value
    │       └── yggdrasil/
    │           ├── address/
    │           │   └── value
    │           └── publicKey/
    │               └── value
    └── shared/
        ├── bulletin-signing-key/
        │   └── signing.pub/
        │       └── value
        ├── data-mesher-ca/
        │   └── ca.pub/
        │       └── value
        ├── data-mesher-network/
        │   └── network.pub/
        │       └── value
        ├── data-mesher-network-key/
        │   └── public_key/
        │       └── value
        ├── data-mesher-signing-key/
        │   └── signing.pub/
        │       └── value
        ├── dm-dns/
        │   ├── .validation-hash
        │   └── zone.conf/
        │       └── value
        ├── dm-dns-signing-key/
        │   └── signing.pub/
        │       └── value
        ├── dm-pull-deploy-signing-key/
        │   └── signing.pub/
        │       └── value
        ├── dm-wallpaper-signing-key/
        │   └── signing.pub/
        │       └── value
        ├── dm-wg-star-wg-star-signing-key/
        │   └── signing.pub/
        │       └── value
        ├── dns-mesher/
        │   ├── .validation-hash
        │   ├── entries/
        │   │   └── value
        │   └── zone.conf/
        │       └── value
        ├── pki-root-ca/
        │   └── ca.crt/
        │       └── value
        ├── restic-cert/
        │   ├── .validation-hash
        │   └── restic-cert/
        │       └── value
        ├── restic-credentials/
        │   └── .validation-hash
        ├── restic-credentials-backblaze/
        │   └── .validation-hash
        ├── restic-kfbox/
        │   └── .validation-hash
        ├── sftp-credentials/
        │   └── ssh-public-key/
        │       └── value
        ├── step-ca/
        │   └── ca.crt/
        │       └── value
        ├── storagebox-ssh/
        │   └── ssh-public-key/
        │       └── value
        └── zerotier-controller/
            ├── zerotier-ip/
            │   └── value
            └── zerotier-network-id/
                └── value

================================================
FILE CONTENTS
================================================

================================================
FILE: .envrc
================================================
use flake


================================================
FILE: .github/FUNDING.yml
================================================
github: [pinpox]
buy_me_a_coffee: pinpox


================================================
FILE: .github/workflows/check-upstream-todos.yml
================================================
name: Check Upstream TODOs

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]
  schedule:
    - cron: "0 0 * * 0" # Weekly on Sunday

jobs:
  check-todos:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: Check for resolved upstream TODOs
        run: |
          #!/bin/bash
          set -e

          # Find all TODO comments with GitHub PR/issue links
          echo "Searching for TODO comments with GitHub links..."

          # Search for TODO (with or without colon) followed by GitHub URLs
          TODO_PATTERN="TODO:?\s*https://github\.com/[^/]+/[^/]+/(pull|issues)/[0-9]+"

          # Find all matches and extract URLs
          TODOS=$(grep -r -n -E "$TODO_PATTERN" . --exclude-dir=.git --exclude-dir=.github || true)

          if [ -z "$TODOS" ]; then
            echo "No TODO comments with GitHub links found."
            exit 0
          fi

          echo "Found TODO comments:"
          echo "$TODOS"
          echo ""

          # Extract unique URLs from the matches
          URLS=$(echo "$TODOS" | grep -oE "https://github\.com/[^/]+/[^/]+/(pull|issues)/[0-9]+" | sort -u)

          FAILED=false
          FAILED_LOCATIONS=""

          for URL in $URLS; do
            echo "Checking: $URL"
            
            # Find all locations where this URL appears
            LOCATIONS=$(echo "$TODOS" | grep -F "$URL" || true)
            
            # Extract owner, repo, type (pull or issues), and number from URL
            if [[ $URL =~ https://github\.com/([^/]+)/([^/]+)/(pull|issues)/([0-9]+) ]]; then
              OWNER="${BASH_REMATCH[1]}"
              REPO="${BASH_REMATCH[2]}"
              TYPE="${BASH_REMATCH[3]}"
              NUMBER="${BASH_REMATCH[4]}"
              
              # Use GitHub API to check status
              if [ "$TYPE" == "pull" ]; then
                echo "  Checking PR #$NUMBER in $OWNER/$REPO..."
                API_URL="https://api.github.com/repos/$OWNER/$REPO/pulls/$NUMBER"
                STATE=$(curl -s -H "Accept: application/vnd.github.v3+json" "$API_URL" | jq -r '.state // "unknown"')
                MERGED=$(curl -s -H "Accept: application/vnd.github.v3+json" "$API_URL" | jq -r '.merged // false')
                
                if [ "$STATE" == "closed" ] && [ "$MERGED" == "true" ]; then
                  echo "  ❌ FAIL: PR #$NUMBER is MERGED! Remove TODO and workaround."
                  echo "  Locations:"
                  while IFS= read -r line; do
                    echo "    $line"
                  done <<< "$LOCATIONS"
                  FAILED=true
                  FAILED_LOCATIONS="$FAILED_LOCATIONS$LOCATIONS"$'\n'
                elif [ "$STATE" == "closed" ] && [ "$MERGED" == "false" ]; then
                  echo "  ⚠️  PR #$NUMBER is closed but not merged."
                elif [ "$STATE" == "open" ]; then
                  echo "  ✅ PR #$NUMBER is still open."
                else
                  echo "  ⚠️  Could not determine PR status (state: $STATE, merged: $MERGED)"
                fi
              else
                echo "  Checking Issue #$NUMBER in $OWNER/$REPO..."
                API_URL="https://api.github.com/repos/$OWNER/$REPO/issues/$NUMBER"
                STATE=$(curl -s -H "Accept: application/vnd.github.v3+json" "$API_URL" | jq -r '.state // "unknown"')
                
                if [ "$STATE" == "closed" ]; then
                  echo "  ❌ FAIL: Issue #$NUMBER is CLOSED! Remove TODO and workaround."
                  echo "  Locations:"
                  while IFS= read -r line; do
                    echo "    $line"
                  done <<< "$LOCATIONS"
                  FAILED=true
                  FAILED_LOCATIONS="$FAILED_LOCATIONS$LOCATIONS"$'\n'
                elif [ "$STATE" == "open" ]; then
                  echo "  ✅ Issue #$NUMBER is still open."
                else
                  echo "  ⚠️  Could not determine issue status (state: $STATE)"
                fi
              fi
            else
              echo "  ⚠️  Could not parse URL: $URL"
            fi
            echo ""
          done

          if [ "$FAILED" == "true" ]; then
            echo "❌ One or more upstream issues/PRs have been resolved!"
            echo "Please review and remove the corresponding TODO comments and workarounds."
            echo ""
            echo "Summary of resolved TODOs:"
            echo "$FAILED_LOCATIONS"
            exit 1
          else
            echo "✅ All upstream issues/PRs are still unresolved."
          fi
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


================================================
FILE: .github/workflows/manual.yml
================================================
name: Build and Deploy Manual
on:
  push:
    branches:
      - main
jobs:
  tests:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Install Nix
        uses: cachix/install-nix-action@v20
      - name: Build manual
        run: |
          nix build '.#manual' --show-trace  -vv -L
          mkdir docs
          curl https://nixos.org/favicon.ico -o docs/favicon.ico
          cp result/index.html  docs/index.html
      - name: Deploy 🚀
        uses: JamesIves/github-pages-deploy-action@4.1.0
        with:
          branch: gh-pages # The branch the action should deploy to.
          folder: docs # The folder the action should deploy.


================================================
FILE: .gitignore
================================================
result
### Vim
# Swap
[._]*.s[a-v][a-z]
!*.svg  # comment out if you don't need vector files
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]

# Session
Session.vim
Sessionx.vim

# Temporary
.netrwhist
*~
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~

tags.lock
tags.temp
.direnv
.env


================================================
FILE: .pre-commit-config.yaml
================================================
repos:
  - repo: local
    hooks:
      - id: treefmt
        name: treefmt
        entry: nix fmt
        language: system
        pass_filenames: false
    # -   id: nix lint
    #     name: Nix lint
    #     entry: nix run 'nixpkgs#nix-linter'
    #     files: \.nix$
    #     language: system


================================================
FILE: .woodpecker/x86-64-linux.yaml
================================================
{
  "labels": {
    "backend": "local",
    "platform": "linux/amd64"
  },
  "steps": [
    {
      "commands": [
        "nix flake show"
      ],
      "image": "bash",
      "name": "Nix flake show"
    },
    {
      "commands": [
        "attic login lounge-rocks https://cache.lounge.rocks $ATTIC_KEY --set-default"
      ],
      "environment": {
        "ATTIC_KEY": {
          "from_secret": "attic_key"
        }
      },
      "image": "bash",
      "name": "Setup Attic"
    },
    {
      "commands": [
        "nix-fast-build --no-nom --skip-cached --attic-cache lounge-rocks:nix-cache --flake \".#ciBuilds.x86_64-linux\""
      ],
      "image": "bash",
      "name": "Build all machines and push to cache"
    },
    {
      "commands": [
        "nix build --print-out-paths '.#ciBuilds.x86_64-linux.birne' -o 'result-birne'"
      ],
      "failure": "ignore",
      "image": "bash",
      "name": "Build birne"
    },
    {
      "commands": [
        "nix path-info --closure-size -h $(readlink -f 'result-birne')"
      ],
      "failure": "ignore",
      "image": "bash",
      "name": "Show birne info"
    },
    {
      "commands": [
        "nix build --print-out-paths '.#ciBuilds.x86_64-linux.clementine' -o 'result-clementine'"
      ],
      "failure": "ignore",
      "image": "bash",
      "name": "Build clementine"
    },
    {
      "commands": [
        "nix path-info --closure-size -h $(readlink -f 'result-clementine')"
      ],
      "failure": "ignore",
      "image": "bash",
      "name": "Show clementine info"
    },
    {
      "commands": [
        "nix build --print-out-paths '.#ciBuilds.x86_64-linux.fichte' -o 'result-fichte'"
      ],
      "failure": "ignore",
      "image": "bash",
      "name": "Build fichte"
    },
    {
      "commands": [
        "nix path-info --closure-size -h $(readlink -f 'result-fichte')"
      ],
      "failure": "ignore",
      "image": "bash",
      "name": "Show fichte info"
    },
    {
      "commands": [
        "nix build --print-out-paths '.#ciBuilds.x86_64-linux.kartoffel' -o 'result-kartoffel'"
      ],
      "failure": "ignore",
      "image": "bash",
      "name": "Build kartoffel"
    },
    {
      "commands": [
        "nix path-info --closure-size -h $(readlink -f 'result-kartoffel')"
      ],
      "failure": "ignore",
      "image": "bash",
      "name": "Show kartoffel info"
    },
    {
      "commands": [
        "nix build --print-out-paths '.#ciBuilds.x86_64-linux.kfbox' -o 'result-kfbox'"
      ],
      "failure": "ignore",
      "image": "bash",
      "name": "Build kfbox"
    },
    {
      "commands": [
        "nix path-info --closure-size -h $(readlink -f 'result-kfbox')"
      ],
      "failure": "ignore",
      "image": "bash",
      "name": "Show kfbox info"
    },
    {
      "commands": [
        "nix build --print-out-paths '.#ciBuilds.x86_64-linux.kiwi' -o 'result-kiwi'"
      ],
      "failure": "ignore",
      "image": "bash",
      "name": "Build kiwi"
    },
    {
      "commands": [
        "nix path-info --closure-size -h $(readlink -f 'result-kiwi')"
      ],
      "failure": "ignore",
      "image": "bash",
      "name": "Show kiwi info"
    },
    {
      "commands": [
        "nix build --print-out-paths '.#ciBuilds.x86_64-linux.limette' -o 'result-limette'"
      ],
      "failure": "ignore",
      "image": "bash",
      "name": "Build limette"
    },
    {
      "commands": [
        "nix path-info --closure-size -h $(readlink -f 'result-limette')"
      ],
      "failure": "ignore",
      "image": "bash",
      "name": "Show limette info"
    },
    {
      "commands": [
        "nix build --print-out-paths '.#ciBuilds.x86_64-linux.porree' -o 'result-porree'"
      ],
      "failure": "ignore",
      "image": "bash",
      "name": "Build porree"
    },
    {
      "commands": [
        "nix path-info --closure-size -h $(readlink -f 'result-porree')"
      ],
      "failure": "ignore",
      "image": "bash",
      "name": "Show porree info"
    },
    {
      "commands": [
        "nix build --print-out-paths '.#ciBuilds.x86_64-linux.tanne' -o 'result-tanne'"
      ],
      "failure": "ignore",
      "image": "bash",
      "name": "Build tanne"
    },
    {
      "commands": [
        "nix path-info --closure-size -h $(readlink -f 'result-tanne')"
      ],
      "failure": "ignore",
      "image": "bash",
      "name": "Show tanne info"
    }
  ],
  "when": [
    {
      "event": "manual"
    },
    {
      "branch": "main",
      "event": "push"
    }
  ]
}


================================================
FILE: LICENSE
================================================
                    GNU GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The GNU General Public License is a free, copyleft license for
software and other kinds of works.

  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.  We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors.  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

  To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received.  You must make sure that they, too, receive
or can get the source code.  And you must show them these terms so they
know their rights.

  Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.

  For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software.  For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.

  Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.

  Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary.  To prevent this, the GPL assures that
patents cannot be used to render the program non-free.

  The precise terms and conditions for copying, distribution and
modification follow.

                       TERMS AND CONDITIONS

  0. Definitions.

  "This License" refers to version 3 of the GNU General Public License.

  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

  "The Program" refers to any copyrightable work licensed under this
License.  Each licensee is addressed as "you".  "Licensees" and
"recipients" may be individuals or organizations.

  To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy.  The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

  A "covered work" means either the unmodified Program or a work based
on the Program.

  To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy.  Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

  To "convey" a work means any kind of propagation that enables other
parties to make or receive copies.  Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

  An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License.  If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

  1. Source Code.

  The "source code" for a work means the preferred form of the work
for making modifications to it.  "Object code" means any non-source
form of a work.

  A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

  The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form.  A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

  The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities.  However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work.  For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

  The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

  The Corresponding Source for a work in source code form is that
same work.

  2. Basic Permissions.

  All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met.  This License explicitly affirms your unlimited
permission to run the unmodified Program.  The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work.  This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

  You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force.  You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright.  Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

  Conveying under any other circumstances is permitted solely under
the conditions stated below.  Sublicensing is not allowed; section 10
makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

  No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

  When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

  4. Conveying Verbatim Copies.

  You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

  You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

  You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified
    it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is
    released under this License and any conditions added under section
    7.  This requirement modifies the requirement in section 4 to
    "keep intact all notices".

    c) You must license the entire work, as a whole, under this
    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

  A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit.  Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

  6. Conveying Non-Source Forms.

  You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

    a) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by the
    Corresponding Source fixed on a durable physical medium
    customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by a
    written offer, valid for at least three years and valid for as
    long as you offer spare parts or customer support for that product
    model, to give anyone who possesses the object code either (1) a
    copy of the Corresponding Source for all the software in the
    product that is covered by this License, on a durable physical
    medium customarily used for software interchange, for a price no
    more than your reasonable cost of physically performing this
    conveying of source, or (2) access to copy the
    Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the
    written offer to provide the Corresponding Source.  This
    alternative is allowed only occasionally and noncommercially, and
    only if you received the object code with such an offer, in accord
    with subsection 6b.

    d) Convey the object code by offering access from a designated
    place (gratis or for a charge), and offer equivalent access to the
    Corresponding Source in the same way through the same place at no
    further charge.  You need not require recipients to copy the
    Corresponding Source along with the object code.  If the place to
    copy the object code is a network server, the Corresponding Source
    may be on a different server (operated by you or a third party)
    that supports equivalent copying facilities, provided you maintain
    clear directions next to the object code saying where to find the
    Corresponding Source.  Regardless of what server hosts the
    Corresponding Source, you remain obligated to ensure that it is
    available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided
    you inform other peers where the object code and Corresponding
    Source of the work are being offered to the general public at no
    charge under subsection 6d.

  A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

  A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling.  In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage.  For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product.  A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

  "Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source.  The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information.  But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

  The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed.  Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law.  If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

  When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it.  (Additional permissions may be written to require their own
removal in certain cases when you modify the work.)  You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

  Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

    e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

  All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10.  If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term.  If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

  If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

  8. Termination.

  You may not propagate or modify a covered work except as expressly
provided under this License.  Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

  However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

  Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

  Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

  9. Acceptance Not Required for Having Copies.

  You are not required to accept this License in order to receive or
run a copy of the Program.  Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance.  However,
nothing other than this License grants you permission to propagate or
modify any covered work.  These actions infringe copyright if you do
not accept this License.  Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

  10. Automatic Licensing of Downstream Recipients.

  Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License.  You are not responsible
for enforcing compliance by third parties with this License.

  An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations.  If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

  You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License.  For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

  11. Patents.

  A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.  The
work thus licensed is called the contributor's "contributor version".

  A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version.  For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

  Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

  In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement).  To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

  If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients.  "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

  If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

  A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License.  You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

  Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

  12. No Surrender of Others' Freedom.

  If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

  13. Use with the GNU Affero General Public License.

  Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work.  The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.

  14. Revised Versions of this License.

  The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

  Each version is given a distinguishing version number.  If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation.  If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.

  If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

  Later license versions may give you additional or different
permissions.  However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

  15. Disclaimer of Warranty.

  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. Limitation of Liability.

  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

  17. Interpretation of Sections 15 and 16.

  If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

  If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

    <program>  Copyright (C) <year>  <name of author>
    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".

  You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.

  The GNU General Public License does not permit incorporating your program
into proprietary programs.  If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.  But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.


================================================
FILE: README.md
================================================
![nixos](https://socialify.git.ci/pinpox/nixos/image?description=1&font=Source%20Code%20Pro&forks=1&issues=1&logo=https%3A%2F%2Fpablo.tools%2Fnixoscolorful.svg&owner=1&pattern=Circuit%20Board&pulls=1&stargazers=1&theme=Light)

**Configuration checks:** [![Build Status](https://build.lounge.rocks/api/badges/9/status.svg)](https://build.lounge.rocks/repos/9)

All Module options are documented at: https://pinpox.github.io/nixos/

This repository includes all configurations for my NixOS machines. Feel free to
use parts of it as you please, but keep it mind it is intended mostly for
personal use. I've written posts about certain aspects of this setup on my
[personal blog](https://pablo.tools/posts).

# Overview

The structure of this repository is meant to allow easy manual deployment while
being [clan](https://clan.lol) compatible. Individual hosts are defined in
`/machines/<hostname>` and import re-usable parts of the configuration as
needed. Deployment and management is done with [clan](https://clan.lol), and
secrets are stored in [passage](https://github.com/FiloSottile/passage), which
uses age for encryption.

The current hosts are:

| Configuration                     | Type    | Location  | Description                          |
| --------------------------------- | ------- | --------- | ------------------------------------ |
| [kartoffel](./machines/kartoffel) | Desktop | local     | Main desktop workstation             |
| [kiwi](./machines/kiwi)           | Laptop  | local     | Framework 13 (AMD AI 300 series)     |
| [limette](./machines/limette)     | Laptop  | local     | Notebook                             |
| [fichte](./machines/fichte)       | Laptop  | local     | ThinkPad T490                        |
| [tanne](./machines/tanne)         | Laptop  | local     | ThinkPad T480s                       |
| [uconsole](./machines/uconsole)   | Handheld| local     | Clockwork uConsole (RPi CM4)         |
| [birne](./machines/birne)         | Server  | local     | Local NAS                            |
| [porree](./machines/porree)       | Server  | netcup.de | Server for pablo.tools               |
| [kfbox](./machines/kfbox)         | Server  | netcup.de | Server for 0cx.de                    |
| [clementine](./machines/clementine) | Server | netcup.de | Server for megaclan3000.de           |
| [traube](./machines/traube)       | Server  | local     | aarch64 server                       |

# Deployment

Deployment is done via [clan CLI](https://clan.lol) provided via the flake's
default nix shell. I use [direnv](https://direnv.net/) to automatically start it
when entering the repository's directory. Run `direnv allow` on the first time,
after that, deployment can be done via:

```sh
clan machines update <hostname>
```

## Repository Organization

The configuration is organized as follows:

- `machines/<hostname>`: Host-specific configurations
- `modules`: System-level NixOS modules
- `home-manager/modules`: User-level home-manager modules for specific applications
- `home-manager/profiles`: Profiles that combine multiple home-manager modules
- `home-manager/packages`: Custom packages for applications not present in nixpkgs
- `clan-service-modules`: [Clan](https://clan.lol) services

# Contributing?

While contributions don't make much sense for a personal configuration repository,
I'm always happy to get hints, tips and constructive criticism. If you find something
that could be done in a better way, please let me know!

<a href="https://www.buymeacoffee.com/pinpox"><img src="https://img.buymeacoffee.com/button-api/?text=Buy%20me%20a%20coffee&emoji=&slug=pinpox&button_colour=82aaff&font_colour=000000&font_family=Inter&outline_colour=000000&coffee_colour=FFDD00" alt="Buy Me A Coffee"></a>


================================================
FILE: clan-service-modules/machine-type/default.nix
================================================
{
  _class = "clan.service";
  manifest.name = "machine-type";
  manifest.readme = "Machine classification/profiles";

  roles.server.perInstance.nixosModule = ./server.nix;
  roles.server.description = "Server machine settings, no GUI";
  roles.desktop.perInstance.nixosModule = ./desktop.nix;
  roles.desktop.description = "Desktop machine settings, including wayland and sway";
  roles.mobile.perInstance.nixosModule = ./mobile.nix;
  roles.mobile.description = "Mobile/ARM device settings, lightweight desktop";

  # Common configuration for all macine types
  perMachine.nixosModule =
    { lib, ... }:
    {
      security.acme.acceptTerms = true;
      security.acme.defaults.email = lib.mkDefault "letsencrypt@pablo.tools";
      clan.core.settings.state-version.enable = true;
      hardware.enableRedistributableFirmware = true;
      hardware.enableAllHardware = true;
    };
}


================================================
FILE: clan-service-modules/machine-type/desktop.nix
================================================
{
  config,
  pkgs,
  lib,
  nur,
  flake-self,
  wl-harmonograph,
  promterm,
  home-manager,
  ...
}:
{

  imports = [
    ./nextcloud-desktop.nix
    home-manager.nixosModules.home-manager
  ];

  services.fwupd.enable = true;
  services.acpid.enable = true;
  services.upower.enable = true;

  # To build raspi images
  boot.binfmt.emulatedSystems = [ "aarch64-linux" ];

  # Enable networkmanager
  networking.networkmanager.enable = true;

  # Often hangs
  systemd.services = {
    NetworkManager-wait-online.enable = lib.mkForce false;
    systemd-networkd-wait-online.enable = lib.mkForce false;
  };

  hardware.keyboard.qmk.enable = true;

  services.udev.packages = [
    # pkgs.via
    pkgs.qmk-udev-rules # For QMK/Via
    pkgs.libsigrok # For pulseview
  ];

  # DON'T set useGlobalPackages! It's not necessary in newer
  # home-manager versions and does not work with configs using
  # nixpkgs.config`
  home-manager.useUserPackages = true;

  # Backup files before overwriting them with home-manager
  home-manager.backupFileExtension = "hm-backup";

  # Pass all flake inputs to home-manager modules aswell so we can use them
  # there.
  # home-manager.extraSpecialArgs = flake-self.inputs;
  home-manager.extraSpecialArgs = {
    inherit
      wl-harmonograph
      flake-self
      nur
      promterm
      ;

    # Pass system configuration (top-level "config") to home-manager modules,
    # so we can access it's values for conditional statements. Writing is NOT possible!
    system-config = config;
  };

  nixpkgs.overlays = [
    nur.overlays.default
    flake-self.overlays.default
  ];

  # TODO parametrize the username
  home-manager.users.pinpox = flake-self.homeConfigurations.desktop;

  # Hardware accelleration
  hardware.graphics = {
    enable = true;
    enable32Bit = true;
  };

  pinpox = {
    defaults = {
      bluetooth.enable = true;
      environment.enable = true;
      storagebox = {
        enable = true;
        mountOnAccess = true;
      };
      fonts.enable = true;
      locale.enable = true;
      locale.automatic-timezone = true;
      networking.enable = true;
      nix.enable = true;
      sound.enable = true;
      zsh.enable = true;
      yubikey.enable = true;
      lvm-grub.enable = true;
      # home-manager.enable = true;
      # home-manager.configuration = flake-self.homeConfigurations.desktop;
    };

    virtualisation = {
      docker.enable =false;
      virt-manager.enable = true;
      virtualbox.enable = false;
    };

    services = {

      unbound-desktop.enable = false;

      wayland.enable = true;
      openssh.enable = true;

      restic-client = {
        enable = true;
        backup-paths-onsite = [
          "/home/pinpox/Notes"
          "/home/pinpox"
          "/home/pinpox/.mozilla/firefox/pinpox/places.sqlite"
          # "*/.local/share/password-store"
          # "*/.passage"
          # "*/.gnupg"
          # "*/.ssh"
        ];
        backup-paths-offsite = [
          "/home/pinpox/.mozilla/firefox/pinpox/places.sqlite"
          "/home/pinpox/Notes"
          "/home/pinpox"
        ];

      };
    };
  };

  # List packages installed in system profile. To search, run:
  # $ nix search wget

  environment.systemPackages = with pkgs; [

    # irc-announce irc.hackint.org 6697 testbot992 '#lounge-rocks2' 1 "test2"
    # pkgs.nur.repos.mic92.irc-announce

    firefox
    openspec

    gcc
    comma
    acpi
    arandr
    binutils
    file
    git
    gnumake
    killall
    lm_sensors
    neovim
    nixpkgs-review
    nix-init
    nix-update
    nodejs
    ripgrep
    time
    usbutils
    wget
  ];

  services.logind.settings.Login.RuntimeDirectorySize = "20G";

  boot = {
    # Use GRUB2 as EFI boot loader.
    loader.grub.useOSProber = true;
    tmp.useTmpfs = false;
  };

  programs.dconf.enable = true;

  # For user-space mounting things like smb:// and ssh:// in thunar etc. Dbus
  # is required.
  services.gvfs = {
    enable = true;
    # Default package does not support all protocols. Use the full-featured
    # gnome version
    package = lib.mkForce pkgs.gnome.gvfs;
  };
}


================================================
FILE: clan-service-modules/machine-type/mobile.nix
================================================
{
  config,
  pkgs,
  lib,
  nur,
  flake-self,

  promterm,
  home-manager,
  ...
}:
{

  imports = [
    home-manager.nixosModules.home-manager
  ];

  services.acpid.enable = true;
  services.upower.enable = true;

  # US QWERTY for TTY (mobile devices don't have colemak keyboards)
  console.keyMap = lib.mkForce "us";

  # Enable networkmanager
  networking.networkmanager.enable = true;

  # Often hangs
  systemd.services = {
    NetworkManager-wait-online.enable = lib.mkForce false;
    systemd-networkd-wait-online.enable = lib.mkForce false;
  };

  # DON'T set useGlobalPackages! It's not necessary in newer
  # home-manager versions and does not work with configs using
  # nixpkgs.config`
  home-manager.useUserPackages = true;

  # Backup files before overwriting them with home-manager
  home-manager.backupFileExtension = "hm-backup";

  # Pass all flake inputs to home-manager modules aswell so we can use them
  # there.
  home-manager.extraSpecialArgs = {
    inherit
      flake-self
      nur
      promterm
      ;

    # Pass system configuration (top-level "config") to home-manager modules,
    # so we can access it's values for conditional statements. Writing is NOT possible!
    system-config = config;
  };

  nixpkgs.overlays = [
    nur.overlays.default
    flake-self.overlays.default
  ];

  # TODO parametrize the username
  home-manager.users.pinpox = flake-self.homeConfigurations.mobile;

  # Hardware accelleration
  hardware.graphics = {
    enable = true;
  };

  pinpox = {
    defaults = {
      bluetooth.enable = true;
      environment.enable = true;
      fonts.enable = false; # Disabled - noto-fonts-color-emoji can't cross-compile
      locale.enable = true;
      locale.automatic-timezone = true;
      networking.enable = true;
      nix.enable = true;
      sound.enable = false;
      zsh.enable = true;
    };

    services = {
      wayland.enable = true;
      openssh.enable = true;
    };
  };

  # List packages installed in system profile
  environment.systemPackages = with pkgs; [
    gcc
    comma
    acpi
    binutils
    file
    git
    gnumake
    killall
    neovim
    ripgrep
    time
    usbutils
    wget
  ];

  programs.dconf.enable = true;

  # Disable speech-dispatcher to avoid pulling in mbrola-voices (675MB)
  services.speechd.enable = lib.mkForce false;

  # Override fontconfig defaults to avoid noto-fonts-color-emoji
  # which requires Python tools that can't cross-compile
  fonts.fontconfig.defaultFonts.emoji = lib.mkForce [ ];

  # Disable default font packages (includes noto-fonts-color-emoji)
  fonts.enableDefaultPackages = false;

  # Disable modemmanager - cross-compilation is broken
  networking.modemmanager.enable = false;
}


================================================
FILE: clan-service-modules/machine-type/nextcloud-desktop.nix
================================================
{
  # Nextcloud on the desktop
  services.davfs2 = {
    enable = true;
    # settings.globalSection.use_locks = false;
    #     TODO: Note: Ordinary users can mount a davfs2 file system if they are a
    #     member of the group dav_group as defined in the system wide
    #     configuration. Make sure the option 'dav_group' is enabled in the system
    #     wide configuration file.
  };
  # fileSystems."/home/pinpox/Nextcloud" = {
  #   device = "https://files.pablo.tools/remote.php/dav/files/pinpox";
  #   fsType = "davfs";
  #   options = [
  #     "user"
  #     "rw"
  #     "noauto" # I'll mount it manually
  #   ];
  # };
}


================================================
FILE: clan-service-modules/machine-type/scanners.nix
================================================
{
  hardware.sane.enable = true;
  users.users.pinpox.extraGroups = [
    "scanner"
    "lp"
  ];
}


================================================
FILE: clan-service-modules/machine-type/server.nix
================================================
{
  restic-exporter,
  lib,
  pkgs,
  config,
  ...
}:
with lib;
{

  imports = [
    restic-exporter.nixosModules.default
  ];

  # Limit log size for journal
  services.journald.extraConfig = "SystemMaxUse=1G";

  environment.systemPackages = with pkgs; [
    universal-ctags
    git
    gnumake
    go
    htop
    neovim
    nix-index
    nixfmt
    ripgrep
    wget
    ncdu
    duf
    tmux
  ];

  pinpox.defaults = {
    environment.enable = true;
    locale.enable = true;
    nix.enable = true;
    zsh.enable = true;
    networking.enable = true;
  };

  pinpox.services.openssh.enable = true;

  # Backups
  pinpox.services = {
    restic-client = {
      enable = true;
      backup-paths-onsite = [
        config.services.postgresqlBackup.location
        "/home"
        "/root"
      ];
    };
  };

  # Backup Postgres, if it is running
  services.postgresqlBackup = {
    enable = config.services.postgresql.enable;
    startAt = "*-*-* 01:15:00";
    location = "/var/backup/postgresql";
    backupAll = true;
  };

  # Remove wayland dependencies on server machine type
  nixpkgs.overlays = [

    (final: super: {
      passage = super.passage.override {
        wl-clipboard = null;
        xclip = null;
      };

      neovim = super.neovim.override {
        waylandSupport = false;
      };
    })
  ];
}


================================================
FILE: clan-service-modules/monitoring/alert-rules.nix
================================================
{ lib, meta }:

let
  # docker's filesystems disappear quickly, leading to false positives
  deviceFilter = ''path!~"^(/var/lib/docker|/nix/store).*"'';
in
lib.mapAttrsToList
  (name: opts: {
    alert = name;
    expr = opts.condition;
    for = opts.time or "2m";
    labels = { };
    annotations.description = opts.description;
  })
  ({

    # prometheus_too_many_restarts = {
    #   condition = ''changes(process_start_time_seconds{job=~"prometheus|alertmanager"}[15m]) > 2'';
    #   description = "Prometheus has restarted more than twice in the last 15 minutes. It might be crashlooping.";
    # };

    # alert_manager_config_not_synced = {
    #   condition = ''count(count_values("config_hash", alertmanager_config_hash)) > 1'';
    #   description = "Configurations of AlertManager cluster instances are out of sync.";
    # };

    #alert_manager_e2e_dead_man_switch = {
    #  condition = "vector(1)";
    #  description = "Prometheus DeadManSwitch is an always-firing alert. It's used as an end-to-end test of Prometheus through the Alertmanager.";
    #};

    # prometheus_not_connected_to_alertmanager = {
    #   condition = "prometheus_notifications_alertmanagers_discovered < 1";
    #   description = "Prometheus cannot connect the alertmanager\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}";
    # };

    # prometheus_rule_evaluation_failures = {
    #   condition = "increase(prometheus_rule_evaluation_failures_total[3m]) > 0";
    #   description = "Prometheus encountered {{ $value }} rule evaluation failures, leading to potentially ignored alerts.\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}";
    # };

    # prometheus_template_expansion_failures = {
    #   condition = "increase(prometheus_template_text_expansion_failures_total[3m]) > 0";
    #   time = "0m";
    #   description = "Prometheus encountered {{ $value }} template text expansion failures\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}";
    # };

    # promtail_file_lagging = {
    #   condition = ''abs(promtail_file_bytes_total - promtail_read_bytes_total) > 1e6'';
    #   time = "15m";
    #   description = ''{{ $labels.instance }} {{ $labels.job }} {{ $labels.path }} has been lagging by more than 1MB for more than 15m.'';
    # };

    filesystem_full_80percent = {
      condition = ''100 - ((node_filesystem_avail_bytes{fstype!="rootfs",mountpoint="/"} * 100) / node_filesystem_size_bytes{fstype!="rootfs",mountpoint="/"}) > 80'';
      time = "10m";
      description = "{{$labels.instance}} device {{$labels.device}} on {{$labels.mountpoint}} got less than 20% space left on its filesystem.";
    };

    # filesystem_inodes_full = {
    #   condition = ''disk_inodes_free / disk_inodes_total < 0.10'';
    #   time = "10m";
    #   description = "{{$labels.instance}} device {{$labels.device}} on {{$labels.mountpoint}} got less than 10% inodes left on its filesystem.";
    # };

    # daily_task_not_run = {
    #   # give 6 hours grace period
    #   condition = ''time() - task_last_run{state="ok",frequency="daily"} > (24 + 6) * 60 * 60'';
    #   description = "{{$labels.instance}}: {{$labels.name}} was not run in the last 24h";
    # };

    # TODO for backups:
    # - Has not run
    # - No data for a wheek
    # - Too old
    # - to drastic file or size change
    #   description = "status of ${name} is unknown: no data for a day";
    #   description = "{{$labels.instance}}: {{$labels.name}} was not run in the last week";
    #   description = "status of restic is unknown: no data for a week";

    # homeassistant = {
    #   condition = ''
    #     homeassistant_entity_available{domain="persistent_notification", entity!="persistent_notification.http_login"} >= 0'';
    #   description =
    #     "homeassistant notification {{$labels.entity}} ({{$labels.friendly_name}}): {{$value}}";
    # };

    swap_using_20percent = {
      condition = "node_memory_SwapTotal_bytes - (node_memory_SwapCached_bytes + node_memory_SwapFree_bytes) > node_memory_SwapTotal_bytes * 0.2";
      time = "30m";
      description = "{{$labels.instance}} is using 20% of its swap space for at least 30 minutes.";
    };

    systemd_service_failed = {
      condition = ''node_systemd_unit_state{state="failed"} == 1'';
      description = "{{$labels.instance}} failed to (re)start service {{$labels.name}}.";
    };

    restic_backup_too_old = {
      condition = ''(time() - restic_snapshots_latest_time)/(60*60) > 24'';
      description = "{{$labels.instance}} not backed up for more than 24 hours. ({{$value}})";
    };

    host_down = {
      condition = ''up{job="node-stats", instance!~"limette.${meta.domain}:9100|kartoffel.${meta.domain}:9100"} == 0'';
      description = "{{$labels.instance}} is down!";
    };

    # service_not_running = {
    #   condition = ''systemd_units_active_code{name=~"teamspeak3-server.service|tt-rss.service", sub!="running"}'';
    #   description = "{{$labels.instance}} should have a running {{$labels.name}}.";
    # };

    ram_using_90percent = {
      condition = "node_memory_Buffers_bytes + node_memory_MemFree_bytes + node_memory_Cached_bytes < node_memory_MemTotal_bytes * 0.1";
      time = "1h";
      description = "{{$labels.instance}} is using at least 90% of its RAM for at least 1 hour.";
    };

    cpu_using_90percent = {
      condition = ''100 - (avg by (instance) (irate(node_cpu_seconds_total{mode="idle"}[5m])) * 100) >= 90'';
      time = "10m";
      description = "{{$labels.instance}} is running with cpu usage > 90% for at least 10 minutes: {{$value}}";
    };

    reboot = {
      condition = "node_boot_time_seconds < 300";
      description = "{{$labels.instance}} just rebooted.";
    };

    uptime = {
      condition = "(time() - node_boot_time_seconds ) / (60*60*24) > 30";
      description = "Uptime monster: {{$labels.instance}} has been up for more than 30 days.";
    };

    flake_nixpkgs_outdated = {
      condition = ''(time() - flake_input_last_modified{input="nixpkgs"}) / (60*60*24) > 30'';
      description = "Nixpkgs outdated: Nixpkgs on {{$labels.instance}} has not been updated in 30 days";
    };

    /*
      ping = {
      condition = "ping_result_code{type!='mobile'} != 0";
      description = "{{$labels.url}}: ping from {{$labels.instance}} has failed!";
      };

      ping_high_latency = {
      condition = "ping_average_response_ms{type!='mobile'} > 5000";
      description = "{{$labels.instance}}: ping probe from {{$labels.source}} is encountering high latency!";
      };
    */
    http_status = {
      condition = ''probe_http_status_code{instance!~"https://megaclan3000.de"} != 200'';
      description = "http request failed from {{$labels.instance}}: {{$labels.result}}!";
    };
    /*
      http_match_failed = {
      condition = "http_response_response_string_match == 0";
      description = "{{$labels.server}} : http body not as expected; status code: {{$labels.status_code}}!";
      };
      dns_query = {
      condition = "dns_query_result_code != 0";
      description = "{{$labels.domain}} : could retrieve A record {{$labels.instance}} from server {{$labels.server}}: {{$labels.result}}!";
      };
      secure_dns_query = {
      condition = "secure_dns_state != 0";
      description = "{{$labels.domain}} : could retrieve A record {{$labels.instance}} from server {{$labels.server}}: {{$labels.result}} for protocol {{$labels.protocol}}!";
      };
      connection_failed = {
      condition = "net_response_result_code != 0";
      description = "{{$labels.server}}: connection to {{$labels.port}}({{$labels.protocol}}) failed from {{$labels.instance}}";
      };
      healthchecks = {
      condition = "hc_check_up == 0";
      description = "{{$labels.instance}}: healtcheck {{$labels.job}} fails!";
      };
    */
    cert_expiry = {
      condition = "(probe_ssl_earliest_cert_expiry - time())/(3600*24) < 30";
      description = "{{$labels.instance}}: The TLS certificate will expire in less than 30 days: {{$value}}s";
    };

    # ignore devices that disabled S.M.A.R.T (example if attached via USB)

    # smart_errors = {
    #   condition = ''smart_device_health_ok{enabled!="Disabled"} != 1'';
    #   description =
    #     "{{$labels.instance}}: S.M.A.R.T reports: {{$labels.device}} ({{$labels.model}}) has errors.";
    # };

    oom_kills = {
      condition = "increase(node_vmstat_oom_kill[5m]) > 0";
      description = "{{$labels.instance}}: OOM kill detected";
    };

    /*
      unusual_disk_read_latency = {
      condition =
      "rate(diskio_read_time[1m]) / rate(diskio_reads[1m]) > 0.1 and rate(diskio_reads[1m]) > 0";
      description = ''
      {{$labels.instance}}: Disk latency is growing (read operations > 100ms)
      '';
      };

      unusual_disk_write_latency = {
      condition =
      "rate(diskio_write_time[1m]) / rate(diskio_write[1m]) > 0.1 and rate(diskio_write[1m]) > 0";
      description = ''
      {{$labels.instance}}: Disk latency is growing (write operations > 100ms)
      '';
      };
    */

    host_memory_under_memory_pressure = {
      condition = "rate(node_vmstat_pgmajfault[1m]) > 1000";
      description = "{{$labels.instance}}: The node is under heavy memory pressure. High rate of major page faults: {{$value}}";
    };

    # ext4_errors = {
    #   condition = "ext4_errors_value > 0";
    #   description =
    #     "{{$labels.instance}}: ext4 has reported {{$value}} I/O errors: check /sys/fs/ext4/*/errors_count";
    # };

    # alerts_silences_changed = {
    #   condition = ''abs(delta(alertmanager_silences{state="active"}[1h])) >= 1'';
    #   description =
    #     "alertmanager: number of active silences has changed: {{$value}}";
    # };
  })


================================================
FILE: clan-service-modules/monitoring/alertmanager-irc-relay.nix
================================================
{ pkgs, config, ... }:
let
  am-irc-conf = {
    # listening host/port.
    http_host = "localhost";
    http_port = 8667;

    # Connect to this IRC host/port.
    irc_host = "irc.hackint.org";
    irc_port = 6697;
    # irc_host_password = "myserver_password";
    irc_nickname = "alertus-maximus";
    irc_nickname_password = "mynickserv_key";
    irc_realname = "myrealname";

    irc_channels = [ { name = "#lounge-rocks-log"; } ];

    msg_once_per_alert_group = false;
    # Use PRIVMSG instead of NOTICE (default) to send messages.
    use_privmsg = true;

    # Define how IRC messages should be formatted.
    msg_template = "⚠ ⚠ ⚠ [{{.Labels.instance}}] - {{ .Labels.alertname }} is {{.Status}} ⚠ ⚠ ⚠ {{.Annotations.description}} (@pinpox act accordingly)";
    # Note: When sending only one message per alert group the default
    # msg_template is set to
    # "Alert {{ .GroupLabels.alertname }} for {{ .GroupLabels.job }} is {{ .Status }}"

    # Set the internal buffer size for alerts received but not yet sent to IRC.
    alert_buffer_size = 2048;
  };

  confPath = pkgs.writeText "config.yml" (builtins.toJSON am-irc-conf);
in
{
  # User and group
  users.groups."alertmanager-irc-relay" = { };
  users.users."alertmanager-irc-relay" = {
    isSystemUser = true;
    group = "alertmanager-irc-relay";
  };

  # Service
  systemd.services.alertmanager-irc-relay = {
    wantedBy = [ "multi-user.target" ];
    serviceConfig = {
      ExecStart = "${pkgs.alertmanager-irc-relay}/bin/alertmanager-irc-relay --config ${confPath}";
      User = config.users.users.alertmanager-irc-relay.name;
      Group = config.users.users.alertmanager-irc-relay.name;
    };
  };
}


================================================
FILE: clan-service-modules/monitoring/blackbox.nix
================================================
{ pkgs, ... }:
{
  services.prometheus.exporters.blackbox = {
    enable = true;
    # Default port is 9115
    # Listen on 0.0.0.0, but we only open the firewall for wg-clan
    openFirewall = false;

    configFile = pkgs.writeTextFile {
      name = "blackbox-exporter-config";
      text = ''
        modules:
          http_2xx:
            prober: http
            timeout: 5s
            http:
              valid_http_versions: ["HTTP/1.1", "HTTP/2.0"]
              valid_status_codes: []  # Defaults to 2xx
              method: GET
              no_follow_redirects: false
              fail_if_ssl: false
              fail_if_not_ssl: false
              tls_config:
                insecure_skip_verify: false
              preferred_ip_protocol: "ip4" # defaults to "ip6"
              ip_protocol_fallback: true  # fallback to "ip6"
      '';
    };
  };

  networking.firewall.interfaces.wg-clan.allowedTCPPorts = [ 9115 ];
}


================================================
FILE: clan-service-modules/monitoring/default.nix
================================================
{ lib, ... }:
{
  _class = "clan.service";
  manifest.name = "monitoring";
  manifest.description = "Prometheus/Loki/Grafana monitoring stack";
  manifest.readme = ''
    	  Self-hosted monitoring with one role per component (prometheus, loki,
    	  grafana, blackbox, node-exporter, alertmanager-irc-relay)
    	  '';
  manifest.categories = [ "Monitoring" ];
  manifest.exports.out = [ "endpoints" "auth" ];

  roles.node-exporter = {
    description = "Prometheus node-exporter for host metrics (assign to every host you want scraped)";
    perInstance.nixosModule = ./node-exporter.nix;
  };

  roles.loki = {
    description = "Loki log aggregation server";
    perInstance.nixosModule = ./loki.nix;
  };

  roles.grafana = {
    description = "Grafana dashboard server";
    interface =
      { lib, meta, ... }:
      {
        options = {
          domain = lib.mkOption {
            type = lib.types.str;
            default = "status.${meta.domain}";
            example = "dashboards.example.com";
            description = "Domain for grafana";
          };

          oidc = {
            enable = lib.mkEnableOption "OIDC-only authentication (e.g. via Authelia). Disables the local login form.";

            issuer = lib.mkOption {
              type = lib.types.str;
              default = "";
              example = "https://auth.example.com";
              description = "Base URL of the OIDC provider (Authelia). Used to derive auth/token/userinfo endpoints.";
            };

            clientId = lib.mkOption {
              type = lib.types.str;
              default = "grafana";
              description = "OIDC client ID registered with the provider";
            };

            providerName = lib.mkOption {
              type = lib.types.str;
              default = "Authelia";
              description = "Display name shown on the Grafana login button";
            };
          };
        };
      };
    perInstance =
      {
        settings,
        roles,
        meta,
        mkExports,
        ...
      }:
      let


		  # TODO The generator shoudl be independeat of authelia or kanidm. Use a dependant one for authelia to create the hash
		  # TODO maybe we do not need a generato cofig at all, have a default?


        # Generator definition without runtimeInputs (pkgs isn't available
        # at inventory-eval time). Each nixosModule that declares this
        # generator adds runtimeInputs locally where pkgs IS available.
        oidcGenerator = lib.optionalAttrs settings.oidc.enable {
          share = true;
          files.client_secret = {
            owner = "grafana";
            group = "authelia-main";
            mode = "0440";
          };
          files.client_secret_hash.owner = "authelia-main";
          script = ''
            mkdir -p $out
            openssl rand -hex 32 > $out/client_secret
            authelia crypto hash generate argon2 --password "$(cat $out/client_secret)" \
              | sed 's/^Digest: //' > $out/client_secret_hash
          '';
        };
      in
      {
        exports = mkExports (
          { endpoints.hosts = [ settings.domain ]; }
          // lib.optionalAttrs settings.oidc.enable {
            auth.client = {
              clientId = settings.oidc.clientId;
              clientName = "Grafana";
              redirectUris = [ "https://${settings.domain}/login/generic_oauth" ];
              scopes = [
                "openid"
                "profile"
                "email"
                "groups"
              ];
              public = false;
            };
            auth.varsGenerator = oidcGenerator;
          }
        );
        nixosModule = import ./grafana.nix {
          inherit settings roles meta oidcGenerator;
        };
      };
  };

  roles.blackbox = {
    description = "Prometheus blackbox-exporter for HTTP/TLS probes";
    perInstance.nixosModule = ./blackbox.nix;
  };

  roles.alertmanager-irc-relay = {
    description = "Relay alertmanager notifications to an IRC channel";
    perInstance.nixosModule = ./alertmanager-irc-relay.nix;
  };

  roles.prometheus = {
    description = "Prometheus server (with bundled alertmanager). Discovers node-exporter and blackbox role members automatically.";
    interface =
      { lib, meta, ... }:
      {
        options = {
          domain = lib.mkOption {
            type = lib.types.str;
            default = "prometheus.${meta.domain}";
            example = "metrics.example.com";
            description = "Domain for the prometheus web UI (reverse proxied via caddy)";
          };
          blackboxTargets = lib.mkOption {
            type = lib.types.listOf lib.types.str;
            default = [ "https://pablo.tools" ];
            example = [ "https://github.com" ];
            description = "Targets to monitor with the blackbox-exporter";
          };
          jsonTargets = lib.mkOption {
            type = lib.types.listOf lib.types.str;
            default = [ ];
            example = [ "http://birne.pin/restic-ahorn.json" ];
            description = "Targets to probe with the json-exporter";
          };
          webExternalUrl = lib.mkOption {
            type = lib.types.str;
            default = "https://vpn.prometheus.pablo.tools";
            description = "Prometheus web external URL";
          };
          alertmanagerWebExternalUrl = lib.mkOption {
            type = lib.types.str;
            default = "https://vpn.alerts.pablo.tools";
            description = "Alertmanager web external URL";
          };
        };
      };
    perInstance =
      {
        settings,
        roles,
        meta,
        mkExports,
        ...
      }:
      let
        # oauth2-proxy OIDC generator definition (without runtimeInputs —
        # added by each nixosModule where pkgs is available).
        # Produces: client_secret (raw), client_secret_hash (argon2 for
        # authelia), envfile (oauth2-proxy env with client+cookie secrets).
        prometheusOidcGenerator = {
          share = true;
          files.client_secret = {
            owner = "oauth2_proxy";
            group = "authelia-main";
            mode = "0440";
          };
          files.client_secret_hash.owner = "authelia-main";
          files.envfile = {
            owner = "oauth2_proxy";
            mode = "0400";
          };
          script = ''
            mkdir -p $out
            CLIENT_SECRET=$(openssl rand -hex 32)
            COOKIE_SECRET=$(openssl rand -hex 16)
            printf '%s' "$CLIENT_SECRET" > $out/client_secret
            authelia crypto hash generate argon2 --password "$CLIENT_SECRET" \
              | sed 's/^Digest: //' > $out/client_secret_hash
            printf 'OAUTH2_PROXY_CLIENT_SECRET=%s\nOAUTH2_PROXY_COOKIE_SECRET=%s\n' \
              "$CLIENT_SECRET" "$COOKIE_SECRET" > $out/envfile
          '';
        };
      in
      {
        exports = mkExports (
          { endpoints.hosts = [ settings.domain ]; }
          // {
            auth.client = {
              clientId = "prometheus";
              clientName = "Prometheus";
              redirectUris = [ "https://${settings.domain}/oauth2/callback" ];
              scopes = [
                "openid"
                "profile"
                "email"
                "groups"
              ];
              public = false;
            };
            auth.varsGenerator = prometheusOidcGenerator;
          }
        );
        nixosModule = import ./prometheus.nix {
          inherit settings roles meta prometheusOidcGenerator;
        };
      };
  };
}


================================================
FILE: clan-service-modules/monitoring/grafana.nix
================================================
{ settings, roles, meta, oidcGenerator }:
{ config, lib, pkgs, ... }:
let
  prometheusHosts = builtins.attrNames (roles.prometheus.machines or { });
  lokiHosts = builtins.attrNames (roles.loki.machines or { });

  oidc = settings.oidc;
in
{
  # SMTP password file
  clan.core.vars.generators."grafana".prompts.smtp-password.persist = true;

  # OIDC client secret — declared here so the producing host (where grafana
  # runs) has the files. The same generator definition is also exported via
  # auth.varsGenerator so the authelia host declares it too (share=true).
  # runtimeInputs is added here (not in the export) because pkgs is only
  # available inside nixosModule, not at inventory-eval time.
  clan.core.vars.generators."authelia-oidc-${oidc.clientId}" = lib.mkIf oidc.enable (
    oidcGenerator
    // {
      runtimeInputs = with pkgs; [
        coreutils
        openssl
        authelia
        gnused
      ];
    }
  );

  # Grafana secret key for signing
  clan.core.vars.generators."grafana-secret-key" = {
    files."secret-key".owner = "grafana";
    runtimeInputs = [ pkgs.openssl ];
    script = ''
      openssl rand -hex 32 > "$out/secret-key"
    '';
  };

  # Backup Graphana dir, contains stateful config
  pinpox.services.restic-client.backup-paths-offsite = [ "/var/lib/grafana" ];

  # Reverse proxy
  services.caddy = {
    enable = true;
    virtualHosts."${settings.domain}".extraConfig = "reverse_proxy 127.0.0.1:9005";
  };

  # Graphana fronend
  services.grafana = {

    enable = true;

    settings = {
      server = {
        domain = settings.domain;
        root_url = "https://${settings.domain}/";
        # Default is 3000
        http_port = 9005;
        http_addr = "127.0.0.1";
      };

      security.secret_key = "$__file{${config.clan.core.vars.generators."grafana-secret-key".files."secret-key".path}}";

      # Mail notifications
      smtp = {
        enabled = true;
        host = "smtp.sendgrid.net:587";
        user = "apikey";
        passwordFile = "${config.clan.core.vars.generators."grafana".files."smtp-password".path}";
        fromAddress = "status@pablo.tools";
      };
    }
    // lib.optionalAttrs oidc.enable {
      # SCIM is enabled by default in recent Grafana versions and intercepts
      # OIDC user provisioning, causing "Failed to create user: user not
      # found". Disable it so the standard generic_oauth flow can create users.
      feature_toggles.enableSCIM = false;

      # OIDC-only login: hide the username/password form, do not auto-create
      # local users via signup, redirect straight to the OIDC provider.
      auth = {
        disable_login_form = true;
        signout_redirect_url = "${oidc.issuer}/logout";
        # Self-healing OIDC user linking: if user_auth has no row for the
        # OIDC subject (e.g. fresh DB restore, or Authelia rebuilt and the
        # sub UUID changed), Grafana falls back to matching by email and
        # auto-creates the user_auth link. Safe here because Authelia is a
        # fully trusted IdP we control.
        oauth_allow_insecure_email_lookup = true;
      };
      users = {
        # Must be true so the OIDC provisioning path can create new users.
        # disable_login_form = true (above) already prevents the local signup
        # form from being rendered, so this only enables OIDC-initiated signup.
        allow_sign_up = true;
        auto_assign_org = true;
        auto_assign_org_role = "Admin";
      };
      "auth.generic_oauth" = {
        enabled = true;
        name = oidc.providerName;
        icon = "signin";
        auto_login = true;
        client_id = oidc.clientId;
        client_secret = "$__file{${config.clan.core.vars.generators."authelia-oidc-${oidc.clientId}".files.client_secret.path}}";
        scopes = "openid profile email groups";
        empty_scopes = false;
        auth_url = "${oidc.issuer}/api/oidc/authorization";
        token_url = "${oidc.issuer}/api/oidc/token";
        api_url = "${oidc.issuer}/api/oidc/userinfo";
        login_attribute_path = "preferred_username";
        email_attribute_path = "email";
        name_attribute_path = "name";
        groups_attribute_path = "groups";
        # Authelia already restricts who can reach the client via its
        # authorization policy, so anyone who successfully logs in is granted
        # Admin in Grafana.
        role_attribute_path = "'Admin'";
        allow_sign_up = true;
        use_pkce = true;
      };
    };

    # TODO provision the dashboards as currently configured

    provision.datasources.settings = {
      datasources =
        lib.optional (prometheusHosts != [ ]) {
          name = "Prometheus";
          url = "http://${builtins.head prometheusHosts}.${meta.domain}:9090";
          type = "prometheus";
          isDefault = true;
        }
        ++ lib.optional (lokiHosts != [ ]) {
          name = "loki";
          url = "http://${builtins.head lokiHosts}.${meta.domain}:3100";
          type = "loki";
        };
    };
  };
}


================================================
FILE: clan-service-modules/monitoring/loki.nix
================================================
{ ... }:
let
  port-loki = 3100;
in
{
  pinpox.services.restic-client.backup-paths-exclude = [ "/var/lib/loki" ];

  networking.firewall = {
    enable = true;
    interfaces.wg-clan.allowedTCPPorts = [ port-loki ];
  };

  services.loki = {
    enable = true;
    configuration = {
      auth_enabled = false;

      server.http_listen_port = port-loki;

      ingester = {
        lifecycler = {
          address = "0.0.0.0";
          ring = {
            kvstore.store = "inmemory";
            replication_factor = 1;
          };
          final_sleep = "0s";
        };

        # Any chunk not receiving new logs in this time will be flushed
        chunk_idle_period = "1h";

        # All chunks will be flushed when they hit this age, default is 1h
        max_chunk_age = "1h";
        # Loki will attempt to build chunks up to 1.5MB, flushing first if
        # chunk_idle_period or max_chunk_age is reached first
        chunk_target_size = 1048576;

        # Must be greater than index read cache TTL if using an index cache (Default
        # index read cache TTL is 5m)
        chunk_retain_period = "30s";
      };

      schema_config.configs = [
        {
          from = "2020-10-24";
          store = "boltdb-shipper";
          object_store = "filesystem";
          schema = "v13";
          index = {
            prefix = "index_";
            period = "24h";
          };
        }
      ];

      storage_config = {

        boltdb_shipper = {
          active_index_directory = "/var/lib/loki/boltdb-shipper-active";
          cache_location = "/var/lib/loki/boltdb-shipper-cache";

          # Can be increased for faster performance over longer query periods,
          # uses more disk space
          cache_ttl = "24h";
        };

        filesystem.directory = "/var/lib/loki/chunks";
      };

      limits_config = {
        reject_old_samples = true;
        reject_old_samples_max_age = "168h";
        allow_structured_metadata = false;
      };

      table_manager = {
        retention_deletes_enabled = false;
        retention_period = "0s";
      };

      compactor.working_directory = "/var/lib/loki/boltdb-shipper-compactor";
    };
  };
}


================================================
FILE: clan-service-modules/monitoring/node-exporter.nix
================================================
{ ... }:
{
  services.prometheus.exporters.node = {
    enable = true;
    # Default port is 9100
    # Listen on 0.0.0.0, but we only open the firewall for wg-clan
    openFirewall = false;
    enabledCollectors = [
      "cgroups"
      "systemd"
    ];

    extraFlags = [ "--collector.textfile.directory=/etc/nix" ];
  };

  networking.firewall.interfaces.wg-clan.allowedTCPPorts = [ 9100 ];
}


================================================
FILE: clan-service-modules/monitoring/prometheus.nix
================================================
{ settings, roles, meta, prometheusOidcGenerator }:
{
  lib,
  pkgs,
  config,
  flake-self,
  pinpox-utils,
  ...
}:
let
  nodeExporterHosts = builtins.attrNames (roles."node-exporter".machines or { });
in
{
  clan.core.vars.generators."restic-exporter" = pinpox-utils.mkEnvGenerator [
    "RESTIC_PASSWORD"
    "AWS_ACCESS_KEY_ID"
    "AWS_SECRET_ACCESS_KEY"
    "RESTIC_REPOSITORY"
  ];

  # OIDC client secret generator — declared here so the producing host has the
  # files. The same definition is exported via auth.varsGenerator so the
  # authelia host also declares it (share=true). runtimeInputs added here
  # because pkgs isn't available at inventory-eval time.
  clan.core.vars.generators."authelia-oidc-prometheus" = prometheusOidcGenerator // {
    runtimeInputs = with pkgs; [
      coreutils
      openssl
      authelia
      gnused
    ];
  };

  # oauth2-proxy sits between Caddy and Prometheus and handles the OIDC
  # client flow against Authelia. Prometheus itself stays on 127.0.0.1:9090
  # (loopback only); the only way to reach it is through oauth2-proxy on
  # 127.0.0.1:4180, which Caddy reverse-proxies as ${settings.domain}.
  services.oauth2-proxy = {
    enable = true;
    provider = "oidc";
    clientID = "prometheus";
    keyFile = config.clan.core.vars.generators."authelia-oidc-prometheus".files.envfile.path;
    oidcIssuerUrl = "https://auth.pablo.tools";
    redirectURL = "https://${settings.domain}/oauth2/callback";
    upstream = [ "http://127.0.0.1:9090" ];
    httpAddress = "http://127.0.0.1:4180";
    cookie.secure = true;
    cookie.refresh = "1h";
    email.domains = [ "*" ];
    setXauthrequest = true;
    reverseProxy = true;
    extraConfig = {
      skip-provider-button = true;
      # Authelia's prometheus client is registered with require_pkce = true,
      # so oauth2-proxy must send a PKCE code_challenge on the authorize
      # request and the matching verifier on the token exchange.
      code-challenge-method = "S256";
      # Authelia's authorization_policies already restrict who can reach this
      # client; oauth2-proxy doesn't need to enforce its own allowlist.
    };
  };

  # Reverse proxy for the prometheus web UI. The pki clan service auto-issues
  # a TLS cert for ${settings.domain} and prepends a `tls` directive to this
  # vhost; dm-dns distributes a CNAME so any clan-internal host can resolve
  # it. Caddy hands traffic to oauth2-proxy, which performs the OIDC dance
  # against Authelia and (if authorized) proxies upstream to Prometheus.
  services.caddy = {
    enable = true;
    virtualHosts."${settings.domain}".extraConfig = "reverse_proxy 127.0.0.1:4180";
  };

  services.prometheus = {
    enable = true;

    # Bind to localhost only — defense in depth on top of the host firewall.
    # The only way in from outside the host is via Caddy → oauth2-proxy →
    # 127.0.0.1:9090.
    listenAddress = "127.0.0.1";

    # Disable config checks. They will fail because they run sandboxed and
    # can't access external files, e.g. the secrets stored in /run/keys
    # https://github.com/NixOS/nixpkgs/blob/d89d7af1ba23bd8a5341d00bdd862e8e9a808f56/nixos/modules/services/monitoring/prometheus/default.nix#L1732-L1738
    checkConfig = false;

    webExternalUrl = settings.webExternalUrl;
    extraFlags = [
      "--log.level=debug"
      "--storage.tsdb.retention.size='6GB'"
    ];
    ruleFiles = [
      (pkgs.writeText "prometheus-rules.yml" (
        builtins.toJSON {
          groups = [
            {
              name = "alerting-rules";
              rules = import ./alert-rules.nix { inherit lib meta; };
            }
          ];
        }
      ))
    ];
    alertmanagers = [ { static_configs = [ { targets = [ "localhost:9093" ]; } ]; } ];

    scrapeConfigs = [
      {
        job_name = "backup-reports";
        scrape_interval = "60m";
        metrics_path = "/probe";
        static_configs = [ { targets = settings.jsonTargets; } ];

        relabel_configs = [
          {
            source_labels = [ "__address__" ];
            target_label = "__param_target";
          }
          {
            source_labels = [ "__param_target" ];
            target_label = "instance";
          }
          {
            target_label = "__address__";
            replacement = "127.0.0.1:7979"; # The blackbox exporter's real hostname:port.
          }
        ];
      }
      # TODO: move restic-client to a clan service so this can be discovered
      # via roles.<restic>.machines instead of filtering flake-self.
      {
        job_name = "restic-exporter";
        scrape_interval = "1h";
        metrics_path = "/probe";
        static_configs = [
          {
            targets = (
              builtins.attrNames (
                lib.filterAttrs (
                  n: v: v.config.pinpox.services.restic-client.enable
                ) flake-self.nixosConfigurations
              )
            );
          }
        ];
        relabel_configs = [
          {
            source_labels = [ "__address__" ];
            target_label = "__param_target";
          }
          {
            source_labels = [ "__param_target" ];
            target_label = "instance";
          }
          {
            target_label = "__address__";
            replacement = "127.0.0.1:${builtins.toString config.services.restic-exporter.port}";
          }
        ];
      }
      {
        job_name = "blackbox";
        scrape_interval = "2m";
        metrics_path = "/probe";
        params = {
          module = [ "http_2xx" ];
        };
        static_configs = [ { targets = settings.blackboxTargets; } ];

        relabel_configs = [
          {
            source_labels = [ "__address__" ];
            target_label = "__param_target";
          }
          {
            source_labels = [ "__param_target" ];
            target_label = "instance";
          }
          {
            target_label = "__address__";
            replacement = "127.0.0.1:9115"; # The blackbox exporter's real hostname:port.
          }
        ];
      }
      {
        job_name = "node-stats";
        static_configs = [
          {
            # Hosts assigned the "node-exporter" role of this monitoring instance
            targets = map (h: "${h}.${meta.domain}:9100") nodeExporterHosts;
          }
        ];
      }
    ];
    alertmanager = {
      enable = true;
      # port = 9093; # Default
      listenAddress = "127.0.0.1";
      webExternalUrl = settings.alertmanagerWebExternalUrl;
      environmentFile = /var/src/secrets/alertmanager/envfile;
      configuration = {

        route = {
          receiver = "all";
          group_by = [ "instance" ];
          group_wait = "30s";
          group_interval = "2m";
          repeat_interval = "24h";
        };

        receivers = [
          {
            name = "all";
            webhook_configs = [
              { url = "http://127.0.0.1:11000/alert"; } # matrix-hook
              { url = with config.services.alertmanager-ntfy; "http://${httpAddress}:${httpPort}"; } # alertmanger-ntfy
            ];
          }
        ];
      };
    };
  };
}


================================================
FILE: clan-service-modules/navidrome.nix
================================================
{ ... }:
{
  _class = "clan.service";
  manifest.name = "navidrome";
  manifest.description = "Navidrome music streaming server";
  manifest.readme = "Self-hosted music streaming server with subsonic API";
  manifest.categories = [ "Media" ];
  manifest.exports.out = [ "endpoints" ];

  roles.default = {
    description = "Sets up navidrome music server with caddy reverse proxy";
    interface =
      { lib, meta, ... }:
      {
        options = {
          host = lib.mkOption {
            type = lib.types.str;
            default = "music.${meta.domain}";
            description = "Host serving the navidrome instance";
            example = "party.0cx.de";
          };
        };
      };

    perInstance =
      {
        settings,
        mkExports,
        ...
      }:
      {

        exports = mkExports { endpoints.hosts = [ settings.host ]; };

        nixosModule =
          { config, ... }:
          {
            config = {
              # Reverse proxy
              services.caddy = {
                enable = true;
                virtualHosts."${settings.host}".extraConfig =
                  "reverse_proxy 127.0.0.1:${toString config.services.navidrome.settings.Port}";
              };

              # Mount storagebox
              pinpox.defaults.storagebox = {
                enable = true;
                mountOnAccess = false;
              };

              # Add navidrome user to storage-users group for access to storagebox
              users.users.navidrome.extraGroups = [ "storage-users" ];

              # Set up navidrome
              services.navidrome = {
                enable = true;
                settings.Port = 4533;
                settings.Address = "127.0.0.1";
                settings.MusicFolder = "${config.pinpox.defaults.storagebox.mountPoint}/music";
              };

              # Ensure storagebox is mounted before navidrome starts
              systemd.services.navidrome = {
                requires = [ "mnt-storagebox.mount" ];
                after = [ "mnt-storagebox.mount" ];
              };
            };
          };
      };
  };
}


================================================
FILE: clan-service-modules/thelounge.nix
================================================
{ ... }:
{
  _class = "clan.service";
  manifest.name = "thelounge";
  manifest.description = "The Lounge IRC client and bouncer";
  manifest.readme = "Self-hosted IRC client and bouncer with web interface";
  manifest.categories = [ "Communication" ];
  manifest.exports.out = [ "endpoints" ];

  roles.default = {
    description = "Sets up The Lounge IRC client with caddy reverse proxy";
    interface =
      { lib, meta, ... }:
      {
        options = {
          host = lib.mkOption {
            type = lib.types.str;
            default = "irc.${meta.domain}";
            description = "Host serving the The Lounge instance.";
          };
        };
      };

    perInstance =
      {
        settings,
        mkExports,
        ...
      }:
      {
        exports = mkExports { endpoints.hosts = [ settings.host ]; };

        nixosModule =
          { config, ... }:
          {
            config = {
              # Reverse proxy
              services.caddy = {
                enable = true;
                virtualHosts."${settings.host}".extraConfig =
                  "reverse_proxy 127.0.0.1:${toString config.services.thelounge.port}";
              };

              # Set up The Lounge
              services.thelounge = {
                enable = true;
                port = 9090;
                public = false;
                extraConfig = {
                  host = "127.0.0.1";
                  reverseProxy = true;
                  storagePolicy = {
                    enabled = true;
                    maxAgeDays = 365;
                    deletionPolicy = "everything";
                  };
                  theme = "morning";
                };
              };

              # Backup paths
              pinpox.services.restic-client.backup-paths-offsite = [
                "/var/lib/thelounge/certificates"
                "/var/lib/thelounge/config.js"
                # Don't backup logs for now - too big.
                # "/var/lib/thelounge/logs"
                # "/var/lib/thelounge/packages"
                "/var/lib/thelounge/sts-policies.json"
                "/var/lib/thelounge/users"
                "/var/lib/thelounge/vapid.json"
              ];
            };
          };
      };
  };
}


================================================
FILE: flake.nix
================================================
{
  description = "My machines";

  inputs = {

    wrappers.url = "github:lassulus/wrappers";
    wrappers.inputs.nixpkgs.follows = "nixpkgs";

    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable?shallow=1";

	clan-core.url = "https://git.clan.lol/clan/clan-core/archive/main.tar.gz";
    clan-core.inputs.nixpkgs.follows = "nixpkgs";
    clan-core.inputs.disko.follows = "disko";
    clan-core.inputs.data-mesher.follows = "data-mesher";

    data-mesher.url = "git+https://git.clan.lol/clan/data-mesher";
    data-mesher.inputs.nixpkgs.follows = "nixpkgs";

	clan-community.url = "https://git.clan.lol/clan/clan-community/archive/main.tar.gz";
    clan-community.inputs.clan-core.follows = "clan-core";
    clan-community.inputs.nixpkgs.follows = "nixpkgs";

    rio.url = "github:pinpox/rio";
    rio.inputs.nixpkgs.follows = "nixpkgs";
    rio.inputs.systems.follows = "clan-core/systems";

    khard.url = "github:lucc/khard";
    khard.inputs.nixpkgs.follows = "nixpkgs";

    gif-searcher.url = "github:pinpox/gif-searcher";
    gif-searcher.inputs.nixpkgs.follows = "nixpkgs";

    nix-index-database.url = "github:nix-community/nix-index-database";
    nix-index-database.inputs.nixpkgs.follows = "nixpkgs";

    disko.url = "github:nix-community/disko/latest";
    disko.inputs.nixpkgs.follows = "nixpkgs";

    jitsi-matrix-presence.url = "github:pinpox/jitsi-matrix-presence";
    jitsi-matrix-presence.inputs.nixpkgs.follows = "nixpkgs";

    nixos-hardware.url = "github:NixOS/nixos-hardware/master";

    aoe-taunt-discord-bot.url = "github:pinpox/aoe-taunt-discord-bot";
    aoe-taunt-discord-bot.inputs.nixpkgs.follows = "nixpkgs";

    pinpox-keys.url = "https://github.com/pinpox.keys";
    pinpox-keys.flake = false;

    pinpox-neovim.url = "github:pinpox/pinpox-neovim";
    pinpox-neovim.inputs.nixpkgs.follows = "nixpkgs";

    radio.url = "github:pinpox/radio";
    radio.inputs.nixpkgs.follows = "nixpkgs";

    mc3000.url = "github:pinpox/mc3000";
    mc3000.inputs.nixpkgs.follows = "nixpkgs";

    naersk.url = "github:nix-community/naersk/master";
    naersk.inputs.nixpkgs.follows = "nixpkgs";

    promterm.url = "github:pinpox/promterm";
    promterm.inputs = {
      nixpkgs.follows = "nixpkgs";
      naersk.follows = "naersk";
    };

    go-karma-bot.url = "github:pinpox/go-karma-bot";
    go-karma-bot.inputs.nixpkgs.follows = "nixpkgs";

    retiolum.url = "git+https://git.thalheim.io/Mic92/retiolum";
    retiolum.inputs.nixpkgs.follows = "nixpkgs";

    flake-compat.url = "github:edolstra/flake-compat";
    flake-compat.flake = false;

    home-manager.url = "github:nix-community/home-manager";
    home-manager.inputs.nixpkgs.follows = "nixpkgs";

    distro.url = "path:/home/pinpox/code/github.com/generational-infrastructure/distro";
    distro.inputs.nixpkgs.follows = "nixpkgs";
    distro.inputs.opencrow.follows = "opencrow";
    distro.inputs.treefmt-nix.follows = "treefmt-nix";

    nur.url = "github:pinpox/NUR";
    nur.inputs.nixpkgs.follows = "nixpkgs";
    nur.inputs.flake-parts.follows = "clan-core/flake-parts";

    wl-harmonograph.url = "github:pinpox/wl-harmonograph";
    wl-harmonograph.inputs.nixpkgs.follows = "nixpkgs";

    restic-exporter.url = "github:pinpox/restic-exporter";
    restic-exporter.inputs.nixpkgs.follows = "nixpkgs";
    restic-exporter.inputs.flake-utils.follows = "age-plugin-picohsm/flake-utils";

    alertmanager-ntfy = {
      url = "github:pinpox/alertmanager-ntfy";
      inputs = {
        nixpkgs.follows = "nixpkgs";
        flake-compat.follows = "flake-compat";
        flake-utils.follows = "age-plugin-picohsm/flake-utils";
      };
    };

    matrix-hook.url = "github:pinpox/matrix-hook";
    matrix-hook.inputs = {
      nixpkgs.follows = "nixpkgs";
      flake-compat.follows = "flake-compat";
      flake-utils.follows = "age-plugin-picohsm/flake-utils";
    };

    # ZSH plugins
    zsh-abbrev-alias.url = "github:momo-lab/zsh-abbrev-alias";
    zsh-abbrev-alias.flake = false;

    zsh-colored-man-pages.url = "github:ael-code/zsh-colored-man-pages";
    zsh-colored-man-pages.flake = false;

    jj-zsh-prompt.url = "github:pinpox/jj-zsh-prompt";
    jj-zsh-prompt.inputs.nixpkgs.follows = "nixpkgs";

    zsh-async.url = "github:mafredri/zsh-async";
    zsh-async.flake = false;

    nix-apple-fonts = {
      url = "github:pinpox/nix-apple-fonts";
      inputs.flake-compat.follows = "flake-compat";
      inputs.flake-utils.follows = "age-plugin-picohsm/flake-utils";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    treefmt-nix.follows = "clan-core/treefmt-nix";

    age-plugin-picohsm.url = "github:pinpox/age-plugin-picohsm";
    age-plugin-picohsm.inputs.nixpkgs.follows = "nixpkgs";

    passage-secret-service.url = "github:pinpox/passage-secret-service";
    passage-secret-service.inputs.nixpkgs.follows = "nixpkgs";

    llm-agents.url = "github:numtide/llm-agents.nix";
    llm-agents.inputs.nixpkgs.follows = "nixpkgs";
    llm-agents.inputs.treefmt-nix.follows = "treefmt-nix";

    opencrow.url = "github:pinpox/opencrow";
    opencrow.inputs.nixpkgs.follows = "nixpkgs";
    opencrow.inputs.treefmt-nix.follows = "treefmt-nix";

    mics-skills.url = "github:Mic92/mics-skills";
    mics-skills.inputs.nixpkgs.follows = "nixpkgs";
    mics-skills.inputs.treefmt-nix.follows = "treefmt-nix";

    twitch-first.url = "github:pinpox/twitch-first";
    twitch-first.inputs.nixpkgs.follows = "nixpkgs";

    trippy-track.url = "github:pinpox/trippy-track";
    trippy-track.inputs.nixpkgs.follows = "nixpkgs";
  };
  outputs =
    { self, ... }@inputs:
    with inputs;
    let

      # System types to support.
      supportedSystems = [
        "x86_64-linux"
        "x86_64-darwin"
        "aarch64-linux"
        "aarch64-darwin"
      ];

      # Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
      forAllSystems = nixpkgs.lib.genAttrs supportedSystems;

      # Nixpkgs instantiated for supported system types.
      nixpkgsFor = forAllSystems (
        system:
        import nixpkgs {
          inherit system;
          overlays = [ self.overlays.default ];
        }
      );

      # treefmt configuration
      treefmtEval = import ./formatter.nix { inherit treefmt-nix nixpkgsFor forAllSystems; };

      clan = clan-core.lib.clan {

        # this needs to point at the repository root
        inherit self;

        # Vars backend configuration (moved from machine-level)
        vars.settings.secretStore = "password-store";

        # Make inputs and the flake itself accessible as module parameters.
        # Technically, adding the inputs is redundant as they can be also
        # accessed with flake-self.inputs.X, but adding them individually
        # allows to only pass what is needed to each module.
        specialArgs = {
          flake-self = self;
        }
        // inputs;

        # Register custom clan service modules
        # desktop, localsend, wireguard-star moved to clan-community
        modules."@pinpox/navidrome" = ./clan-service-modules/navidrome.nix;
        modules."@pinpox/thelounge" = ./clan-service-modules/thelounge.nix;
        modules."@pinpox/machine-type" = ./clan-service-modules/machine-type;
        modules."@pinpox/monitoring" = ./clan-service-modules/monitoring;
        inventory = import ./inventory.nix { inherit self; };
      };
    in
    {

      devShells = forAllSystems (
        system: with nixpkgsFor.${system}; {
          default = pkgs.mkShell {
            packages = [
              clan-core.packages.${system}.clan-cli
              treefmtEval.${system}.config.build.wrapper
            ];
          };
        }
      );

      # Custom packages added via the overlay are selectively exposed here, to
      # allow using them from other flakes that import this one.
      packages =
        forAllSystems (
          system: with nixpkgsFor.${system}; {
            inherit
              hello-custom
              fritzbox_exporter
              mqtt2prometheus
              smartmon-script
              machine-report
              woodpecker-pipeline
              manual
              ;
          }
        )
        // {
          # Flashable SD card image for uconsole (uses binfmt emulation)
          # Build with: nix build .#uconsole-image
          # Then flash with: dd if=result/main.raw of=/dev/sdX bs=4M status=progress

          # Build the image on the remote server
          # ssh root@build01.clan.lol \
          #   'nix build github:pinpox/nixos#packages.aarch64-linux.uconsole-image -L'

          # Download image (compressed)
          # ssh root@build01.clan.lol \
          #  'zstd -c \
          #  $(nix build github:pinpox/nixos#packages.aarch64-linux.uconsole-image --print-out-paths)/main.raw' > \
          #  uconsole.img.zst

          # Decompress
          # zstd -d uconsole.img.zst

          aarch64-linux = (forAllSystems (s: { })).aarch64-linux // {
            uconsole-image = self.nixosConfigurations.uconsole.config.system.build.diskoImages;
          };
        };

      # Expose overlay to flake outputs, to allow using it from other flakes.
      # Flake inputs are passed to the overlay so that the packages defined in
      # it can use the sources pinned in flake.lock
      overlays.default = final: prev: (import ./overlays inputs self pinpox-utils) final prev;

      # Use treefmt for 'nix fmt'
      formatter = forAllSystems (system: treefmtEval.${system}.config.build.wrapper);

      # Expose treefmt check for CI
      checks = forAllSystems (system: {
        formatting = treefmtEval.${system}.config.build.check self;
      });

      # Machine toplevels for CI builds and cache pushing
      ciBuilds = forAllSystems (
        system:
        nixpkgs.lib.mapAttrs' (
          name: config:
          nixpkgs.lib.nameValuePair name config.config.system.build.toplevel
        ) (nixpkgs.lib.filterAttrs (_: config: config.pkgs.stdenv.hostPlatform.system == system) self.nixosConfigurations)
      );

      # Each subdirectory in ./templates/<template-name> is a
      # template, which can be used for new proects with:
      # `nix flake init`
      templates = builtins.listToAttrs (
        map (name: {
          inherit name;
          value = {
            path = ./templates + "/${name}";
            description = (import (./templates + "/${name}/flake.nix")).description;
          };
        }) (builtins.attrNames (builtins.readDir ./templates))
      );

      # Output all modules in ./modules/<module-name> to flake. Modules should be in
      # individual subdirectories and contain a default.nix file.
      # Each subdirectory in ./modules/<module-name> is a nixos module
      nixosModules = builtins.listToAttrs (
        map (name: {
          inherit name;
          value = import (./modules + "/${name}");
        }) (builtins.attrNames (builtins.readDir ./modules))
      );

      # Each subdirectory in ./machines/<machine-name> is a host config. Clan
      # auto-imports all machines from ./machines
      inherit (clan.config) clanInternals;
      nixosConfigurations = clan.config.nixosConfigurations;
      clan = clan.config;

      # Each subdirectory in ./home-manager/profiles/<profile-name> is a
      # home-manager profile
      homeConfigurations = builtins.listToAttrs (
        map
          (name: {
            inherit name;
            value =
              { ... }:
              {
                imports = [
                  (./home-manager/profiles + "/${name}")
                ]
                ++ (builtins.attrValues self.homeManagerModules);
              };
          })
          (
            builtins.attrNames (
              nixpkgs.lib.filterAttrs (n: v: v == "directory") (builtins.readDir ./home-manager/profiles)
            )
          )
      );

      # Each subdirectory in ./home-manager/modules/<module-name> is a
      # home-manager module
      homeManagerModules = builtins.listToAttrs (
        map (name: {
          inherit name;
          value = import (./home-manager/modules + "/${name}");
        }) (builtins.attrNames (builtins.readDir ./home-manager/modules))
      );
    };
}


================================================
FILE: formatter.nix
================================================
{
  treefmt-nix,
  nixpkgsFor,
  forAllSystems,
}:
forAllSystems (
  system:
  treefmt-nix.lib.evalModule nixpkgsFor.${system} {
    projectRootFile = "flake.nix";
    programs = {
      nixfmt.enable = true;
      flake-edit.enable = true;
      nixfmt.package = nixpkgsFor.${system}.nixfmt;
      prettier.enable = true;
      shellcheck.enable = true;
      shfmt.enable = true;
    };
    settings.formatter = {
      prettier.includes = [
        "*.md"
        "*.yaml"
        "*.yml"
        "*.json"
        "*.toml"
      ];
      shellcheck.includes = [ "*.sh" ];
      shfmt.includes = [ "*.sh" ];
    };
  }
)


================================================
FILE: home-manager/colorscheme.nix
================================================
{ lib, ... }:
with lib;
let
  colornames = [
    "Black"
    "BrightBlack"
    "White"
    "BrightWhite"
    "Yellow"
    "BrightYellow"
    "Green"
    "BrightGreen"
    "Cyan"
    "BrightCyan"
    "Blue"
    "BrightBlue"
    "Magenta"
    "BrightMagenta"
    "Red"
    "BrightRed"
  ];
in
{

  options.pinpox.colors = builtins.listToAttrs (
    map (c: {
      name = c;
      value = mkOption { type = types.str; };
    }) colornames
  );

  config.pinpox.colors = {

    Black = "000000"; # 000000
    BrightBlack = "262626"; # 262626
    White = "d0d0d0"; # d0d0d0
    BrightWhite = "ffffff"; # ffffff
    Red = "d7005f"; # d7005f
    BrightRed = "ff5f87"; # ff5f87
    Green = "00af5f"; # 00af5f
    BrightGreen = "00d75f"; # 00d75f
    Yellow = "d78700"; # d78700
    BrightYellow = "ffaf00"; # ffaf00
    Blue = "0087d7"; # 0087d7
    BrightBlue = "00afff"; # 00afff
    Magenta = "d787d7"; # d787d7
    BrightMagenta = "ff87ff"; # ff87ff
    Cyan = "00afaf"; # 00afaf
    BrightCyan = "00d7d7"; # 00d7d7
  };
}


================================================
FILE: home-manager/modules/audio-recording/default.nix
================================================
{
  config,
  lib,
  pkgs,
  ...
}:
with lib;
let
  cfg = config.pinpox.defaults.audio-recording;
  plugins = with pkgs; [
    # Instruments
    x42-avldrums
    zynaddsubfx

    # Effects
    calf
    lsp-plugins
    zam-plugins
    talentedhack
    gxplugins-lv2
    distrho
  ];
in
{

  # These settings yield 10ms@1024 spls latency in reaper for me:
  # pw-metadata -n settings 0 clock.force-quantum 1024
  # pw-metadata -n settings 0 clock.force-rate 96000

  options.pinpox.defaults.audio-recording.enable =
    mkEnableOption "audio production setup (DAW and plugins)";

  config = mkIf cfg.enable {

    home.packages =
      with pkgs;
      [
        reaper
        alsa-scarlett-gui
      ]

      # Some plugins also have a binary, so we also add them to PATH
      ++ plugins;

    # Place vst, vst3, clap, lv2 and ladspa plugins in the according
    # directories where reaper will look for them
    home.file =
      let
        all-audio-plugins = pkgs.symlinkJoin {
          name = "all-audio-plugins";
          paths = plugins;
        };
      in
      {
        all-lv2 = {
          recursive = true;
          source = "${all-audio-plugins}/lib/lv2";
          target = ".lv2";
        };
        all-clap = {
          recursive = true;
          source = "${all-audio-plugins}/lib/clap";
          target = ".clap";
        };
        all-vst = {
          recursive = true;
          source = "${all-audio-plugins}/lib/vst";
          target = ".vst";
        };
        all-vst3 = {
          recursive = true;
          source = "${all-audio-plugins}/lib/vst3";
          target = ".vst3";
        };
        all-ladspa = {
          recursive = true;
          source = "${all-audio-plugins}/lib/ladspa";
          target = ".ladspa";
        };
      };
  };
}


================================================
FILE: home-manager/modules/calendar/default.nix
================================================
{
  config,
  lib,
  pkgs,
  flake-inputs,
  ...
}:

with lib;

let
  cfg = config.pinpox.defaults.calendar;
in
{
  options.pinpox.defaults.calendar.enable = mkEnableOption "Calendar config";

  config = mkIf cfg.enable {

    programs.vdirsyncer.enable = true;
    services.vdirsyncer.enable = true;

    programs.khal.enable = true;
    programs.khal.settings = {

      default.default_calendar = "Kalender";

      # view = {
      #   agenda_event_format = "{calendar-color}{cancelled}{start-end-time-style} {title}{repeat-symbol}{reset}";
      # };
    };

    programs.khard.enable = true;
    programs.khard.package = flake-inputs.khard.packages."x86_64-linux".default;

    # khard.settings is broken, it does not support subsections, so we write
    # the file directly
    xdg.configFile."khard/khard.conf".source = pkgs.writeTextFile {
      name = "khard.conf";
      text = ''
        [addressbooks]
        [[mailbox]]
        path = ~/.local/share/office/contacts/mailbox/*
        type = discover

        [[gmail]]
        path = ~/.local/share/office/contacts/gmail/*
        type = discover

        [[nextcloud]]
        path = ~/.local/share/office/contacts/nextcloud/*
        type = discover

        [general]
        debug = no
        default_action = list
        # These are either strings or comma seperated lists
        editor = nvim, -i, NONE
        merge_editor = nvim, -d
      '';
    };

    accounts.contact.accounts = {

      "nextcloud" = {
        vdirsyncer = {
          enable = true;
          collections = [
            "from a"
            "from b"
          ];
          metadata = [
            "color"
            "displayname"
          ];

          userNameCommand = [
            "${pkgs.passage}/bin/passage"
            "vdirsyncer-nextcloud-user"
          ];
        };
        remote = {
          type = "carddav";
          url = "https://files.pablo.tools";
          passwordCommand = [
            "${pkgs.passage}/bin/passage"
            "vdirsyncer-nextcloud"
          ];
        };
        local = {
          type = "filesystem";
          path = "/home/pinpox/.local/share/office/contacts/nextcloud";
        };
      };

      "mailbox" = {
        vdirsyncer = {
          enable = true;
          collections = [
            "from a"
            "from b"
          ];
          metadata = [
            "color"
            "displayname"
          ];

          userNameCommand = [
            "${pkgs.passage}/bin/passage"
            "vdirsyncer-mailbox-user"
          ];
        };
        remote = {
          type = "carddav";
          url = "https://dav.mailbox.org/carddav/";
          passwordCommand = [
            "${pkgs.passage}/bin/passage"
            "vdirsyncer-mailbox"
          ];
        };
        local = {
          type = "filesystem";
          path = "/home/pinpox/.local/share/office/contacts/mailbox";
        };
      };

      "gmail" = {
        vdirsyncer = {
          enable = true;
          collections = [
            "from a"
            "from b"
          ];
          metadata = [
            "color"
            "displayname"
          ];

          clientIdCommand = [
            "${pkgs.passage}/bin/passage"
            "vdirsyncer-gmail-clientid"
          ];
          clientSecretCommand = [
            "${pkgs.passage}/bin/passage"
            "vdirsyncer-gmail-clientsecret"
          ];
          tokenFile = "/home/pinpox/.local/share/vdirsyncer-contacts-gmail-token";
        };
        remote = {
          type = "google_contacts";
        };
        local = {
          type = "filesystem";
          path = "/home/pinpox/.local/share/office/contacts/gmail";
        };
      };
    };

    accounts.calendar.accounts = {

      "nextcloud" = {

        khal = {
          enable = true;
          type = "discover";
          priority = 1;
        };

        vdirsyncer = {
          enable = true;
          collections = [
            "from a"
            "from b"
          ];
          metadata = [
            "color"
            "displayname"
          ];

          userNameCommand = [
            "${pkgs.passage}/bin/passage"
            "vdirsyncer-nextcloud-user"
          ];
        };
        remote = {
          type = "caldav";
          url = "https://files.pablo.tools/";

          passwordCommand = [
            "${pkgs.passage}/bin/passage"
            "vdirsyncer-nextcloud"
          ];
        };
        local = {
          type = "filesystem";
          path = "/home/pinpox/.local/share/office/calendars/nextcloud";
        };
      };

      "mailbox" = {

        khal = {
          enable = true;
          type = "discover";
          priority = 1;
        };

        vdirsyncer = {
          enable = true;
          collections = [
            "from a"
            "from b"
          ];
          metadata = [
            "color"
            "displayname"
          ];

          userNameCommand = [
            "${pkgs.passage}/bin/passage"
            "vdirsyncer-mailbox-user"
          ];
        };
        remote = {
          type = "caldav";
          url = "https://dav.mailbox.org/caldav/";

          passwordCommand = [
            "${pkgs.passage}/bin/passage"
            "vdirsyncer-mailbox"
          ];
        };
        local = {
          type = "filesystem";
          path = "/home/pinpox/.local/share/office/calendars/mailbox";
        };
      };

      "icloud" = {

        khal = {
          enable = true;
          type = "discover";
          priority = 2;
        };

        vdirsyncer = {
          enable = true;
          collections = [
            "from a"
            "from b"
          ];
          metadata = [
            "color"
            "displayname"
          ];
          userNameCommand = [
            "${pkgs.passage}/bin/passage"
            "vdirsyncer-icloud-user"
          ];
        };
        remote = {
          type = "caldav";
          url = "https://caldav.icloud.com/";
          passwordCommand = [
            "${pkgs.passage}/bin/passage"
            "vdirsyncer-icloud"
          ];
        };
        local = {
          type = "filesystem";
          path = "/home/pinpox/.local/share/office/calendars/icloud";
        };
      };

      "gmail" = {

        khal = {
          enable = true;
          type = "discover";
          priority = 3;
        };

        vdirsyncer = {
          enable = true;
          collections = [
            "from a"
            "from b"
          ];
          metadata = [
            "color"
            "displayname"
          ];
          clientIdCommand = [
            "${pkgs.passage}/bin/passage"
            "vdirsyncer-gmail-clientid"
          ];
          clientSecretCommand = [
            "${pkgs.passage}/bin/passage"
            "vdirsyncer-gmail-clientsecret"
          ];
          tokenFile = "/home/pinpox/.local/share/vdirsyncer-calendar-gmail-token";
        };
        remote = {
          type = "google_calendar";
        };
        local = {
          type = "filesystem";
          path = "/home/pinpox/.local/share/office/calendars/gmail";
        };
      };
    };
  };
}


================================================
FILE: home-manager/modules/chromium/default.nix
================================================
{ config, lib, ... }:
with lib;
let
  cfg = config.pinpox.programs.chromium;
in
{
  options.pinpox.programs.chromium.enable = mkEnableOption "chromium browser";

  config = mkIf cfg.enable {
    programs.chromium = {
      enable = true;
      extensions = [
        { id = "nngceckbapebfimnlniiiahkandclblb"; } # Bitwarden
        { id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } # Ublock Origin
        { id = "gcbommkclmclpchllfjekcdonpmejbdp"; } # HTTPS everywhere
        { id = "mmpokgfcmbkfdeibafoafkiijdbfblfg"; } # Merge windows
        { id = "agldajbhchobfgjcmmigehfdcjbmipne"; } # Blank Dark New Tab
      ];
    };
  };
}


================================================
FILE: home-manager/modules/claude-code/default.nix
================================================
{
  pkgs,
  config,
  lib,
  flake-self,
  ...
}:
with lib;
let
  cfg = config.pinpox.programs.claude-code;
  mics-skills = flake-self.inputs.mics-skills;
  mics-packages = mics-skills.packages.${pkgs.stdenv.hostPlatform.system};

  firefoxPrefs = {
    "xpinstall.signatures.required" = false;
    "extensions.autoDisableScopes" = 0;
    "extensions.enabledScopes" = 15;
    "browser.shell.checkDefaultBrowser" = false;
    "datareporting.policy.dataSubmissionEnabled" = false;
    "toolkit.telemetry.reportingpolicy.firstRun" = false;
    "browser.uiCustomization.state" = builtins.toJSON {
      placements = {
        widget-overflow-fixed-list = [ ];
        unified-extensions-area = [ ];
        nav-bar = [
          "back-button"
          "forward-button"
          "stop-reload-button"
          "urlbar-container"
          "downloads-button"
          "browser-cli-controller_thalheim_io-browser-action"
          "unified-extensions-button"
        ];
        toolbar-menubar = [ "menubar-items" ];
        TabsToolbar = [ "tabbrowser-tabs" "new-tab-button" "alltabs-button" ];
        PersonalToolbar = [ "personal-bookmarks" ];
      };
      seen = [ "browser-cli-controller_thalheim_io-browser-action" ];
      dirtyAreaCache = [ "nav-bar" ];
      currentVersion = 20;
      newElementCount = 0;
    };
  };

  userJs = pkgs.writeText "browser-cli-user.js" (concatStringsSep "\n" (
    mapAttrsToList (k: v: "user_pref(${builtins.toJSON k}, ${builtins.toJSON v});") firefoxPrefs
  ));

  browser-cli-firefox = pkgs.writeShellScriptBin "browser-cli-firefox" ''
    set -euo pipefail

    PROFILE="$(mktemp -d)"
    trap 'rm -rf "$PROFILE"' EXIT

    cp ${userJs} "$PROFILE/user.js"

    mkdir -p "$PROFILE/extensions"
    cp ${mics-packages.browser-cli-extension}/browser-cli-extension.xpi \
      "$PROFILE/extensions/browser-cli-controller@thalheim.io.xpi"

    exec ${pkgs.firefox-devedition}/bin/firefox-devedition \
      --no-remote -profile "$PROFILE" "$@"
  '';
in
{
  imports = [
    mics-skills.homeModules.default
  ];

  options.pinpox.programs.claude-code = {
    enable = mkEnableOption "claude-code";
  };

  config = mkIf cfg.enable {

    home.packages = [
      pkgs.claude-code
      browser-cli-firefox
    ];

    programs.mics-skills = {
      enable = true;
      package = mics-packages;
      skills = [ "browser-cli" ];
    };

    # Declarative settings via settings.local.json (merged with mutable settings.json)
    home.file.".claude/settings.local.json".text = builtins.toJSON {
      permissions.allow = [
        "Bash(browser-cli:*)"
        "Bash(browser-cli-firefox:*)"
        "Bash(browser-cli-server:*)"
        "Read(/tmp/**)"
      ];
    };

    # Supplement the browser-cli skill with browser launch instructions
    home.file.".claude/skills/browser-cli-setup/SKILL.md".text = ''
      ---
      name: browser-cli-setup
      description: How to start Firefox with the browser-cli extension pre-installed. Use this before using browser-cli commands.
      ---

      # Starting the browser

      Before using `browser-cli`, you must launch Firefox Developer Edition
      with the browser-cli extension already installed. Run:

      ```bash
      browser-cli-firefox &
      ```

      This starts Firefox Developer Edition with a temporary profile that has:
      - The browser-cli WebExtension pre-installed
      - Extension signature checks disabled
      - Telemetry disabled

      After the browser is running, use `browser-cli` commands as documented
      in the browser-cli skill.
    '';
  };
}


================================================
FILE: home-manager/modules/credentials/age-recipients
================================================
age15m0pgtr06pqaql2wx8e2xqupcctzkf0dk0cc06hv3cjcgpe5u3ns59jaun
age1picohsm1qjpqjd9pnlh8zem6wwz62ml9z995fsdz9e23dumamjj0nl4cq0m5dx5v5mm5njelm3hmv4w3mfs5mzvks3xtu6k723jr0am49hrk9mduxvxpps


================================================
FILE: home-manager/modules/credentials/default.nix
================================================
{
  config,
  pkgs,
  lib,
  ...
}:
with lib;
let
  cfg = config.pinpox.defaults.credentials;
in
{
  options.pinpox.defaults.credentials.enable = mkEnableOption "credentials defaults";

  config = mkIf cfg.enable {

    # Set up passage store directory with remote configured (but not cloned)
    # On a fresh machine, just run: passage git pull
    home.activation.setupPassageStore = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
      STORE_DIR="${config.home.homeDirectory}/.passage/store"
      if [ ! -d "$STORE_DIR/.git" ]; then
        run mkdir -p "$STORE_DIR"
        run ${pkgs.git}/bin/git -C "$STORE_DIR" init -b master
        run ${pkgs.git}/bin/git -C "$STORE_DIR" remote add origin "gitea@git.0cx.de:pinpox/passage.git"
        run ${pkgs.git}/bin/git -C "$STORE_DIR" config branch.master.remote origin
        run ${pkgs.git}/bin/git -C "$STORE_DIR" config branch.master.merge refs/heads/master
      fi
    '';

    # List of public keys (recipients) to encrypt to.
    # Use `age-plugin-picohsm --list` to get the HSM key if needed. The second
    # key is an offline last-resort backup key
    home.sessionVariables.PASSAGE_RECIPIENTS_FILE = "${./age-recipients}";
    programs.zsh.sessionVariables.PASSAGE_RECIPIENTS_FILE = "${./age-recipients}";

    # The file ~/.config/age/identities still needs to be generated.
    # Run `age-plugin-picohsm -list` and put the age-key identity
    # (AGE-PLUGIN-PICOHSM-XXXXX) into the file. For sops, the recipients should
    # be added as a comment in the line before. Full format example:
    #
    # # recipient: age1picohsm1qjpqxxxxxxxxxxxxxxxxxxxxxxxxx
    # AGE-PLUGIN-PICOHSM-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    home.sessionVariables.PASSAGE_IDENTITIES_FILE = "$HOME/.config/age/identities";
    programs.zsh.sessionVariables.PASSAGE_IDENTITIES_FILE = "$HOME/.config/age/identities";

    # SOPS uses the same identity file as passage
    home.sessionVariables.SOPS_AGE_KEY_FILE = "$HOME/.config/age/identities";
    programs.zsh.sessionVariables.SOPS_AGE_KEY_FILE = "$HOME/.config/age/identities";

    # The nixos agent is better
    services.ssh-agent.enable = false;
  };
}


================================================
FILE: home-manager/modules/easyeffects/default.nix
================================================
{
  config,
  lib,
  pkgs,
  ...
}:

with lib;

let
  cfg = config.pinpox.programs.easyeffects;

in
{
  options.pinpox.programs.easyeffects = {
    enable = mkEnableOption "EasyEffects audio effects";
  };

  config = mkIf cfg.enable {
    services.easyeffects = {
      enable = true;
      # preset = "my-preset";
      # extraPresets = {
      #   my-preset = {
      #     input = {
      #       blocklist = [
      #
      #       ];
      #       "plugins_order" = [
      #         "rnnoise#0"
      #       ];
      #       "rnnoise#0" = {
      #         bypass = false;
      #         "enable-vad" = false;
      #         "input-gain" = 0.0;
      #         "model-path" = "";
      #         "output-gain" = 0.0;
      #         release = 20.0;
      #         "vad-thres" = 50.0;
      #         wet = 0.0;
      #       };
      #     };
      #   };
      # };
    };

    # Add easyeffects to home packages
    home.packages = with pkgs; [
      easyeffects
    ];
  };
}


================================================
FILE: home-manager/modules/email/aerc-style.nix
================================================
{ config, ... }:
with config.pinpox.colors;
{
  "*.default" = true;
  "*error.bold" = true;
  "statusline*.default" = true;
  "border.bg" = "#${Black}";
  "border.fg" = "#${Blue}";
  "completion_pill.reverse" = true;
  "default.bg" = "#${Black}";
  "dirlist_default.selected.bg" = "#${BrightBlack}";
  "dirlist_default.selected.fg" = "#${White}";
  "dirlist_recent.selected.bg" = "#${White}";
  "dirlist_recent.selected.fg" = "#${BrightBlack}";
  "dirlist_unread.fg" = "#${BrightGreen}";
  "dirlist_unread.selected.bg" = "#${BrightBlack}";
  "dirlist_unread.selected.fg" = "#${BrightGreen}";
  "error.fg" = "#${BrightRed}";
  "header.bold" = true;
  "header.fg" = "#${BrightBlue}";
  "msglist_default.selected.bg" = "#${White}";
  "msglist_default.selected.fg" = "#${BrightBlack}";
  "msglist_deleted.fg" = "#${BrightRed}";
  "msglist_deleted.selected.reverse" = "toggle";
  "msglist_marked.fg" = "#${BrightYellow}";
  "msglist_marked.selected.bg" = "#${BrightBlack}";
  "msglist_marked.selected.fg" = "#${BrightYellow}";
  "msglist_read.selected.bg" = "#${BrightBlack}";
  "msglist_read.selected.fg" = "#${White}";
  "msglist_result.fg" = "#${BrightYellow}";
  "msglist_result.selected.bg" = "#${BrightBlack}";
  "msglist_unread.bold" = true;
  "msglist_unread.fg" = "#${BrightGreen}";
  "msglist_unread.selected.bg" = "#${BrightBlack}";
  "selector_chooser.bold" = true;
  "selector_focused.reverse" = true;
  "statusline_default.bg" = "#${Magenta}";
  "statusline_default.fg" = "#${BrightWhite}";
  "statusline_error.fg" = "#${BrightRed}";
  "statusline_error.reverse" = true;
  "success.fg" = "#${BrightGreen}";
  "tab.bg" = "#${Blue}";
  "tab.fg" = "#${White}";
  "tab.selected.bg" = "#${BrightWhite}";
  "tab.selected.fg" = "#${Blue}";
  "title.reverse" = true;
  "warning.fg" = "#${BrightYellow}";
}


================================================
FILE: home-manager/modules/email/default.nix
================================================
{
  config,
  pkgs,
  lib,
  ...
}:
with lib;
let
  cfg = config.pinpox.defaults.email;
in
{
  options.pinpox.defaults.email.enable = mkEnableOption "email client config";

  config = mkIf cfg.enable {

    accounts.email.maildirBasePath = "Mail";

    programs.aerc = {
      extraConfig.general.unsafe-accounts-conf = true;
      enable = true;
      # stylesets.pinpox = (import ./aerc-style.nix { inherit config;});

      extraConfig = {
        ui = {
          # styleset-name = "pinpox";
          icon-attachment = "a ";
          icon-old = "";
          icon-replied = "↩ ";
        };
        compose.address-book-cmd = "carddav-query %s";

        filters = {
          "text/plain" = "colorize";
          "text/calendar" = "calendar";
          "message/delivery-status" = "colorize";
          "message/rfc822" = "colorize";
          #text/html=pandoc -f html -t plain | colorize
          "text/html" = "! html";
          #text/html=! w3m -T text/html -I UTF-8
          #text/*=bat -fP --file-name="$AERC_FILENAME"
          #application/x-sh=bat -fP -l sh
          #image/*=catimg -w $(tput cols) -
          #subject,~Git(hub|lab)=lolcat -f
          #from,thatguywhodoesnothardwraphismessages=wrap -w 100 | colorize
          ".headers" = "colorize";
          "image/*" = "${pkgs.libsixel}/bin/img2sixel - ";
          # image/*=catimg -w$(tput cols) -
        };
      };
    };

    accounts.email.accounts = {
      pablo_tools = {
        folders = {
          # send = "SENT";
          inbox = "INBOX";
        };
        aerc.enable = true;
        address = "mail@pablo.tools";

        aliases = [
          "git@pablo.tools"
          "github@pablo.tools"
          "pablo1@mailbox.org"
        ];

        realName = "Pablo Ovelleiro Corral";
        primary = true;
        maildir.path = "pablo_tools";

        signature = {
          text = ''
            Pablo Ovelleiro Corral

            Web:     https://pablo.tools
            Matrix:  @pinpox:matrix.org
            Github:  https://github.com/pinpox
          '';
          showSignature = "append";
        };

        userName = "pablo1@mailbox.org";
        passwordCommand = "passage show mailbox.org/himalaya";
        imap = {
          host = "imap.mailbox.org";
          tls.enable = true;
        };
        smtp = {
          host = "smtp.mailbox.org";
          port = 465;
        };
      };
    };

  };
}


================================================
FILE: home-manager/modules/firefox/default.nix
================================================
{
  config,
  pkgs,
  lib,
  ...
}:
with lib;
let
  cfg = config.pinpox.programs.firefox;
in
{
  options.pinpox.programs.firefox.enable = mkEnableOption "firefox browser";

  config = mkIf cfg.enable {

    # Browserpass
    programs.browserpass = {
      enable = true;
      # browsers = [ "chromium" "firefox" ];
      browsers = [ "firefox" ];
    };

    programs.firefox = {
      enable = true;
      package = pkgs.firefox;

      profiles = {
        pinpox = {

          # containers = {

          #   # dangerous = {
          #   #   color = "red";
          #   #   icon = "fruit";
          #   #   id = 2;
          #   # };

          #   work = {
          #     color = "blue";
          #     icon = "cart";
          #     id = 1;
          #   };
          # };

          search = {
            force = true;
            engines = {
              "Nix Options" = {
                urls = [
                  {
                    template = "https://search.nixos.org/options";
                    params = [
                      {
                        name = "channel";
                        value = "unstable";
                      }
                      {
                        name = "query";
                        value = "{searchTerms}";
                      }
                    ];
                  }
                ];
                icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
                definedAliases = [ "@no" ];
              };
              "Nix Packages" = {
                urls = [
                  {
                    template = "https://search.nixos.org/packages";
                    params = [
                      {
                        name = "type";
                        value = "packages";
                      }
                      {
                        name = "query";
                        value = "{searchTerms}";
                      }
                    ];
                  }
                ];
                icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
                definedAliases = [ "@np" ];
              };
            };
          };

          extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
            bitwarden
            darkreader
            web-search-navigator
            ublock-origin
            simple-tab-groups
          ];

          isDefault = true;
          settings = {

            # 0 => blank page
            # 1 => your home page(s) {default}
            # 2 => the last page viewed in Firefox
            # 3 => previous session windows and tabs
            "browser.startup.page" = "3";

            # Set the homepage
            "browser.startup.homepage" = "https://nixos.org";

            # Export bookmarks to bookmarks.html when closing firefox
            "browser.bookmarks.autoExportHTML" = "true";

            # Path where to export. Default is:
            # ~/.mozilla/firefox/pinpox/bookmarks.html
            # "browser.bookmarks.file" =

            # "browser.display.background_color" = "#${config.pinpox.colors.Black}";
            # "browser.display.foreground_color" = "#${config.pinpox.colors.White}";
            "browser.display.use_system_colors" = "true";
            "browser.anchor_color" = "#${config.pinpox.colors.Yellow}";
            "browser.display.use_document_colors" = "false";
            # "browser.search.region" = "GB";
            # "browser.search.isUS" = false;
            # "distribution.searchplugins.defaultLocale" = "en-GB";
            # "general.useragent.locale" = "en-GB";
            # "browser.bookmarks.showMobileBookmarks" = true;
            # TODO if possible, enable sync (log in)
            "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
            "extensions.activeThemeID" = "default-theme@mozilla.org";
            "devtools.theme" = "dark";
            "dom.security.https_only_mode" = "true"; # HTTPS everywhere

            # Disable password managger
            "signon.rememberSignons" = "false";
            "signon.autofillForms" = "false";
            "signon.autofillForms.http" = "false";
          };

          # userChrome = builtins.readFile
          #   (utils.renderMustache "userChrome.css" ./userchrome.css.mustache
          #     { colors = config.pinpox.colors; font = fonts; });

          # TODO
          userContent = ''
            @import url("userChrome.css");

            /* Removes white loading page */
            @-moz-document url(about:blank), url(about:newtab), url(about:home) {
              html:not(#ublock0-epicker), html:not(#ublock0-epicker) body, #newtab-customize-overlay {
                background: var(--mff-bg) !important;
              }
            }
          '';
        };
      };
    };
  };
}


================================================
FILE: home-manager/modules/firefox/userchrome.css.mustache
================================================
:root {

		/* Minimal Functional Fox variables*/
		--mff-bg: #{{colors.Black}};
		--mff-icon-color: #{{colors.Blue}};
		--mff-nav-toolbar-padding: 8px;
		--mff-sidebar-bg: var(--mff-bg);
		--mff-sidebar-color: #{{colors.White}};

		--mff-tab-border-radius: 0px;
		--mff-tab-color: #{{colors.White}};
		--mff-tab-font-family: "{{font.normal}}";
		--mff-tab-font-size: 11pt;
		--mff-tab-font-weight: 500;
		--mff-tab-height: 32px;
		--mff-tab-pinned-bg: #{{colors.Magenta}};
		--mff-tab-selected-bg: #{{colors.BrightBlack}};
		--mff-tab-selected-fg: #{{colors.Yellow}};
		--mff-tab-soundplaying-bg: #{{colors.Magenta}};

		--mff-urlbar-color: #{{colors.White}};
		--mff-urlbar-focused-color: #{{colors.Blue}};
		--mff-urlbar-font-family: "{{font.normal}}";
		--mff-urlbar-font-size: 12pt;
		--mff-urlbar-font-weight: 500;
		--mff-urlbar-results-color: #{{colors.White}};
		--mff-urlbar-results-font-family: "{{font.normal}}";
		--mff-urlbar-results-font-size: 12pt;
		--mff-urlbar-results-font-weight: 500;
		--mff-urlbar-results-url-color: #{{colors.Blue}};

		/*   --mff-tab-selected-bg: linear-gradient(90deg, rgba(232,74,95,1) 0%, rgba(255,132,124,1) 50%, rgba(254,206,168,1) 100%); */
		/*   --mff-urlbar-font-weight: 500; */

		/* Overriden Firefox variables*/
		--autocomplete-popup-background: var(--mff-bg) !important;
		--default-arrowpanel-background: var(--mff-bg) !important;
		--default-arrowpanel-color: #{{colors.White}}!important;
		--lwt-toolbarbutton-icon-fill: var(--mff-icon-color) !important;
		--panel-disabled-color: #{{colors.White}}00;
		--toolbar-bgcolor: var(--mff-bg) !important;
		--urlbar-separator-color: transparent !important;
}

/* Tabs */

.tab-background[selected="true"] {
		background: var(--mff-tab-selected-bg) !important;
}

.tab-text[selected="true"] {
		color: #{{colors.Yellow}} !important;
}

.tab-background:not[visuallyselected] {
		background: var(--mff-tab-selected-bg) !important;
		colors: red;
		opacity: 0.5 !important;
}

/* This positions the tabs under the navaigator container */
#titlebar {
		-moz-box-ordinal-group: 3 !important;
}

.tabbrowser-tab::after,
.tabbrowser-tab::before {
		border-left: none !important;
}

.tab-background {
		border: none !important;
		background: #{{colors.BrightBlack}} !important;
}

.tabbrowser-arrowscrollbox {
		margin-inline-start: 4px !important;
		margin-inline-end: 0px !important;
}

.tab-close-button {
		display: none !important;
}

.tab-text {
		font-family: var(--mff-tab-font-family);
		font-weight: var(--mff-tab-font-weight);
		font-size: var(--mff-tab-font-size) !important;
		color: var(--mff-tab-color);
}

/* Show the favicon for tabs that are pinned */
hbox.tab-content[pinned=true] .tab-icon-image {
		display: initial !important;
}

hbox.tab-content[pinned=true] .tab-text {
		display: none !important;
}

#tabbrowser-tabs {
		--tab-loading-fill: #033433 !important;
}

.tab-label-container:not([textoverflow]) {
		display: flex;
		overflow: hidden;
		justify-content: center;
		width: 50% !important;
		max-width: 50% !important;
		min-width: 50% !important;
}

.tab-line {
		display: none !important;
}

.tabbrowser-tab {
		border-radius: var(--mff-tab-border-radius) !important;
		border-width: 0;
		height: var(--mff-tab-height) !important;
		margin-bottom: 4px !important;
		margin-inline-end: 4px !important;
		margin-top: 4px !important;
		max-height: var(--mff-tab-height) !important;
		min-height: var(--mff-tab-height) !important;
}

.tabbrowser-tab[soundplaying="true"] {
		background-color: var(--mff-tab-soundplaying-bg) !important;
}

.tab-icon-sound {
		display: none !important;
}

/* Toolbar */

.urlbar-icon > image {
		fill: var(--mff-icon-color) !important;
		color: var(--mff-icon-color) !important;
}

.toolbarbutton-text {
		color: var(--mff-icon-color)  !important;
}
.urlbar-icon {
		color: var(--mff-icon-color)  !important;
}

.toolbarbutton-icon {
		/* filter: drop-shadow(0 0 0.75rem crimson); */
}

#urlbar-results {
		font-family: var(--mff-urlbar-results-font-family);
		font-weight: var(--mff-urlbar-results-font-weight);
		font-size: var(--mff-urlbar-results-font-size) !important;
		color: var(--mff-urlbar-results-color) !important;
}

.urlbarView-row[type="bookmark"] > span{
		color: green !important;
}

.urlbarView-row[type="switchtab"] > span{
		color: orange !important;
}

.urlbarView-url, .search-panel-one-offs-container {
		color: var(--mff-urlbar-results-url-color) !important;
		font-family: var(--mff-urlbar-font-family);
		font-weight: var(--mff-urlbar-results-font-weight);
		font-size: var(--mff-urlbar-font-size) !important;
}

.urlbarView-favicon, .urlbarView-type-icon {
		display: none !important;
}

#urlbar-input {
		font-size: var(--mff-urlbar-font-size) !important;
		color: var(--mff-urlbar-color) !important;
		font-family: var(--mff-urlbar-font-family) !important;
		font-weight: var(--mff-urlbar-font-weight)!important;
		text-align: center !important;
}

#tracking-protection-icon-container, #identity-box {
		display: none;
}

#back-button > .toolbarbutton-icon{
		--backbutton-background: transparent !important;
		border: none !important;
}

toolbar {
		background-image: none !important;
}

#urlbar-background {
		opacity: .98 !important;
}

#navigator-toolbox, toolbaritem {
		border: none !important;
}

#urlbar-background {
		background-color: var(--mff-bg) !important;
		border: none !important;
}

.toolbar-items {
		background-color: var(--mff-bg) !important;
}

#sidebar-search-container {
		background-color: var(--mff-sidebar-bg) !important;
}

box.panel-arrowbox {
		display: none;
}

box.panel-arrowcontent {
		border-radius: 8px !important;
		border: none !important;
}

tab.tabbrowser-tab {
		overflow: hidden;
}

tab.tabbrowser-tab:hover {
		box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

image#star-button {
		display: none;
}

toolbar#nav-bar {
		padding: var(--mff-nav-toolbar-padding) !important;
}

toolbar#nav-bar {
		padding: 4px !important;
}

#urlbar {
		max-width: 70% !important;
		margin: 0 15% !important;
		/*	position: unset!important; */;
}

#urlbar-input:focus {
		color: var(--mff-urlbar-focused-color) !important;
}

.megabar[breakout-extend="true"]:not([open="true"]) > #urlbar-background {
		box-shadow: none !important;
		background-color: transparent !important;
}

toolbarbutton {
		box-shadow: none !important;
}

/* Sidebar */

.close-icon, .urlbar-icon {
		fill: var(--mff-icon-color) !important;
}

.sidebar-placesTree {
		color: var(--mff-sidebar-color) !important;
}

#sidebar-box {
		--sidebar-background-color: var(--mff-sidebar-bg) !important;
}

splitter#sidebar-splitter {
		opacity: 0 !important;
}

splitter#sidebar-splitter {
		border: none !important;
		background-color: transparent !important;
}

image#sidebar-icon {
		display: none;
}

/* Arrow panel */

.panel-arrowcontent {
		padding: 0px !important;
		margin: 0px !important;
}

toolbarseparator {
		display: none;
}


================================================
FILE: home-manager/modules/fonts/default.nix
================================================
{ config, lib, ... }:
with lib;
let
  cfg = config.pinpox.defaults.fonts;
in
{

  options.pinpox = {

    defaults.fonts.enable = mkEnableOption "font defaults";

    font = {
      normal = {
        family = mkOption {
          type = types.str;
          default = "Berkeley Mono";
        };
        style = mkOption {
          type = types.str;
          default = "Regular";
        };
      };
      bold = {
        family = mkOption {
          type = types.str;
          default = "Berkeley Mono";
        };
        style = mkOption {
          type = types.str;
          default = "Bold";
        };
      };
      italic = {
        family = mkOption {
          type = types.str;
          default = "Berkeley Mono";
        };
        style = mkOption {
          type = types.str;
          default = "Regular Italic";
        };
      };
      size = 10;
    };
  };

  config = mkIf cfg.enable {

    fonts.fontconfig.enable = true;
    # home.packages =
    #   [ flake-inputs.nix-apple-fonts.packages."x86_64-linux".sf-mono ];
  };
}


================================================
FILE: home-manager/modules/foot/default.nix
================================================
{
  lib,
  pkgs,
  config,
  ...
}:
with lib;
let
  cfg = config.pinpox.programs.foot;
in
{
  options.pinpox.programs.foot.enable = mkEnableOption "foot terminal emulator";

  config = mkIf cfg.enable {

    home.packages = with pkgs; [
      nerd-fonts.inconsolata
      foot
    ];

    programs.foot = {
      enable = true;
      server.enable = true;
      settings = {

        main = {
          term = "xterm-256color";

          font = "Berkeley Mono:size=13";
          # dpi-aware = "yes"; # Defaults to auto
        };

        scrollback.lines = 10000;

        cursor = {
          style = "beam";
          blink = "yes";
          # beam-thickness =
        };

        colors = {

          alpha = "0.9";
          # background = "${config.pinpox.colors.White}";
          # foreground = "${config.pinpox.colors.Black}";
          background = "${config.pinpox.colors.Black}";
          foreground = "${config.pinpox.colors.White}";

          ## Normal/regular colors (color palette 0-7)
          regular0 = "${config.pinpox.colors.Black}"; # black
          regular1 = "${config.pinpox.colors.Red}"; # red
          regular2 = "${config.pinpox.colors.Green}"; # green
          regular3 = "${config.pinpox.colors.Yellow}"; # yellow
          regular4 = "${config.pinpox.colors.Blue}"; # blue
          regular5 = "${config.pinpox.colors.Magenta}"; # magenta
          regular6 = "${config.pinpox.colors.Cyan}"; # cyan
          regular7 = "${config.pinpox.colors.White}"; # white

          ## Bright colors (color palette 8-15)
          bright0 = "${config.pinpox.colors.BrightBlack}"; # black
          bright1 = "${config.pinpox.colors.BrightRed}"; # red
          bright2 = "${config.pinpox.colors.BrightGreen}"; # green
          bright3 = "${config.pinpox.colors.BrightYellow}"; # yellow
          bright4 = "${config.pinpox.colors.BrightBlue}"; # blue
          bright5 = "${config.pinpox.colors.BrightMagenta}"; # magenta
          bright6 = "${config.pinpox.colors.BrightCyan}"; # cyan
          bright7 = "${config.pinpox.colors.BrightWhite}"; # white
        };

        # mouse = {
        #   hide-when-typing = "yes";
        # };
      };
    };
  };
}


================================================
FILE: home-manager/modules/games/default.nix
================================================
{
  config,
  lib,
  pkgs,
  ...
}:
with lib;
let
  cfg = config.pinpox.programs.games;
in
{
  options.pinpox.programs.games.enable = mkEnableOption "games";
  config = mkIf cfg.enable {
    home.packages = with pkgs; [ retroarch-free ];
  };
}


================================================
FILE: home-manager/modules/git/default.nix
================================================
{
  pkgs,
  config,
  lib,
  ...
}:
with lib;
let
  cfg = config.pinpox.defaults.git;

  prePushHook = pkgs.writeShellApplication {
    name = "pre-push";
    runtimeInputs = [ pkgs.jq ];
    text = ''
      [ -f flake.lock ] || exit 0
      matches=$(jq -r '
        .nodes | to_entries[]
        | select(
            .value.locked.type == "path"
            or ((.value.locked.url // "") | startswith("file://"))
          )
        | "\(.key): \(.value.locked.path // .value.locked.url)"
      ' flake.lock)
      if [ -n "$matches" ]; then
        echo "warning: local-path inputs in flake.lock:" >&2
        echo "$matches" >&2
        if [ -e /dev/tty ]; then
          read -r -p "Push anyway? [y/N] " reply < /dev/tty
          [[ "$reply" =~ ^[Yy]$ ]] || { echo "aborted." >&2; exit 1; }
        else
          echo "error: no tty for confirmation — refusing push" >&2
          exit 1
        fi
      fi
    '';
  };
in
{
  options.pinpox.defaults.git.enable = mkEnableOption "git defaults";

  config = mkIf cfg.enable {

    home.packages = with pkgs; [
      tig
      jjui
    ];

    programs = {

      lazygit = {
        enable = true;

        # https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md
        settings = {

          # reporting = "off";
          # update.method = "never";

          shortTimeFormat = "15h:30:13";
          gui.showFileTree = true;
          os = {
            edit = "nvim {{filename}}";
            editAtLine = "nvim +{{line}} {{filename}}";
            editAtLineAndWait = "nvim --remote-wait +{{line}} {{filename}}";
            editInTerminal = true;
          };
        };
      };

      git = {
        enable = true;
        lfs.enable = true;

        ignores = [
          "tags"
          "*.swp"
          "result"
          ".claude"
        ];

        settings = {

          init.defaultBranch = "main";

          core.hooksPath = "${prePushHook}/bin";

          pull = {
            rebase = true;
            autostash = true;
            twohead = "ort";
          };

          push = {
            default = "simple";
            autoSetupRemote = true;
          };

          # rerere = {
          #   autoUpdate = true
          #   enabled = true
          # };

          branch = {
            autoSetupRebase = "always";
            autoSetupMerge = "always";
          };

          rebase = {
            stat = true;
            autoStash = true;
            autoSquash = true;
            updateRefs = true;
          };

          help.autocorrect = 10;

          signing = {
            format = "ssh";
            key = "~/.ssh/key.pub";
            signByDefault = true;
          };

          alias = {
            s = "status";
            d = "diff";
            a = "add";
            c = "commit";
            p = "push";
            o = "checkout";
            co = "checkout";
            uncommit = "reset --soft HEAD^";
            comma = "commit --amend";
            reset-pr = "reset --hard FETCH_HEAD";
            force-push = "push --force-with-lease";
          };

          user.email = "git@pablo.tools";
          user.name = "pinpox";
        };
      };
    };

    # [kiwi] evaluation warning: pinpox profile: The option `programs.git.aliases' defined in `/nix/store/fsc89mqrbiij6pnl4vrf0l0plv0i8pp6-source/clan-service-modules/machine-type/desktop.nix' has been renamed to `programs.git.settings.alias'.
    # [kiwi] evaluation warning: pinpox profile: The option `programs.git.extraConfig' defined in `/nix/store/fsc89mqrbiij6pnl4vrf0l0plv0i8pp6-source/clan-service-modules/machine-type/desktop.nix' has been renamed to `programs.git.settings'.

    programs.jujutsu = {
      enable = true;
      settings = {
        merge-tools.meld.merge-args = [
          "$left"
          "$base"
          "$right"
          "-o"
          "$output"
          "--auto-merge"
        ];
        signing = {
          behavior = "own";
          backend = "ssh";
          key = "~/.ssh/key.pub";
          allowed-signers = "~/.ssh/allowed_signers";
        };
        ui = {

          pager = "less -FRX";

          default-command = "log";
          merge-editor = [
            "meld"
            "$left"
            "$base"
            "$right"
            "-o"
            "$output"
          ];
        };
        user = {
          email = "git@pablo.tools";
          name = "pinpox";
        };
      };
    };
  };
}


================================================
FILE: home-manager/modules/go/default.nix
================================================
{ config, lib, ... }:
with lib;
let
  cfg = config.pinpox.programs.go;
in
{
  options.pinpox.programs.go.enable = mkEnableOption "go compiler";

  config = mkIf cfg.enable {

    programs = {
      go = {
        enable = true;
        env.GOPATH = "/home/pinpox/.go";
        #      packages = {
        #        "golang.org/x/text" =
        #          builtins.fetchGit "https://go.googlesource.com/text";
        #        "golang.org/x/time" =
        #          builtins.fetchGit "https://go.googlesource.com/time";
        #      };
      };
    };
  };
}


================================================
FILE: home-manager/modules/grobi/default.nix
================================================
{
  config,
  pkgs,
  lib,
  ...
}:
with lib;
let
  cfg = config.pinpox.defaults.grobi;
in
{
  options.pinpox.defaults.grobi.enable = mkEnableOption "grobi defaults";

  config = mkIf cfg.enable {
    services = {

      grobi = {
        # enable = true;
        enable = false;
        # executeAfter = [ " " ];
        rules = [
          {
            name = "kartoffel";
            outputs_connected = [
              "DVI-D-0"
              "DP-0"
              "DVI-D-1"
            ];
            configure_row = [
              "DVI-D-0"
              "DP-0"
              "DVI-D-1"
            ];
            atomic = true;
            execute_after = [
              ''
                ${pkgs.xorg.xrandr}/bin/xrandr \
                --output DVI-D-0 --mode 1920x1200 --pos 3460x0 --rotate normal \
                --output DP-0 --primary --mode 2560x1440 --pos 900x0 --rotate normal \
                --output DVI-D-1 --mode 1440x900 --pos 0x0 --rotate right \
                --output DP-1 --off \
                --output HDMI-0 --off
              ''
            ];
          }
        ];
      };
    };
  };
}


================================================
FILE: home-manager/modules/gtk/banana.nix
================================================
{
  config,
  pkgs,
  ...
}:
{
  config = {
    home.pointerCursor = {
      name = "Banana";
      size = 32;
      package = pkgs.banana-cursor;
      x11.enable = true;
      gtk.enable = true;
    };

    wayland.windowManager.sway.config.seat."*".xcursor_theme =
      "${config.gtk.cursorTheme.name} ${toString config.gtk.cursorTheme.size}";

    gtk.cursorTheme = {
      name = "Banana";
      size = 32;
      package = pkgs.banana-cursor;
    };
  };
}


================================================
FILE: home-manager/modules/gtk/default.nix
================================================
{
  config,
  pkgs,
  lib,
  ...
}:
with lib;
let

  cfg = config.pinpox.defaults.gtk;

  # TODO use flake inputs
  materia-theme = pkgs.fetchFromGitHub {
    owner = "nana-4";
    repo = "materia-theme";
    rev = "76cac96ca7fe45dc9e5b9822b0fbb5f4cad47984";
    sha256 = "sha256-0eCAfm/MWXv6BbCl2vbVbvgv8DiUH09TAUhoKq7Ow0k=";
    # Old version
    # "e329aaee160c82e85fe91a6467c666c7f9f2a7df";
    # sha256 = "1qmq5ycfpzv0rcp5aav4amlglkqy02477i4bdi7lgpbn0agvms6c";
    fetchSubmodules = true;
  };
  materia_colors = pkgs.writeTextFile {
    name = "gtk-generated-colors";
    text = ''
      BTN_BG=${config.pinpox.colors.BrightBlack}
      BTN_FG=${config.pinpox.colors.BrightWhite}

      FG=${config.pinpox.colors.White}
      BG=${config.pinpox.colors.Black}

      HDR_BTN_BG=${config.pinpox.colors.BrightBlack}
      HDR_BTN_FG=${config.pinpox.colors.White}

      ACCENT_BG=${config.pinpox.colors.Green}
      ACCENT_FG=${config.pinpox.colors.Black}

      HDR_FG=${config.pinpox.colors.White}
      HDR_BG=${config.pinpox.colors.BrightBlack}

      MATERIA_SURFACE=${config.pinpox.colors.BrightBlack}
      MATERIA_VIEW=${config.pinpox.colors.BrightBlack}

      MENU_BG=${config.pinpox.colors.BrightBlack}
      MENU_FG=${config.pinpox.colors.BrightWhite}

      SEL_BG=${config.pinpox.colors.Blue}
      SEL_FG=${config.pinpox.colors.Magenta}

      TXT_BG=${config.pinpox.colors.BrightBlack}
      TXT_FG=${config.pinpox.colors.BrightWhite}

      WM_BORDER_FOCUS=${config.pinpox.colors.White}
      WM_BORDER_UNFOCUS=${config.pinpox.colors.BrightBlack}

      UNITY_DEFAULT_LAUNCHER_STYLE=False
      NAME=generated
      MATERIA_COLOR_VARIANT=dark
      MATERIA_STYLE_COMPACT=True
    '';
  };
in

{
  options.pinpox.defaults.gtk.enable = mkEnableOption "gtk defaults";

  imports = [ ./banana.nix ];

  config = mkIf cfg.enable {

    nixpkgs.overlays = [
      (self: super: {
        rendersvg = self.runCommand "rendersvg" { } ''
          mkdir -p $out/bin
          ln -s ${self.resvg}/bin/resvg $out/bin/rendersvg
        '';
        generated-gtk-theme = self.stdenv.mkDerivation {

          name = "generated-gtk-theme";
          src = materia-theme;
          buildInputs = with self; [
            sassc
            bc
            which
            rendersvg
            meson
            ninja
            dart-sass
            gtk4.dev
            optipng
          ];
          MATERIA_COLORS = materia_colors;
          phases = [
            "unpackPhase"
            "installPhase"
          ];
          installPhase = ''
            HOME=/build
            chmod 777 -R .
            patchShebangs .
            mkdir -p $out/share/themes
            mkdir bin
            sed -e 's/handle-horz-.*//' -e 's/handle-vert-.*//' -i ./src/gtk-2.0/assets.txt
            echo "Changing colours:"
            ./change_color.sh -o Generated "$MATERIA_COLORS" -i False -t "$out/share/themes"
            chmod 555 -R .
          '';
        };
      })
    ];

    # GTK settings
    gtk = {
      enable = true;

      font = {
        name = "Berkeley Mono";
        # package = pkgs.iosevka;
      };

      iconTheme = {
        name = "Papirus-Dark";
        package = pkgs.papirus-icon-theme;
      };

      theme = {
        name = "Generated";
        package = pkgs.generated-gtk-theme;
      };
    };

    home.sessionVariables.GTK_THEME = "Generated";

    # Set default dark theme via dconf (can be changed at runtime)
    dconf.settings = {
      "org/gnome/desktop/interface" = {
        color-scheme = "prefer-dark";
      };
    };
  };
}


================================================
FILE: home-manager/modules/helix/default.nix
================================================
{
  config,
  lib,
  pkgs,
  ...
}:

with lib;

let
  cfg = config.pinpox.programs.helix;

in
{
  options.pinpox.programs.helix = {
    enable = mkEnableOption "Helix editor configuration";
  };

  config = mkIf cfg.enable {
    programs.helix = {
      enable = true;

      # https://docs.helix-editor.com/languages.html
      languages = {
        language = [
          {
            name = "nix";
            auto-format = false;
            formatter.command = "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt";
          }
        ];
      };

      settings = {
        editor = {
          indent-guides.render = true;
          bufferline = "multiple";
          cursorline = true;
          cursor-shape = {
            insert = "bar";
            normal = "block";
            select = "underline";
          };

          lsp.display-messages = true;
        };

        theme = "catppuccin_mocha";

        keys = {
          normal = {
            ";" = "command_mode";
            "C-g" = [
              ":new"
              ":insert-output ${pkgs.lazygit}/bin/lazygit"
              ":buffer-close!"
              ":redraw"
            ];
          };
          select = {
            ";" = "command_mode";
          };
        };
      };
    };

    # Add helix to home packages
    home.packages = with pkgs; [
      helix
    ];
  };
}


================================================
FILE: home-manager/modules/k9s/default.nix
================================================
{
  config,
  lib,
  pkgs,
  ...
}:
with lib;
let
  cfg = config.pinpox.programs.k9s;
in
{

  options.pinpox.programs.k9s.enable = mkEnableOption "k9s kubernetes CLI";

  config = mkIf cfg.enable {

    home.packages = [ pkgs.k9s ];

    xdg = {
      enable = true;
      configFile.k9s_theme = {
        target = "k9s/skin.yml";
        text = builtins.toJSON {
          k9s = {
            body = {
              fgColor = "#cad3f5";
              bgColor = "#24273a";
              logoColor = "#cba6f7";
            };
            info = {
              fgColor = "#74c7ec";
              sectionColor = "#8aadf4";
            };
            frame = {
              border = {
                fgColor = "#cba6f7";
                focusColor = "#f5bde6";
              };
              menu = {
                fgColor = "#eed49f";
                keyColor = "#8aadf4";
                numKeyColor = "#f5bde6";
              };
              crumbs = {
                fgColor = "#cad3f5";
                bgColor = "#8aadf4";
                activeColor = "#74c7ec";
              };
              status = {
                newColor = "#a6da95";
                modifyColor = "#68f288";
                addColor = "#74c7ec";
                errorColor = "#ed8796";
                highlightcolor = "#8aadf4";
                killColor = "#747c9e";
                completedColor = "#5b6078";
              };
              title = {
                fgColor = "#8bd5ca";
                bgColor = "#5b6078";
                highlightColor = "#74c7ec";
                counterColor = "#cba6f7";
                filterColor = "#5b6078";
              };
            };
            views = {
              table = {
                fgColor = "#cad3f5";
                bgColor = "#24273a";
                cursorColor = "#8bd5ca";
                header = {
                  fgColor = "#24273a";
                  bgColor = "#8aadf4";
                };
              };
              yaml = {
                keyColor = "#8bd5ca";
                colonColor = "#aee2da";
                valueColor = "#a6da95";
              };
              logs = {
                fgColor = "#cad3f5";
                bgColor = "#24273a";
              };
            };
          };
        };
      };
    };
  };
}


================================================
FILE: home-manager/modules/kanshi/default.nix
================================================
{
  config,
  pkgs,
  lib,
  ...
}:
with lib;
let
  cfg = config.pinpox.programs.kanshi;
in
{
  options.pinpox.programs.kanshi.enable = mkEnableOption "kanshi screen setup";

  config = mkIf cfg.enable {

    home.packages = with pkgs; [ kanshi ];

    # output eDP-1 mode 1920x1080 position 0,0
    # output DP-1 mode 2560x1440 position 1080,0
    # output DP-2 mode 2560x1440 position 3640,0

    services.kanshi = {
      enable = true;
      settings = [
        {
          profile.name = "laptop-only";
          profile.outputs = [
            {
              criteria = "eDP-1";
              mode = "2880x1920@120Hz";
              scale = 2.0;
            }
          ];
        }
        {
          profile.name = "laptop-external-right";
          profile.outputs = [
            {
              criteria = "eDP-1";
              mode = "2880x1920@120Hz";
              position = "0,0";
              scale = 2.0;
              status = "enable";
            }
            {
              criteria = "Lenovo Group Limited Y27h-30 U3V040YW";
              mode = "2560x1440";
              position = "1440,0";
              status = "enable";
            }
          ];
        }
      ];
    };
  };
}


================================================
FILE: home-manager/modules/mako/default.nix
================================================
{
  pkgs,
  config,
  lib,
  ...
}:
with lib;
let
  cfg = config.pinpox.programs.mako;
in
{
  options.pinpox.programs.mako.enable = mkEnableOption "mako notifications";

  config = mkIf cfg.enable {

    # Needed for firefox and thunderbird
    home.packages = [ pkgs.libnotify ];

    services.mako = {
      enable = true;

      settings = {
        anchor = "top-right";
        background-color = "#285577FF";
        border-color = "#4C7899FF";
        # progressColor = "over #5588AAFF";
        text-color = "#FFFFFFFF";
        border-radius = "5";
        border-size = "5";
        default-timeout = "10000"; # In milliseconds
        # extraConfig = '''';
        font = "Berkeley Mono 12";
        # %a   Application name
        # %s   Notification summary
        # %b   Notification body
        # %g   Number of notifications in the current group
        # %i   Notification id
        # format = "<b>%s</b>\\n%b";
        # groupBy = "";
        height = "200";
        width = "300";
        # iconPath = "";
        icons = "true";
        margin = "10";
        padding = "5";
      };
    };
  };
}


================================================
FILE: home-manager/modules/mpv/default.nix
================================================
{
  lib,
  pkgs,
  config,
  ...
}:
with lib;
let
  cfg = config.pinpox.programs.mpv;
in
{
  options.pinpox.programs.mpv.enable = mkEnableOption "mpv media player";

  config = mkIf cfg.enable {

    programs.mpv = {
      enable = true;

      config = {
        # Screenshot settings
        screenshot-directory = "~/Pictures";
        screenshot-format = "png";
        screenshot-template = "photo-%F-%T";

        # Low latency for camera preview
        profile = "low-latency";
        untimed = "yes";
      };

      # Rotation for webcam (applied to v4l2 protocol)
      profiles = {
        "protocol.av" = {
          vf = "rotate=PI";
        };
      };

      bindings = {
        # Screenshot bindings
        "s" = "screenshot";
        "MBTN_LEFT" = "screenshot";
      };
    };
  };
}


================================================
FILE: home-manager/modules/neomutt/default.nix
================================================
{ config, lib, ... }:
with lib;
let
  cfg = config.pinpox.programs.neomutt;
in
{
  options.pinpox.programs.neomutt.enable = mkEnableOption "neomutt mail client";

  config = mkIf cfg.enable {
    programs.neomutt = {
      enable = true;
      sidebar = {
        enable = true;
      };
      extraConfig = ''
        set imap_user = "pablo1@mailbox.org"
        set imap_pass = "`pass mailbox.org/pablo1@mailbox.org`"
      '';
    };
  };
}


================================================
FILE: home-manager/modules/newsboat/default.nix
================================================
{ config, lib, ... }:
with lib;
let
  cfg = config.pinpox.programs.newsboat;
  splitString = str: builtins.filter builtins.isString (builtins.split "\n" str);
in
{
  options.pinpox.programs.newsboat.enable = mkEnableOption "newsboat RSS reader";

  config = mkIf cfg.enable {

    programs.newsboat = {
      enable = true;
      autoReload = true;
      urls = [
        # https://hackaday.com/blog/feed/
        {
          title = "nixOS mobile";
          tags = [
            "nixos"
            "nix"
          ];
          url = "https://mobile.nixos.org/index.xml";
        }
        {
          title = "r/NixOS";
          tags = [
            "nixos"
            "nix"
            "reddit"
          ];
          url = "https://www.reddit.com/r/NixOS.rss";
        }
        {
          title = "NixOS weekly";
          tags = [
            "nixos"
            "nix"
          ];
          url = "https://weekly.nixos.org/feeds/all.rss.xml";
        }
      ]
      ++ (map (x: {
        url = x;
        tags = [ "rss" ];
      }) (splitString (builtins.readFile ./newsboat/rss.txt)))

      ++ (map (x: {
        url = x;
        tags = [ "podcast" ];
      }) (splitString (builtins.readFile ./newsboat/podcast.txt)))

      ++ (map (x: {
        url = x;
        tags = [ "youtube" ];
      }) (splitString (builtins.readFile ./newsboat/youtube.txt)));
    };
  };
}


================================================
FILE: home-manager/modules/obs-studio/default.nix
================================================
{
  lib,
  pkgs,
  config,
  system-config,
  ...
}:
with lib;
let
  cfg = config.pinpox.programs.obs-studio;
  droidcam-port = 5201;
in
{
  options.pinpox.programs.obs-studio.enable = mkEnableOption "obs-studio";

  config = mkIf cfg.enable {

    # assertions = [
    #   {
    #     assertion = (builtins.elem droidcam-port system-config.networking.firewall.allowedTCPPorts);
    #     message = "Port ${toString droidcam-port}/tcp is not open in the firewall, but required by droidcam";
    #   }
    # ];

    home.packages = [
      pkgs.uxplay # AirPlay Unix mirroring server

      pkgs.slurp
      pkgs.xdg-desktop-portal
      pkgs.xdg-desktop-portal-gtk
    ];

    programs.obs-studio = {
      enable = true;
      plugins = with pkgs.obs-studio-plugins; [
        obs-pipewire-audio-capture
        # droidcam-obs
        wlrobs
        # obs-vintage-filter
        # obs-teleport
        obs-backgroundremoval
        input-overlay
      ];
    };
  };
}


================================================
FILE: home-manager/modules/pandoc/default.nix
================================================
{ config, lib, ... }:
with lib;
let

  cfg = config.pinpox.programs.pandoc;
in
{
  options.pinpox.programs.pandoc.enable = mkEnableOption "pandoc config";

  config = mkIf cfg.enable {

    programs.pandoc = {
      enable = true;
      citationStyles = [ ];

      # templates = {
      # "default.latex" = path/to/your/template;
      # };

      defaults = {
        metadata = {
          author = "Pablo Ovelleiro Corral";
        };
        # pdf-engine = "xelatex";
        # citeproc = true;
      };
    };
  };
}


================================================
FILE: home-manager/modules/pi-mono/default.nix
================================================
{
  lib,
  pkgs,
  config,
  ...
}:
with lib;
let
  cfg = config.pinpox.programs.pi;

  # Generate models.json from the declarative provider config
  modelsJson = pkgs.writeText "models.json" (
    builtins.toJSON { providers = cfg.providers; }
  );
in
{
  options.pinpox.programs.pi = {

    enable = mkEnableOption "pi coding agent";

    package = mkOption {
      type = types.package;
      default = pkgs.pi;
      description = "The pi package to install.";
    };

    extensions = mkOption {
      type = types.attrsOf types.path;
      default = { };
      description = ''
        Extension name to source path mappings. Each entry is symlinked into
        `~/.pi/agent/extensions/<name>`. Sources can be local paths, fetchGit
        results, or built packages.

        Pi auto-discovers extensions from `~/.pi/agent/extensions/` — both
        single `.ts` files and directories with an `index.ts` entry point.

        Note: Extensions that require `npm install` (i.e. have runtime
        dependencies in package.json) need to be built first or installed
        via `pi install` instead.
      '';
      example = literalExpression ''
        {
          my-extension = ./extensions/my-extension.ts;
        }
      '';
    };

    providers = mkOption {
      type = types.attrsOf types.attrs;
      default = { };
      description = ''
        Model provider configurations, keyed by provider name. All providers
        are merged and written to `~/.pi/agent/models.json` as a read-only
        symlink. Pi only reads this file, never writes to it.

        Can be set from multiple modules (e.g. machine-specific configs)
        and Nix will merge them.
      '';
      example = literalExpression ''
        {
          ollama = {
            baseUrl = "http://100.96.100.103:11434/v1";
            api = "openai-completions";
            apiKey = "dummy";
            compat = {
              supportsDeveloperRole = false;
              supportsReasoningEffort = false;
            };
            models = [
              { id = "llama3.3:latest"; contextWindow = 128000; maxTokens = 32000; }
            ];
          };
        }
      '';
    };
  };

  config = mkIf cfg.enable {

    home.packages = [ cfg.package ];

    home.file = mkMerge [
      # Symlink extensions into the auto-discovery directory
      (mapAttrs' (name: src: {
        name = ".pi/agent/extensions/${name}";
        value.source = src;
      }) cfg.extensions)

      # models.json as read-only symlink (only when providers are configured)
      (mkIf (cfg.providers != { }) {
        ".pi/agent/models.json".source = modelsJson;
      })
    ];
  };
}


================================================
FILE: home-manager/modules/rio/config/rio/config.toml
================================================
# Modifier to line-height. Default is `1.0`
line-height = 1.06

# Environment variables
env-vars = ["TERM=xterm-256color"]

# Don't confirm before exiting Rio
confirm-before-quit = false

[adaptive-theme]
light = "wildcharm-light"
dark = "wildcharm-dark"

# light = "pinpox-light"
# dark = "pinpox-dark"

# Hide the cursor while typing
# hide-cursor-when-typing = false

# Ignore theme selection foreground color
# ignore-selection-foreground-color = false

# Startup directory
#
# Directory the shell is started in. If this is unset the working
# directory of the parent process will be used.
#
# This configuration only has effect if use-fork is disabled.
#
# Example:
# working-dir = "/Users/raphael/Documents/"


# Use fork
#
# Defaults for POSIX-based systems (Windows is not configurable):
# MacOS: spawn processes
# Linux/BSD: fork processes
#
# Example:
# use-fork = false

# Cursor
#
# shape - Default cursor shape is 'block'
# Other available options are: 'underline', 'beam' or 'hidden'
#
# blinking - Whether the cursor blinks. The default is false
#
# blinking-interval - Cursor update on milliseconds interval
#
# [cursor]
# shape = 'block'
# blinking = false
# blinking-interval = 800

# Editor
#
# Default editor on Linux and MacOS is "vi",
# on Windows it is "notepad".
#
# Whenever the key binding `OpenConfigEditor` is triggered it will
# use the value of the editor along with the rio configuration path.
[editor]
program = "nvim"
# args = []

# Window configuration
#
# • width - define the initial window width.
#   Default: 600
#
# • height - define the initial window height.
#   Default: 400
#
# • mode - define how the window will be created
#     - "Windowed" (default) is based on width and height
#     - "Maximized" window is created with maximized
#     - "Fullscreen" window is created with fullscreen
#
# • opacity - Set window opacity
#
# • blur - Set blur on the window background. Changing this config requires restarting Rio to take effect.
#
# • decorations - Set window decorations, options: "Enabled", "Disabled", "Transparent", "Buttonless"
#
# • colorspace - Set the color space for the window
#     - "srgb" (default on non-macOS)
#     - "display-p3" (default on macOS)
#     - "rec2020"
#
# Example:
[window]
# width = 600
# height = 400
# mode = "windowed"
opacity = 0.95
blur = true
# decorations = "enabled"
# colorspace = "display-p3"

# Renderer
#
# • Performance: Set WGPU rendering performance
#   - High: Adapter that has the highest performance. This is often a discrete GPU.
#   - Low: Adapter that uses the least possible power. This is often an integrated GPU.
#
# • Backend: Set WGPU rendering backend
#   - Automatic: Leave Sugarloaf/WGPU to decide
#   - GL: Supported on Linux/Android, and Windows and macOS/iOS via ANGLE
#   - Vulkan: Supported on Windows, Linux/Android
#   - DX12: Supported on Windows 10
#   - Metal: Supported on macOS/iOS
#
# • disable-unfocused-render: This property disable renderer processes while Rio is unfocused.
#
# • level: Configure renderer level
#   - Available options: 0 and 1.
#       Higher the level more rendering features and computations
#       will be done like enable font ligatures or emoji support.
#       For more information please check the docs.
#
# • filters: A list of paths to RetroArch slang shaders. Might not work with OpenGL.
#
# Example:
# [renderer]
# performance = "high"
# backend = "automatic"
# disable-unfocused-render = false
# level = 1
# filters = []

# Keyboard
#
# use-kitty-keyboard-protocol - Enable Kitty Keyboard protocol
#
# disable-ctlseqs-alt - Disable ctlseqs with ALT keys
#   - For example: Terminal.app does not deal with ctlseqs with ALT keys
#
# ime-cursor-positioning - Enable IME cursor positioning
#   - When enabled, the IME input popup will appear at the cursor position
#   - Default is true
#
# Example:
# [keyboard]
# use-kitty-keyboard-protocol = false
# disable-ctlseqs-alt = false
# ime-cursor-positioning = true

# Fonts
#
# Configure fonts used by the terminal
#
# Note: You can set different font families but Rio terminal
# will always look for regular font bounds whene
#
# You can also set family on root to overwrite all fonts.
#
# You can also specify extra fonts to load
# [fonts]
# extras = [{ family = "Microsoft JhengHei" }]
#
# In case you want to specify any font feature:
# [fonts]
# features = ["ss02", "ss03", "ss05", "ss19"]
#
# Note: Font features do not have support to live reload on configuration,
# so to reflect your changes, you will need to close and reopen Rio.
#
# You can also map the specified Unicode codepoints to a particular font.
# symbol-map = [
#   { start = "2297", end = "2299", font-family = "Cascadia Code NF" }
# ]

[fonts]
# You can also disable font hinting. Font hinting is enabled by default.
# hinting = false
size = 16.6
family = "Berkeley Mono"

[fonts.emoji]
family = "Noto Emoji"

[fonts.regular]
style = "Normal"

[fonts.bold]
style = "Normal"
weight = 800

[fonts.italic]
style = "Italic"

[fonts.bold-italic]
style = "Italic"
weight = 800

# [hints]
# # Characters used for hint labels
# alphabet = "jfkdls;ahgurieowpq"
#
# # URL hint example
# [[hints.rules]]
# regex = "(https://|http://)[^\u{0000}-\u{001F}\u{007F}-\u{009F}<>\"\\s{-}\\^⟨⟩`\\\\]+"
# hyperlinks = true
# post-processing = true
# persist = false
#
# [hints.rules.action]
# command = "xdg-open"  # Linux/BSD
# # command = "open"    # macOS
# # command = { program = "cmd", args = ["/c", "start", ""] }  # Windows
#
# [hints.rules.binding]
# key = "O"
# mods = ["Control", "Shift"]

# Scroll
#
# You can change how many lines are scrolled each time by setting this option.
#
# Scroll calculation for canonical mode will be based on `lines = (accumulated scroll * multiplier / divider)`,
# If you want a quicker scroll, keep increasing the multiplier.
# If you want to reduce scroll speed you will need to increase the divider.
# You can use both properties also to find the best scroll for you.
#
# Multiplier default is 3.0.
# Divider default is 1.0.
# Example:
# [scroll]
# multiplier = 3.0
# divider = 1.0

# Navigation
#
# "mode" - Define navigation mode
#   • NativeTab (MacOS only)
#   • Bookmark
#   • BottomTab
#   • TopTab
#   • Plain
#
# "hide-if-single" - Hide navigation UI if is single.
# "clickable" - Enable click on tabs to switch.
# "use-current-path" - Use same path whenever a new tab is created (Note: requires `use-fork` to be set to false).
# "color-automation" - Set a specific color for the tab whenever a specific program is running, or in a specific directory.
#
# Example:
# [navigation]
# mode = "bookmark"
# clickable = false
# hide-if-single = true
# use-current-path = false
# color-automation = []

# Shell
#
# You can set `shell.program` to the path of your favorite shell, e.g. `/bin/fish`.
# Entries in `shell.args` are passed unmodified as arguments to the shell.
#
# Default:
#   - (macOS) user login shell
#   - (Linux/BSD) user login shell
#   - (Windows) powershell
#
# Example 1 using fish shell from bin path:
#
# [shell]
# program = "/bin/fish"
# args = ["--login"]
#
# Example 2 for Windows using powershell
#
# [shell]
# program = "pwsh"
# args = []
#
# Example 3 for Windows using powershell with login
#
# [shell]
# program = "pwsh"
# args = ["-l"]
#
# Example 4 for MacOS with tmux installed by homebrew
#
# [shell]
# program = "/opt/homebrew/bin/tmux"
# args = ["new-session", "-c", "/var/www"]

# Colors
#
# Colors definition will overwrite any property in theme
# (considering if theme folder does exists and is being used)
#
# Example:
# [colors]
# background = '#0F0D0E'
# foreground = '#F9F4DA'
# cursor = '#F38BA3'
# tabs = '#443d40'
# tabs-active = '#F38BA3'
# green = '#0BA95B'
# red = '#ED203D'
# blue = '#12B5E5'
# yellow = '#FCBA28'

# Bindings
#
# Create custom Key bindings for Rio terminal
# More information in: https://raphamorim.io/rio/docs/key-bindings
#
# Example:
# [bindings]
# keys = [
#   { key = "q", with = "super", action = "Quit" },
#   # Bytes[27, 91, 53, 126] is equivalent to "\x1b[5~"
#   { key = "home", with = "super | shift", bytes = [27, 91, 53, 126] }
# ]

# Platform
#
# Rio now allows you to have different configurations per OS
# You can write ovewrite properties like `Shell`, `Navigation`
# and `Window`.
#
# Example:
# [shell]
# # default (in this case will be used only on MacOS)
# program = "/bin/fish"
# args = ["--login"]
#
# [platform]
# # Microsoft Windows overwrite
# windows.shell.program = "pwsh"
# windows.shell.args = ["-l"]
#
# # Linux overwrite
# linux.shell.program = "tmux"
# linux.shell.args = ["new-session", "-c", "/var/www"]

# Log level
#
# This property enables log level filter and file. The default level is "OFF" and the logs are not logged to a file as default.
#
# Example:
# [developer]
# log-level = "OFF"
# enable-log-file = false



================================================
FILE: home-manager/modules/rio/config/rio/themes/pinpox-dark.toml
================================================
[colors]
background       = '#24273a'
black            = '#24273a'
blue             = '#8aadf4'
cursor           = '#e8f0ff'
cyan             = '#8bd5ca'
foreground       = '#e8f0ff'
green            = '#a6da95'
magenta          = '#cba6f7'
red              = '#ed8796'
tabs             = '#363a4f'
tabs-active      = '#494d64'
white            = '#e8f0ff'
yellow           = '#eed49f'
dim-black        = '#1e2030'
dim-blue         = '#7891d0'
dim-cyan         = '#73b9a8'
dim-foreground   = '#b0b7d0'
dim-green        = '#8cb77d'
dim-magenta      = '#ad92d5'
dim-red          = '#c9707d'
dim-white        = '#b0b7d0'
dim-yellow       = '#d1bc87'
light-black      = '#5b6078'
light-blue       = '#74c7ec'
light-cyan       = '#aee2da'
light-foreground = '#747c9e'
light-green      = '#68f288'
light-magenta    = '#f5bde6'
light-red        = '#ff5370'
light-white      = '#747c9e'
light-yellow     = '#fab387'


================================================
FILE: home-manager/modules/rio/config/rio/themes/pinpox-light.toml
================================================
[colors]
background       = '#e8f0ff'
black            = '#e8f0ff'
blue             = '#1e66f5'
cursor           = '#24273a'
cyan             = '#179299'
foreground       = '#24273a'
green            = '#40a02b'
magenta          = '#8839ef'
red              = '#d20f39'
tabs             = '#e1e4e8'
tabs-active      = '#ccd0da'
white            = '#24273a'
yellow           = '#df8e1d'
dim-black        = '#dce0e8'
dim-blue         = '#1752c9'
dim-cyan         = '#127680'
dim-foreground   = '#1c1f2e'
dim-green        = '#357f23'
dim-magenta      = '#722fc3'
dim-red          = '#a90c2e'
dim-white        = '#1c1f2e'
dim-yellow       = '#b57418'
light-black      = '#5b6078'
light-blue       = '#267ff5'
light-cyan       = '#1da6ad'
light-foreground = '#2c2f3d'
light-green      = '#4db332'
light-magenta    = '#9c46f5'
light-red        = '#e42144'
light-white      = '#363a4f'
light-yellow     = '#f29d23'


================================================
FILE: home-manager/modules/rio/config/rio/themes/wildcharm-dark.toml
================================================
[colors]
background       = '#000000'
black            = '#000000'
blue             = '#0087d7'
cursor           = '#ffffff'
cyan             = '#00afaf'
foreground       = '#d0d0d0'
green            = '#00af5f'
magenta          = '#d787d7'
red              = '#d7005f'
tabs             = '#1c1c1c'
tabs-active      = '#303030'
white            = '#d0d0d0'
yellow           = '#d78700'
dim-black        = '#262626'
dim-blue         = '#005faf'
dim-cyan         = '#008787'
dim-foreground   = '#8a8a8a'
dim-green        = '#008700'
dim-magenta      = '#875f87'
dim-red          = '#af005f'
dim-white        = '#8a8a8a'
dim-yellow       = '#af8700'
light-black      = '#767676'
light-blue       = '#00afff'
light-cyan       = '#00d7d7'
light-foreground = '#ffffff'
light-green      = '#00d75f'
light-magenta    = '#ff87ff'
light-red        = '#ff5f87'
light-white      = '#ffffff'
light-yellow     = '#ffaf00'


================================================
FILE: home-manager/modules/rio/config/rio/themes/wildcharm-light.toml
================================================
[colors]
background       = '#ffffff'
black            = '#000000'
blue             = '#005faf'
cursor           = '#000000'
cyan             = '#008787'
foreground       = '#000000'
green            = '#008700'
magenta          = '#870087'
red              = '#af0000'
tabs             = '#e4e4e4'
tabs-active      = '#d0d0d0'
white            = '#ffffff'
yellow           = '#af5f00'
dim-black        = '#262626'
dim-blue         = '#00305f'
dim-cyan         = '#005f5f'
dim-foreground   = '#585858'
dim-green        = '#005f00'
dim-magenta      = '#5f005f'
dim-red          = '#870000'
dim-white        = '#d0d0d0'
dim-yellow       = '#875f00'
light-black      = '#585858'
light-blue       = '#0087d7'
light-cyan       = '#00afaf'
light-foreground = '#262626'
light-green      = '#00af5f'
light-magenta    = '#af00af'
light-red        = '#d70000'
light-white      = '#ffffff'
light-yellow     = '#d78700'


================================================
FILE: home-manager/modules/rio/default.nix
================================================
{
  lib,
  pkgs,
  config,
  ...
}:
with lib;
let
  cfg = config.pinpox.programs.rio;
in
{
  options.pinpox.programs.rio.enable = mkEnableOption "rio terminal emulator";

  config = mkIf cfg.enable {
    home.packages = with pkgs; [ rio ];
    xdg.enable = true;
    xdg.configFile.rio.source = ./config/rio;
  };
}


================================================
FILE: home-manager/modules/river/default.nix
================================================
{
  config,
  pkgs,
  lib,
  ...
}:
with lib;
let
  cfg = config.pinpox.programs.river;
  start-river =
    pkgs.writeShellScriptBin "start-river" # sh
      ''
        export WLR_DRM_NO_MODIFIERS=1
        dbus-launch --sh-syntax --exit-with-session ${pkgs.river-classic}/bin/river
      '';

  screenshot-region =
    pkgs.writeShellScriptBin "screenshot-region" # sh
      ''
        ${pkgs.slurp}/bin/slurp | ${pkgs.grim}/bin/grim -g - - | ${pkgs.wl-clipboard}/bin/wl-copy -t image/png
      '';

  screenshot-region-file =
    pkgs.writeShellScriptBin "screenshot-region-file" # sh
      ''
        ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" $(date +'%s_grim.png')
      '';
in
{
  options.pinpox.programs.river.enable = mkEnableOption "river window manager";

  config = mkIf cfg.enable {

    # Sets --indicator for network-manager-applet, which makes it work in river
    xsession.preferStatusNotifierItems = true;

    # Install these packages for my user
    home.packages = with pkgs; [
      river-classic
      river-luatile
      # way-displays
      waybar
      wl-clipboard
      wlr-randr
      start-river
      screenshot-region
      screenshot-region-satty
      screenshot-region-file
    ];

    xdg = {
      enable = true;
      configFile = {

        # River configuration files
        river-config = {
          target = "river/init";
          source = ./river-config;
          executable = true;
        };

        river-config-extra = {
          target = "river/init_exta";
          text = # sh
            ''
              riverctl map-switch normal lid close spawn ${pkgs.swaylock}/bin/swaylock
              # riverctl map normal Super F12 spawn '${pkgs.slurp}/bin/slurp | ${pkgs.grim}/bin/grim -g - - | ${pkgs.wl-clipboard}/bin/wl-copy -t image/png'
              # riverctl map normal Super F12 spawn ${screenshot-region}
              riverctl map normal Super p spawn "${pkgs.tofi}/bin/tofi-run"

              ${pkgs.mako}/bin/mako &
              waybar
              # ${pkgs.wlr-randr}/bin/wlr-randr --output eDP-1 --mode 1920x1080 --pos 0,0 \
              # --output DP-1 --mode 2560x1440 --pos 4480,0 \
              # --output DP-2 --mode 2560x1440@164.54 --pos 1920,0

              # wlr-randr --output eDP-1 --on --mode 1920x1080 --pos 0,0 --output DP-1  --on --mode 2560x1440 --pos 4480,0 --output DP-2  --on --mode 2560x1440  --pos 1920,0

            '';
          executable = true;
        };

        # river-luatile layouts
        luatile-layout = {
          target = "river-luatile/layout.lua";
          source = ./layout.lua;
        };

        luatile-json = {
          target = "river-luatile/json.lua";
          source = ./json.lua;
        };
      };
    };
  };
}


================================================
FILE: home-manager/modules/river/json.lua
================================================

--
-- json.lua
--
-- Copyright (c) 2020 rxi
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy of
-- this software and associated documentation files (the "Software"), to deal in
-- the Software without restriction, including without limitation the rights to
-- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-- of the Software, and to permit persons to whom the Software is furnished to do
-- so, subject to the following conditions:
--
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
--
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
--

local json = { _version = "0.1.2" }

-------------------------------------------------------------------------------
-- Encode
-------------------------------------------------------------------------------

local encode

local escape_char_map = {
  [ "\\" ] = "\\",
  [ "\"" ] = "\"",
  [ "\b" ] = "b",
  [ "\f" ] = "f",
  [ "\n" ] = "n",
  [ "\r" ] = "r",
  [ "\t" ] = "t",
}

local escape_char_map_inv = { [ "/" ] = "/" }
for k, v in pairs(escape_char_map) do
  escape_char_map_inv[v] = k
end


local function escape_char(c)
  return "\\" .. (escape_char_map[c] or string.format("u%04x", c:byte()))
end


local function encode_nil(val)
  return "null"
end


local function encode_table(val, stack)
  local res = {}
  stack = stack or {}

  -- Circular reference?
  if stack[val] then error("circular reference") end

  stack[val] = true

  if rawget(val, 1) ~= nil or next(val) == nil then
    -- Treat as array -- check keys are valid and it is not sparse
    local n = 0
    for k in pairs(val) do
      if type(k) ~= "number" then
        error("invalid table: mixed or invalid key types")
      end
      n = n + 1
    end
    if n ~= #val then
      error("invalid table: sparse array")
    end
    -- Encode
    for i, v in ipairs(val) do
      table.insert(res, encode(v, stack))
    end
    stack[val] = nil
    return "[" .. table.concat(res, ",") .. "]"

  else
    -- Treat as an object
    for k, v in pairs(val) do
      if type(k) ~= "string" then
        error("invalid table: mixed or invalid key types")
      end
      table.insert(res, encode(k, stack) .. ":" .. encode(v, stack))
    end
    stack[val] = nil
    return "{" .. table.concat(res, ",") .. "}"
  end
end


local function encode_string(val)
  return '"' .. val:gsub('[%z\1-\31\\"]', escape_char) .. '"'
end


local function encode_number(val)
  -- Check for NaN, -inf and inf
  if val ~= val or val <= -math.huge or val >= math.huge then
    error("unexpected number value '" .. tostring(val) .. "'")
  end
  return string.format("%.14g", val)
end


local type_func_map = {
  [ "nil"     ] = encode_nil,
  [ "table"   ] = encode_table,
  [ "string"  ] = encode_string,
  [ "number"  ] = encode_number,
  [ "boolean" ] = tostring,
}


encode = function(val, stack)
  local t = type(val)
  local f = type_func_map[t]
  if f then
    return f(val, stack)
  end
  error("unexpected type '" .. t .. "'")
end


function json.encode(val)
  return ( encode(val) )
end


-------------------------------------------------------------------------------
-- Decode
-------------------------------------------------------------------------------

local parse

local function create_set(...)
  local res = {}
  for i = 1, select("#", ...) do
    res[ select(i, ...) ] = true
Download .txt
gitextract_pevrk36z/

├── .envrc
├── .github/
│   ├── FUNDING.yml
│   └── workflows/
│       ├── check-upstream-todos.yml
│       └── manual.yml
├── .gitignore
├── .pre-commit-config.yaml
├── .woodpecker/
│   └── x86-64-linux.yaml
├── LICENSE
├── README.md
├── clan-service-modules/
│   ├── machine-type/
│   │   ├── default.nix
│   │   ├── desktop.nix
│   │   ├── mobile.nix
│   │   ├── nextcloud-desktop.nix
│   │   ├── scanners.nix
│   │   └── server.nix
│   ├── monitoring/
│   │   ├── alert-rules.nix
│   │   ├── alertmanager-irc-relay.nix
│   │   ├── blackbox.nix
│   │   ├── default.nix
│   │   ├── grafana.nix
│   │   ├── loki.nix
│   │   ├── node-exporter.nix
│   │   └── prometheus.nix
│   ├── navidrome.nix
│   └── thelounge.nix
├── flake.nix
├── formatter.nix
├── home-manager/
│   ├── colorscheme.nix
│   ├── modules/
│   │   ├── audio-recording/
│   │   │   └── default.nix
│   │   ├── calendar/
│   │   │   └── default.nix
│   │   ├── chromium/
│   │   │   └── default.nix
│   │   ├── claude-code/
│   │   │   └── default.nix
│   │   ├── credentials/
│   │   │   ├── age-recipients
│   │   │   └── default.nix
│   │   ├── easyeffects/
│   │   │   └── default.nix
│   │   ├── email/
│   │   │   ├── aerc-style.nix
│   │   │   └── default.nix
│   │   ├── firefox/
│   │   │   ├── default.nix
│   │   │   └── userchrome.css.mustache
│   │   ├── fonts/
│   │   │   └── default.nix
│   │   ├── foot/
│   │   │   └── default.nix
│   │   ├── games/
│   │   │   └── default.nix
│   │   ├── git/
│   │   │   └── default.nix
│   │   ├── go/
│   │   │   └── default.nix
│   │   ├── grobi/
│   │   │   └── default.nix
│   │   ├── gtk/
│   │   │   ├── banana.nix
│   │   │   └── default.nix
│   │   ├── helix/
│   │   │   └── default.nix
│   │   ├── k9s/
│   │   │   └── default.nix
│   │   ├── kanshi/
│   │   │   └── default.nix
│   │   ├── mako/
│   │   │   └── default.nix
│   │   ├── mpv/
│   │   │   └── default.nix
│   │   ├── neomutt/
│   │   │   └── default.nix
│   │   ├── newsboat/
│   │   │   └── default.nix
│   │   ├── obs-studio/
│   │   │   └── default.nix
│   │   ├── pandoc/
│   │   │   └── default.nix
│   │   ├── pi-mono/
│   │   │   └── default.nix
│   │   ├── rio/
│   │   │   ├── config/
│   │   │   │   └── rio/
│   │   │   │       ├── config.toml
│   │   │   │       └── themes/
│   │   │   │           ├── pinpox-dark.toml
│   │   │   │           ├── pinpox-light.toml
│   │   │   │           ├── wildcharm-dark.toml
│   │   │   │           └── wildcharm-light.toml
│   │   │   └── default.nix
│   │   ├── river/
│   │   │   ├── default.nix
│   │   │   ├── json.lua
│   │   │   ├── layout.lua
│   │   │   └── river-config
│   │   ├── shell/
│   │   │   ├── default.nix
│   │   │   ├── fish.nix
│   │   │   ├── starship.nix
│   │   │   ├── zellij-chooser
│   │   │   ├── zsh.nix
│   │   │   ├── zshrc
│   │   │   ├── zshrc-coffee
│   │   │   └── zshrc-extra
│   │   ├── ssh/
│   │   │   ├── default.nix
│   │   │   ├── ssh-key-cert.pub
│   │   │   └── ssh-key.pub
│   │   ├── sway/
│   │   │   └── default.nix
│   │   ├── swaylock/
│   │   │   ├── default.nix
│   │   │   └── style.css
│   │   ├── taskwarrior/
│   │   │   └── default.nix
│   │   ├── theme-switcher/
│   │   │   ├── default.nix
│   │   │   └── toggle-theme.sh
│   │   ├── tmux/
│   │   │   ├── default.nix
│   │   │   └── tmux.conf
│   │   ├── waybar/
│   │   │   ├── default.nix
│   │   │   └── style.css
│   │   ├── xdg/
│   │   │   └── default.nix
│   │   ├── zed/
│   │   │   └── default.nix
│   │   ├── zellij/
│   │   │   └── default.nix
│   │   └── zk/
│   │       ├── config.toml
│   │       ├── default.md
│   │       ├── default.nix
│   │       └── journal.md
│   └── profiles/
│       ├── common.nix
│       ├── desktop/
│       │   └── default.nix
│       ├── mobile/
│       │   └── default.nix
│       └── server/
│           └── default.nix
├── images/
│   ├── configuration.nix
│   └── raspi.nix
├── inventory.json
├── inventory.nix
├── machines/
│   ├── birne/
│   │   ├── configuration.nix
│   │   └── hardware-configuration.nix
│   ├── clementine/
│   │   ├── configuration.nix
│   │   ├── disko.nix
│   │   └── facter.json
│   ├── fichte/
│   │   ├── configuration.nix
│   │   ├── disko-config-btrfs.nix
│   │   └── facter.json
│   ├── kartoffel/
│   │   ├── configuration.nix
│   │   ├── hardware-configuration.nix
│   │   └── retiolum.nix
│   ├── kfbox/
│   │   ├── configuration.nix
│   │   ├── hardware-configuration.nix
│   │   └── retiolum.nix
│   ├── kiwi/
│   │   ├── configuration.nix
│   │   ├── disko-config-btrfs.nix
│   │   ├── framework.nix
│   │   ├── ollama-local.nix
│   │   └── opencrow-geninf.nix
│   ├── limette/
│   │   ├── configuration.nix
│   │   ├── disko-config-btrfs.nix
│   │   └── disko-config-zfs.nix
│   ├── porree/
│   │   ├── blog.nix
│   │   ├── caddy.nix
│   │   ├── configuration.nix
│   │   ├── hardware-configuration.nix
│   │   ├── nostr/
│   │   │   └── nostr.json
│   │   └── retiolum.nix
│   ├── tanne/
│   │   ├── configuration.nix
│   │   └── disko-config-btrfs.nix
│   ├── traube/
│   │   ├── configuration.nix
│   │   ├── disko.nix
│   │   └── facter.json
│   └── uconsole/
│       ├── configuration.nix
│       └── disko-config.nix
├── modules/
│   ├── bluetooth/
│   │   └── default.nix
│   ├── caddy-security/
│   │   └── default.nix
│   ├── calibre-web/
│   │   └── default.nix
│   ├── ci/
│   │   └── default.nix
│   ├── clan-common/
│   │   └── default.nix
│   ├── environment/
│   │   └── default.nix
│   ├── fonts/
│   │   └── default.nix
│   ├── forgejo/
│   │   └── default.nix
│   ├── gitea/
│   │   └── default.nix
│   ├── hedgedoc/
│   │   └── default.nix
│   ├── hello/
│   │   ├── default.nix
│   │   └── test.nix
│   ├── home-assistant/
│   │   └── default.nix
│   ├── http2irc/
│   │   └── default.nix
│   ├── immich/
│   │   └── default.nix
│   ├── jitsi-matrix-presence/
│   │   └── default.nix
│   ├── kf-homepage/
│   │   ├── default.nix
│   │   └── page/
│   │       └── index.html
│   ├── locale/
│   │   └── default.nix
│   ├── lvm-grub/
│   │   └── default.nix
│   ├── miniflux/
│   │   └── default.nix
│   ├── minio/
│   │   ├── default.nix
│   │   └── policies/
│   │       ├── nextcloud-external.json
│   │       └── restic.json
│   ├── networking/
│   │   └── default.nix
│   ├── nextcloud/
│   │   └── default.nix
│   ├── nix-common/
│   │   └── default.nix
│   ├── ntfy-sh/
│   │   └── default.nix
│   ├── opencloud/
│   │   └── default.nix
│   ├── opencrow/
│   │   └── default.nix
│   ├── openssh/
│   │   ├── ca.pub
│   │   └── default.nix
│   ├── owncast/
│   │   └── default.nix
│   ├── paperless/
│   │   ├── default.nix
│   │   └── django-apps/
│   │       └── paperless_perms/
│   │           ├── __init__.py
│   │           └── apps.py
│   ├── radio/
│   │   └── default.nix
│   ├── restic/
│   │   └── default.nix
│   ├── screego/
│   │   └── default.nix
│   ├── sound/
│   │   └── default.nix
│   ├── storagebox/
│   │   └── default.nix
│   ├── twitch-first/
│   │   └── default.nix
│   ├── unbound-desktop/
│   │   └── default.nix
│   ├── unifi-controller/
│   │   └── default.nix
│   ├── vaultwarden/
│   │   └── default.nix
│   ├── vikunja/
│   │   └── default.nix
│   ├── virtualisation/
│   │   └── default.nix
│   ├── wastebin/
│   │   └── default.nix
│   ├── wayland/
│   │   └── default.nix
│   ├── web-vm/
│   │   └── default.nix
│   ├── yubikey/
│   │   └── default.nix
│   └── zsh/
│       └── default.nix
├── overlays/
│   ├── default.nix
│   └── nextcloud.patch
├── packages/
│   ├── fritzbox_exporter/
│   │   └── default.nix
│   ├── groups-relay/
│   │   └── default.nix
│   ├── hello-custom/
│   │   └── default.nix
│   ├── machine-report/
│   │   ├── default.nix
│   │   └── machine_report.sh
│   ├── manual/
│   │   ├── default.nix
│   │   └── template.html
│   ├── mqtt2prometheus/
│   │   └── default.nix
│   ├── noctalia-askpass/
│   │   └── default.nix
│   ├── raspi-image
│   ├── river-luatile/
│   │   └── default.nix
│   ├── smartmon-script/
│   │   ├── default.nix
│   │   └── smartmon.py
│   ├── woodpecker-pipeline/
│   │   └── default.nix
│   ├── zsh-abbrev-alias/
│   │   └── default.nix
│   ├── zsh-async/
│   │   └── default.nix
│   └── zsh-colored-man-pages/
│       └── default.nix
├── templates/
│   └── default/
│       └── flake.nix
├── users/
│   ├── pinpox-wraps/
│   │   ├── chromium/
│   │   │   └── default.nix
│   │   └── ffmpeg/
│   │       └── default.nix
│   ├── pinpox.nix
│   └── root.nix
├── utils/
│   └── default.nix
└── vars/
    ├── per-machine/
    │   ├── birne/
    │   │   ├── data-mesher-node-identity/
    │   │   │   ├── identity.pub/
    │   │   │   │   └── value
    │   │   │   └── peer.id/
    │   │   │       └── value
    │   │   ├── dm-pull-deploy-status-key/
    │   │   │   └── signing.pub/
    │   │   │       └── value
    │   │   ├── minio/
    │   │   │   └── .validation-hash
    │   │   ├── restic-server/
    │   │   │   └── .validation-hash
    │   │   ├── state-version/
    │   │   │   └── version/
    │   │   │       └── value
    │   │   ├── wireguard/
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-clan/
    │   │   │   ├── ipv4/
    │   │   │   │   └── value
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-clan-ip/
    │   │   │   └── ipv4/
    │   │   │       └── value
    │   │   └── yggdrasil/
    │   │       ├── address/
    │   │       │   └── value
    │   │       └── publicKey/
    │   │           └── value
    │   ├── clementine/
    │   │   ├── data-mesher-node-identity/
    │   │   │   ├── identity.pub/
    │   │   │   │   └── value
    │   │   │   └── peer.id/
    │   │   │       └── value
    │   │   ├── dm-pull-deploy-status-key/
    │   │   │   └── signing.pub/
    │   │   │       └── value
    │   │   ├── punchcard/
    │   │   │   └── .validation-hash
    │   │   ├── punchcard2/
    │   │   │   └── .validation-hash
    │   │   ├── state-version/
    │   │   │   └── version/
    │   │   │       └── value
    │   │   ├── trippy-track/
    │   │   │   └── .validation-hash
    │   │   ├── twitch-first/
    │   │   │   └── .validation-hash
    │   │   ├── wireguard-wg-clan/
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-clan-ip/
    │   │   │   └── ipv4/
    │   │   │       └── value
    │   │   ├── wireguard-wg-tunnel/
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-tunnel-ip/
    │   │   │   └── ipv4/
    │   │   │       └── value
    │   │   ├── yggdrasil/
    │   │   │   ├── address/
    │   │   │   │   └── value
    │   │   │   └── publicKey/
    │   │   │       └── value
    │   │   └── zerotier/
    │   │       ├── zerotier-ip/
    │   │       │   └── value
    │   │       └── zerotier-network-id/
    │   │           └── value
    │   ├── fichte/
    │   │   ├── data-mesher-node-identity/
    │   │   │   ├── identity.pub/
    │   │   │   │   └── value
    │   │   │   └── peer.id/
    │   │   │       └── value
    │   │   ├── dm-pull-deploy-status-key/
    │   │   │   └── signing.pub/
    │   │   │       └── value
    │   │   ├── state-version/
    │   │   │   └── version/
    │   │   │       └── value
    │   │   └── yggdrasil/
    │   │       ├── address/
    │   │       │   └── value
    │   │       └── publicKey/
    │   │           └── value
    │   ├── kartoffel/
    │   │   ├── data-mesher-node-identity/
    │   │   │   ├── identity.pub/
    │   │   │   │   └── value
    │   │   │   └── peer.id/
    │   │   │       └── value
    │   │   ├── dm-pull-deploy-status-key/
    │   │   │   └── signing.pub/
    │   │   │       └── value
    │   │   ├── state-version/
    │   │   │   └── version/
    │   │   │       └── value
    │   │   ├── wireguard/
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-clan/
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-clan-ip/
    │   │   │   └── ipv4/
    │   │   │       └── value
    │   │   └── yggdrasil/
    │   │       ├── address/
    │   │       │   └── value
    │   │       └── publicKey/
    │   │           └── value
    │   ├── kfbox/
    │   │   ├── caddy/
    │   │   │   └── .validation-hash
    │   │   ├── cert-irc/
    │   │   │   ├── .validation-hash
    │   │   │   ├── irc.crt/
    │   │   │   │   └── value
    │   │   │   └── irc.fullchain.crt/
    │   │   │       └── value
    │   │   ├── cert-music/
    │   │   │   ├── .validation-hash
    │   │   │   ├── music.crt/
    │   │   │   │   └── value
    │   │   │   └── music.fullchain.crt/
    │   │   │       └── value
    │   │   ├── data-mesher-host-key/
    │   │   │   └── public_key/
    │   │   │       └── value
    │   │   ├── data-mesher-node-identity/
    │   │   │   ├── identity.pub/
    │   │   │   │   └── value
    │   │   │   └── peer.id/
    │   │   │       └── value
    │   │   ├── dex/
    │   │   │   └── .validation-hash
    │   │   ├── dm-pull-deploy-status-key/
    │   │   │   └── signing.pub/
    │   │   │       └── value
    │   │   ├── go-karma-bot/
    │   │   │   └── .validation-hash
    │   │   ├── hedgedoc/
    │   │   │   └── .validation-hash
    │   │   ├── jitsi-presence/
    │   │   │   └── .validation-hash
    │   │   ├── restic-exporter/
    │   │   │   └── .validation-hash
    │   │   ├── state-version/
    │   │   │   └── version/
    │   │   │       └── value
    │   │   ├── vikunja/
    │   │   │   └── .validation-hash
    │   │   ├── wireguard/
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-clan/
    │   │   │   ├── ipv4/
    │   │   │   │   └── value
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-clan-ip/
    │   │   │   └── ipv4/
    │   │   │       └── value
    │   │   ├── wireguard-wg-star/
    │   │   │   ├── ipv6/
    │   │   │   │   └── value
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   └── yggdrasil/
    │   │       ├── address/
    │   │       │   └── value
    │   │       └── publicKey/
    │   │           └── value
    │   ├── kiwi/
    │   │   ├── cert-claw/
    │   │   │   ├── .validation-hash
    │   │   │   ├── claw.crt/
    │   │   │   │   └── value
    │   │   │   └── claw.fullchain.crt/
    │   │   │       └── value
    │   │   ├── data-mesher-host-key/
    │   │   │   └── public_key/
    │   │   │       └── value
    │   │   ├── data-mesher-node-identity/
    │   │   │   ├── identity.pub/
    │   │   │   │   └── value
    │   │   │   └── peer.id/
    │   │   │       └── value
    │   │   ├── dm-pull-deploy-status-key/
    │   │   │   └── signing.pub/
    │   │   │       └── value
    │   │   ├── openclaw/
    │   │   │   └── .validation-hash
    │   │   ├── opencrow/
    │   │   │   └── .validation-hash
    │   │   ├── opencrow-email/
    │   │   │   └── .validation-hash
    │   │   ├── opencrow-eversports/
    │   │   │   └── .validation-hash
    │   │   ├── opencrow-geninf/
    │   │   │   └── pubkey/
    │   │   │       └── value
    │   │   ├── opencrow-geninf-user/
    │   │   │   └── pubkey/
    │   │   │       └── value
    │   │   ├── opencrow-nextcloud/
    │   │   │   └── .validation-hash
    │   │   ├── opencrow-nextcloud-work/
    │   │   │   └── .validation-hash
    │   │   ├── opencrow-nostr-bot/
    │   │   │   └── nostr-public-key/
    │   │   │       └── value
    │   │   ├── opencrow-nostr-user/
    │   │   │   └── nostr-public-key/
    │   │   │       └── value
    │   │   ├── state-version/
    │   │   │   └── version/
    │   │   │       └── value
    │   │   ├── tor_tor/
    │   │   │   └── hostname/
    │   │   │       └── value
    │   │   ├── wireguard-wg-clan/
    │   │   │   ├── ipv4/
    │   │   │   │   └── value
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-clan-ip/
    │   │   │   └── ipv4/
    │   │   │       └── value
    │   │   ├── wireguard-wg-star/
    │   │   │   ├── ipv6/
    │   │   │   │   └── value
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-tunnel/
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-tunnel-ip/
    │   │   │   └── ipv4/
    │   │   │       └── value
    │   │   ├── yggdrasil/
    │   │   │   ├── address/
    │   │   │   │   └── value
    │   │   │   └── publicKey/
    │   │   │       └── value
    │   │   └── zerotier/
    │   │       └── zerotier-ip/
    │   │           └── value
    │   ├── limette/
    │   │   ├── data-mesher-node-identity/
    │   │   │   ├── identity.pub/
    │   │   │   │   └── value
    │   │   │   └── peer.id/
    │   │   │       └── value
    │   │   ├── dm-pull-deploy-status-key/
    │   │   │   └── signing.pub/
    │   │   │       └── value
    │   │   ├── state-version/
    │   │   │   └── version/
    │   │   │       └── value
    │   │   ├── wireguard/
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-clan/
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-clan-ip/
    │   │   │   └── ipv4/
    │   │   │       └── value
    │   │   └── yggdrasil/
    │   │       ├── address/
    │   │       │   └── value
    │   │       └── publicKey/
    │   │           └── value
    │   ├── porree/
    │   │   ├── alertmanager-ntfy/
    │   │   │   └── .validation-hash
    │   │   ├── caddy/
    │   │   │   └── .validation-hash
    │   │   ├── caddy-basicauth/
    │   │   │   └── .validation-hash
    │   │   ├── cert-prometheus/
    │   │   │   ├── .validation-hash
    │   │   │   ├── prometheus.crt/
    │   │   │   │   └── value
    │   │   │   └── prometheus.fullchain.crt/
    │   │   │       └── value
    │   │   ├── cert-status/
    │   │   │   ├── .validation-hash
    │   │   │   ├── status.crt/
    │   │   │   │   └── value
    │   │   │   └── status.fullchain.crt/
    │   │   │       └── value
    │   │   ├── data-mesher-node-identity/
    │   │   │   ├── identity.pub/
    │   │   │   │   └── value
    │   │   │   └── peer.id/
    │   │   │       └── value
    │   │   ├── dm-pull-deploy-status-key/
    │   │   │   └── signing.pub/
    │   │   │       └── value
    │   │   ├── matrix-hook/
    │   │   │   └── .validation-hash
    │   │   ├── opencrow/
    │   │   │   └── .validation-hash
    │   │   ├── opencrow-email/
    │   │   │   └── .validation-hash
    │   │   ├── opencrow-eversports/
    │   │   │   └── .validation-hash
    │   │   ├── opencrow-local/
    │   │   │   └── .validation-hash
    │   │   ├── opencrow-nextcloud/
    │   │   │   └── .validation-hash
    │   │   ├── opencrow-nextcloud-work/
    │   │   │   └── .validation-hash
    │   │   ├── restic-exporter/
    │   │   │   └── .validation-hash
    │   │   ├── state-version/
    │   │   │   └── version/
    │   │   │       └── value
    │   │   ├── tor_tor/
    │   │   │   └── hostname/
    │   │   │       └── value
    │   │   ├── vaultwarden/
    │   │   │   └── .validation-hash
    │   │   ├── wireguard/
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-clan/
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   ├── wireguard-wg-clan-ip/
    │   │   │   └── ipv4/
    │   │   │       └── value
    │   │   ├── wireguard-wg-star/
    │   │   │   ├── ipv6/
    │   │   │   │   └── value
    │   │   │   └── publickey/
    │   │   │       └── value
    │   │   └── yggdrasil/
    │   │       ├── address/
    │   │       │   └── value
    │   │       └── publicKey/
    │   │           └── value
    │   ├── tanne/
    │   │   ├── data-mesher-node-identity/
    │   │   │   ├── identity.pub/
    │   │   │   │   └── value
    │   │   │   └── peer.id/
    │   │   │       └── value
    │   │   ├── dm-pull-deploy-status-key/
    │   │   │   └── signing.pub/
    │   │   │       └── value
    │   │   ├── state-version/
    │   │   │   └── version/
    │   │   │       └── value
    │   │   └── yggdrasil/
    │   │       ├── address/
    │   │       │   └── value
    │   │       └── publicKey/
    │   │           └── value
    │   ├── traube/
    │   │   ├── data-mesher-node-identity/
    │   │   │   ├── identity.pub/
    │   │   │   │   └── value
    │   │   │   └── peer.id/
    │   │   │       └── value
    │   │   ├── dm-pull-deploy-status-key/
    │   │   │   └── signing.pub/
    │   │   │       └── value
    │   │   ├── opencrow/
    │   │   │   └── .validation-hash
    │   │   ├── opencrow-traube/
    │   │   │   └── .validation-hash
    │   │   ├── state-version/
    │   │   │   └── version/
    │   │   │       └── value
    │   │   └── yggdrasil/
    │   │       ├── address/
    │   │       │   └── value
    │   │       └── publicKey/
    │   │           └── value
    │   ├── tunnelmonster/
    │   │   ├── abiotic-docker/
    │   │   │   └── .validation-hash
    │   │   ├── porkbun-dns/
    │   │   │   └── .validation-hash
    │   │   └── state-version/
    │   │       └── version/
    │   │           └── value
    │   └── uconsole/
    │       ├── data-mesher-node-identity/
    │       │   ├── identity.pub/
    │       │   │   └── value
    │       │   └── peer.id/
    │       │       └── value
    │       ├── dm-pull-deploy-status-key/
    │       │   └── signing.pub/
    │       │       └── value
    │       ├── state-version/
    │       │   └── version/
    │       │       └── value
    │       ├── wireguard-wg-clan/
    │       │   └── publickey/
    │       │       └── value
    │       ├── wireguard-wg-clan-ip/
    │       │   └── ipv4/
    │       │       └── value
    │       └── yggdrasil/
    │           ├── address/
    │           │   └── value
    │           └── publicKey/
    │               └── value
    └── shared/
        ├── bulletin-signing-key/
        │   └── signing.pub/
        │       └── value
        ├── data-mesher-ca/
        │   └── ca.pub/
        │       └── value
        ├── data-mesher-network/
        │   └── network.pub/
        │       └── value
        ├── data-mesher-network-key/
        │   └── public_key/
        │       └── value
        ├── data-mesher-signing-key/
        │   └── signing.pub/
        │       └── value
        ├── dm-dns/
        │   ├── .validation-hash
        │   └── zone.conf/
        │       └── value
        ├── dm-dns-signing-key/
        │   └── signing.pub/
        │       └── value
        ├── dm-pull-deploy-signing-key/
        │   └── signing.pub/
        │       └── value
        ├── dm-wallpaper-signing-key/
        │   └── signing.pub/
        │       └── value
        ├── dm-wg-star-wg-star-signing-key/
        │   └── signing.pub/
        │       └── value
        ├── dns-mesher/
        │   ├── .validation-hash
        │   ├── entries/
        │   │   └── value
        │   └── zone.conf/
        │       └── value
        ├── pki-root-ca/
        │   └── ca.crt/
        │       └── value
        ├── restic-cert/
        │   ├── .validation-hash
        │   └── restic-cert/
        │       └── value
        ├── restic-credentials/
        │   └── .validation-hash
        ├── restic-credentials-backblaze/
        │   └── .validation-hash
        ├── restic-kfbox/
        │   └── .validation-hash
        ├── sftp-credentials/
        │   └── ssh-public-key/
        │       └── value
        ├── step-ca/
        │   └── ca.crt/
        │       └── value
        ├── storagebox-ssh/
        │   └── ssh-public-key/
        │       └── value
        └── zerotier-controller/
            ├── zerotier-ip/
            │   └── value
            └── zerotier-network-id/
                └── value
Download .txt
SYMBOL INDEX (25 symbols across 2 files)

FILE: modules/paperless/django-apps/paperless_perms/apps.py
  function _setup_editors_group (line 20) | def _setup_editors_group():
  function _promote_user (line 37) | def _promote_user(user, editors_group):
  function _on_user_created (line 43) | def _on_user_created(sender, instance, created, **kwargs):
  class PaperlessPermsConfig (line 55) | class PaperlessPermsConfig(AppConfig):
    method ready (line 59) | def ready(self):

FILE: packages/smartmon-script/smartmon.py
  class Device (line 79) | class Device(collections.namedtuple('DeviceBase', 'path opts')):
    method type (line 83) | def type(self):
    method base_labels (line 87) | def base_labels(self):
    method smartctl_select (line 90) | def smartctl_select(self):
  function metric_key (line 94) | def metric_key(metric, prefix=''):
  function metric_format (line 98) | def metric_format(metric, prefix=''):
  function metric_print_meta (line 108) | def metric_print_meta(metric, prefix=''):
  function metric_print (line 115) | def metric_print(metric, prefix=''):
  function smart_ctl (line 119) | def smart_ctl(*args, check=True):
  function smart_ctl_version (line 129) | def smart_ctl_version():
  function find_devices (line 133) | def find_devices():
  function device_is_active (line 155) | def device_is_active(device):
  function device_info (line 170) | def device_info(device):
  function device_smart_capabilities (line 187) | def device_smart_capabilities(device):
  function collect_device_info (line 208) | def collect_device_info(device):
  function collect_device_health_self_assessment (line 222) | def collect_device_health_self_assessment(device):
  function collect_ata_metrics (line 237) | def collect_ata_metrics(device):
  function collect_ata_error_count (line 295) | def collect_ata_error_count(device):
  function collect_disks_smart_metrics (line 312) | def collect_disks_smart_metrics(wakeup_disks):
  function main (line 350) | def main():
Condensed preview — 402 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (862K chars).
[
  {
    "path": ".envrc",
    "chars": 10,
    "preview": "use flake\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "chars": 41,
    "preview": "github: [pinpox]\nbuy_me_a_coffee: pinpox\n"
  },
  {
    "path": ".github/workflows/check-upstream-todos.yml",
    "chars": 4641,
    "preview": "name: Check Upstream TODOs\n\non:\n  push:\n    branches: [main]\n  pull_request:\n    branches: [main]\n  schedule:\n    - cron"
  },
  {
    "path": ".github/workflows/manual.yml",
    "chars": 702,
    "preview": "name: Build and Deploy Manual\non:\n  push:\n    branches:\n      - main\njobs:\n  tests:\n    runs-on: ubuntu-latest\n    steps"
  },
  {
    "path": ".gitignore",
    "chars": 310,
    "preview": "result\n### Vim\n# Swap\n[._]*.s[a-v][a-z]\n!*.svg  # comment out if you don't need vector files\n[._]*.sw[a-p]\n[._]s[a-rt-v]"
  },
  {
    "path": ".pre-commit-config.yaml",
    "chars": 299,
    "preview": "repos:\n  - repo: local\n    hooks:\n      - id: treefmt\n        name: treefmt\n        entry: nix fmt\n        language: sys"
  },
  {
    "path": ".woodpecker/x86-64-linux.yaml",
    "chars": 4543,
    "preview": "{\n  \"labels\": {\n    \"backend\": \"local\",\n    \"platform\": \"linux/amd64\"\n  },\n  \"steps\": [\n    {\n      \"commands\": [\n      "
  },
  {
    "path": "LICENSE",
    "chars": 35149,
    "preview": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
  },
  {
    "path": "README.md",
    "chars": 3765,
    "preview": "![nixos](https://socialify.git.ci/pinpox/nixos/image?description=1&font=Source%20Code%20Pro&forks=1&issues=1&logo=https%"
  },
  {
    "path": "clan-service-modules/machine-type/default.nix",
    "chars": 889,
    "preview": "{\n  _class = \"clan.service\";\n  manifest.name = \"machine-type\";\n  manifest.readme = \"Machine classification/profiles\";\n\n "
  },
  {
    "path": "clan-service-modules/machine-type/desktop.nix",
    "chars": 4124,
    "preview": "{\n  config,\n  pkgs,\n  lib,\n  nur,\n  flake-self,\n  wl-harmonograph,\n  promterm,\n  home-manager,\n  ...\n}:\n{\n\n  imports = ["
  },
  {
    "path": "clan-service-modules/machine-type/mobile.nix",
    "chars": 2727,
    "preview": "{\n  config,\n  pkgs,\n  lib,\n  nur,\n  flake-self,\n\n  promterm,\n  home-manager,\n  ...\n}:\n{\n\n  imports = [\n    home-manager."
  },
  {
    "path": "clan-service-modules/machine-type/nextcloud-desktop.nix",
    "chars": 642,
    "preview": "{\n  # Nextcloud on the desktop\n  services.davfs2 = {\n    enable = true;\n    # settings.globalSection.use_locks = false;\n"
  },
  {
    "path": "clan-service-modules/machine-type/scanners.nix",
    "chars": 100,
    "preview": "{\n  hardware.sane.enable = true;\n  users.users.pinpox.extraGroups = [\n    \"scanner\"\n    \"lp\"\n  ];\n}\n"
  },
  {
    "path": "clan-service-modules/machine-type/server.nix",
    "chars": 1332,
    "preview": "{\n  restic-exporter,\n  lib,\n  pkgs,\n  config,\n  ...\n}:\nwith lib;\n{\n\n  imports = [\n    restic-exporter.nixosModules.defau"
  },
  {
    "path": "clan-service-modules/monitoring/alert-rules.nix",
    "chars": 9715,
    "preview": "{ lib, meta }:\n\nlet\n  # docker's filesystems disappear quickly, leading to false positives\n  deviceFilter = ''path!~\"^(/"
  },
  {
    "path": "clan-service-modules/monitoring/alertmanager-irc-relay.nix",
    "chars": 1684,
    "preview": "{ pkgs, config, ... }:\nlet\n  am-irc-conf = {\n    # listening host/port.\n    http_host = \"localhost\";\n    http_port = 866"
  },
  {
    "path": "clan-service-modules/monitoring/blackbox.nix",
    "chars": 943,
    "preview": "{ pkgs, ... }:\n{\n  services.prometheus.exporters.blackbox = {\n    enable = true;\n    # Default port is 9115\n    # Listen"
  },
  {
    "path": "clan-service-modules/monitoring/default.nix",
    "chars": 7588,
    "preview": "{ lib, ... }:\n{\n  _class = \"clan.service\";\n  manifest.name = \"monitoring\";\n  manifest.description = \"Prometheus/Loki/Gra"
  },
  {
    "path": "clan-service-modules/monitoring/grafana.nix",
    "chars": 5026,
    "preview": "{ settings, roles, meta, oidcGenerator }:\n{ config, lib, pkgs, ... }:\nlet\n  prometheusHosts = builtins.attrNames (roles."
  },
  {
    "path": "clan-service-modules/monitoring/loki.nix",
    "chars": 2192,
    "preview": "{ ... }:\nlet\n  port-loki = 3100;\nin\n{\n  pinpox.services.restic-client.backup-paths-exclude = [ \"/var/lib/loki\" ];\n\n  net"
  },
  {
    "path": "clan-service-modules/monitoring/node-exporter.nix",
    "chars": 398,
    "preview": "{ ... }:\n{\n  services.prometheus.exporters.node = {\n    enable = true;\n    # Default port is 9100\n    # Listen on 0.0.0."
  },
  {
    "path": "clan-service-modules/monitoring/prometheus.nix",
    "chars": 7135,
    "preview": "{ settings, roles, meta, prometheusOidcGenerator }:\n{\n  lib,\n  pkgs,\n  config,\n  flake-self,\n  pinpox-utils,\n  ...\n}:\nle"
  },
  {
    "path": "clan-service-modules/navidrome.nix",
    "chars": 2125,
    "preview": "{ ... }:\n{\n  _class = \"clan.service\";\n  manifest.name = \"navidrome\";\n  manifest.description = \"Navidrome music streaming"
  },
  {
    "path": "clan-service-modules/thelounge.nix",
    "chars": 2259,
    "preview": "{ ... }:\n{\n  _class = \"clan.service\";\n  manifest.name = \"thelounge\";\n  manifest.description = \"The Lounge IRC client and"
  },
  {
    "path": "flake.nix",
    "chars": 12201,
    "preview": "{\n  description = \"My machines\";\n\n  inputs = {\n\n    wrappers.url = \"github:lassulus/wrappers\";\n    wrappers.inputs.nixpk"
  },
  {
    "path": "formatter.nix",
    "chars": 623,
    "preview": "{\n  treefmt-nix,\n  nixpkgsFor,\n  forAllSystems,\n}:\nforAllSystems (\n  system:\n  treefmt-nix.lib.evalModule nixpkgsFor.${s"
  },
  {
    "path": "home-manager/colorscheme.nix",
    "chars": 1020,
    "preview": "{ lib, ... }:\nwith lib;\nlet\n  colornames = [\n    \"Black\"\n    \"BrightBlack\"\n    \"White\"\n    \"BrightWhite\"\n    \"Yellow\"\n  "
  },
  {
    "path": "home-manager/modules/audio-recording/default.nix",
    "chars": 1792,
    "preview": "{\n  config,\n  lib,\n  pkgs,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.defaults.audio-recording;\n  plugins = with pkgs;"
  },
  {
    "path": "home-manager/modules/calendar/default.nix",
    "chars": 7185,
    "preview": "{\n  config,\n  lib,\n  pkgs,\n  flake-inputs,\n  ...\n}:\n\nwith lib;\n\nlet\n  cfg = config.pinpox.defaults.calendar;\nin\n{\n  opti"
  },
  {
    "path": "home-manager/modules/chromium/default.nix",
    "chars": 631,
    "preview": "{ config, lib, ... }:\nwith lib;\nlet\n  cfg = config.pinpox.programs.chromium;\nin\n{\n  options.pinpox.programs.chromium.ena"
  },
  {
    "path": "home-manager/modules/claude-code/default.nix",
    "chars": 3570,
    "preview": "{\n  pkgs,\n  config,\n  lib,\n  flake-self,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.programs.claude-code;\n  mics-skill"
  },
  {
    "path": "home-manager/modules/credentials/age-recipients",
    "chars": 186,
    "preview": "age15m0pgtr06pqaql2wx8e2xqupcctzkf0dk0cc06hv3cjcgpe5u3ns59jaun\nage1picohsm1qjpqjd9pnlh8zem6wwz62ml9z995fsdz9e23dumamjj0n"
  },
  {
    "path": "home-manager/modules/credentials/default.nix",
    "chars": 2149,
    "preview": "{\n  config,\n  pkgs,\n  lib,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.defaults.credentials;\nin\n{\n  options.pinpox.defa"
  },
  {
    "path": "home-manager/modules/easyeffects/default.nix",
    "chars": 990,
    "preview": "{\n  config,\n  lib,\n  pkgs,\n  ...\n}:\n\nwith lib;\n\nlet\n  cfg = config.pinpox.programs.easyeffects;\n\nin\n{\n  options.pinpox.p"
  },
  {
    "path": "home-manager/modules/email/aerc-style.nix",
    "chars": 1807,
    "preview": "{ config, ... }:\nwith config.pinpox.colors;\n{\n  \"*.default\" = true;\n  \"*error.bold\" = true;\n  \"statusline*.default\" = tr"
  },
  {
    "path": "home-manager/modules/email/default.nix",
    "chars": 2419,
    "preview": "{\n  config,\n  pkgs,\n  lib,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.defaults.email;\nin\n{\n  options.pinpox.defaults.e"
  },
  {
    "path": "home-manager/modules/firefox/default.nix",
    "chars": 4868,
    "preview": "{\n  config,\n  pkgs,\n  lib,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.programs.firefox;\nin\n{\n  options.pinpox.programs"
  },
  {
    "path": "home-manager/modules/firefox/userchrome.css.mustache",
    "chars": 6904,
    "preview": ":root {\n\n\t\t/* Minimal Functional Fox variables*/\n\t\t--mff-bg: #{{colors.Black}};\n\t\t--mff-icon-color: #{{colors.Blue}};\n\t\t"
  },
  {
    "path": "home-manager/modules/fonts/default.nix",
    "chars": 1058,
    "preview": "{ config, lib, ... }:\nwith lib;\nlet\n  cfg = config.pinpox.defaults.fonts;\nin\n{\n\n  options.pinpox = {\n\n    defaults.fonts"
  },
  {
    "path": "home-manager/modules/foot/default.nix",
    "chars": 2191,
    "preview": "{\n  lib,\n  pkgs,\n  config,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.programs.foot;\nin\n{\n  options.pinpox.programs.fo"
  },
  {
    "path": "home-manager/modules/games/default.nix",
    "chars": 245,
    "preview": "{\n  config,\n  lib,\n  pkgs,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.programs.games;\nin\n{\n  options.pinpox.programs.g"
  },
  {
    "path": "home-manager/modules/git/default.nix",
    "chars": 4459,
    "preview": "{\n  pkgs,\n  config,\n  lib,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.defaults.git;\n\n  prePushHook = pkgs.writeShellAp"
  },
  {
    "path": "home-manager/modules/go/default.nix",
    "chars": 562,
    "preview": "{ config, lib, ... }:\nwith lib;\nlet\n  cfg = config.pinpox.programs.go;\nin\n{\n  options.pinpox.programs.go.enable = mkEnab"
  },
  {
    "path": "home-manager/modules/grobi/default.nix",
    "chars": 1129,
    "preview": "{\n  config,\n  pkgs,\n  lib,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.defaults.grobi;\nin\n{\n  options.pinpox.defaults.g"
  },
  {
    "path": "home-manager/modules/gtk/banana.nix",
    "chars": 463,
    "preview": "{\n  config,\n  pkgs,\n  ...\n}:\n{\n  config = {\n    home.pointerCursor = {\n      name = \"Banana\";\n      size = 32;\n      pac"
  },
  {
    "path": "home-manager/modules/gtk/default.nix",
    "chars": 3584,
    "preview": "{\n  config,\n  pkgs,\n  lib,\n  ...\n}:\nwith lib;\nlet\n\n  cfg = config.pinpox.defaults.gtk;\n\n  # TODO use flake inputs\n  mate"
  },
  {
    "path": "home-manager/modules/helix/default.nix",
    "chars": 1346,
    "preview": "{\n  config,\n  lib,\n  pkgs,\n  ...\n}:\n\nwith lib;\n\nlet\n  cfg = config.pinpox.programs.helix;\n\nin\n{\n  options.pinpox.program"
  },
  {
    "path": "home-manager/modules/k9s/default.nix",
    "chars": 2309,
    "preview": "{\n  config,\n  lib,\n  pkgs,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.programs.k9s;\nin\n{\n\n  options.pinpox.programs.k9"
  },
  {
    "path": "home-manager/modules/kanshi/default.nix",
    "chars": 1217,
    "preview": "{\n  config,\n  pkgs,\n  lib,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.programs.kanshi;\nin\n{\n  options.pinpox.programs."
  },
  {
    "path": "home-manager/modules/mako/default.nix",
    "chars": 1121,
    "preview": "{\n  pkgs,\n  config,\n  lib,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.programs.mako;\nin\n{\n  options.pinpox.programs.ma"
  },
  {
    "path": "home-manager/modules/mpv/default.nix",
    "chars": 806,
    "preview": "{\n  lib,\n  pkgs,\n  config,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.programs.mpv;\nin\n{\n  options.pinpox.programs.mpv"
  },
  {
    "path": "home-manager/modules/neomutt/default.nix",
    "chars": 444,
    "preview": "{ config, lib, ... }:\nwith lib;\nlet\n  cfg = config.pinpox.programs.neomutt;\nin\n{\n  options.pinpox.programs.neomutt.enabl"
  },
  {
    "path": "home-manager/modules/newsboat/default.nix",
    "chars": 1383,
    "preview": "{ config, lib, ... }:\nwith lib;\nlet\n  cfg = config.pinpox.programs.newsboat;\n  splitString = str: builtins.filter builti"
  },
  {
    "path": "home-manager/modules/obs-studio/default.nix",
    "chars": 970,
    "preview": "{\n  lib,\n  pkgs,\n  config,\n  system-config,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.programs.obs-studio;\n  droidcam"
  },
  {
    "path": "home-manager/modules/pandoc/default.nix",
    "chars": 523,
    "preview": "{ config, lib, ... }:\nwith lib;\nlet\n\n  cfg = config.pinpox.programs.pandoc;\nin\n{\n  options.pinpox.programs.pandoc.enable"
  },
  {
    "path": "home-manager/modules/pi-mono/default.nix",
    "chars": 2659,
    "preview": "{\n  lib,\n  pkgs,\n  config,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.programs.pi;\n\n  # Generate models.json from the "
  },
  {
    "path": "home-manager/modules/rio/config/rio/config.toml",
    "chars": 8825,
    "preview": "# Modifier to line-height. Default is `1.0`\nline-height = 1.06\n\n# Environment variables\nenv-vars = [\"TERM=xterm-256color"
  },
  {
    "path": "home-manager/modules/rio/config/rio/themes/pinpox-dark.toml",
    "chars": 908,
    "preview": "[colors]\nbackground       = '#24273a'\nblack            = '#24273a'\nblue             = '#8aadf4'\ncursor           = '#e8f"
  },
  {
    "path": "home-manager/modules/rio/config/rio/themes/pinpox-light.toml",
    "chars": 908,
    "preview": "[colors]\nbackground       = '#e8f0ff'\nblack            = '#e8f0ff'\nblue             = '#1e66f5'\ncursor           = '#242"
  },
  {
    "path": "home-manager/modules/rio/config/rio/themes/wildcharm-dark.toml",
    "chars": 908,
    "preview": "[colors]\nbackground       = '#000000'\nblack            = '#000000'\nblue             = '#0087d7'\ncursor           = '#fff"
  },
  {
    "path": "home-manager/modules/rio/config/rio/themes/wildcharm-light.toml",
    "chars": 908,
    "preview": "[colors]\nbackground       = '#ffffff'\nblack            = '#000000'\nblue             = '#005faf'\ncursor           = '#000"
  },
  {
    "path": "home-manager/modules/rio/default.nix",
    "chars": 316,
    "preview": "{\n  lib,\n  pkgs,\n  config,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.programs.rio;\nin\n{\n  options.pinpox.programs.rio"
  },
  {
    "path": "home-manager/modules/river/default.nix",
    "chars": 2751,
    "preview": "{\n  config,\n  pkgs,\n  lib,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.programs.river;\n  start-river =\n    pkgs.writeSh"
  },
  {
    "path": "home-manager/modules/river/json.lua",
    "chars": 9639,
    "preview": "\n--\n-- json.lua\n--\n-- Copyright (c) 2020 rxi\n--\n-- Permission is hereby granted, free of charge, to any person obtaining"
  },
  {
    "path": "home-manager/modules/river/layout.lua",
    "chars": 3451,
    "preview": "package.path = package.path .. \";/home/pinpox/.config/river-luatile/?.lua\"\njson = require \"json\"\n\nprint(\"river-luatile s"
  },
  {
    "path": "home-manager/modules/river/river-config",
    "chars": 7944,
    "preview": "#!/usr/bin/env bash\n\n# This is the example configuration file for river.\n#\n# If you wish to edit this, you will probably"
  },
  {
    "path": "home-manager/modules/shell/default.nix",
    "chars": 4620,
    "preview": "{ config, lib, ... }:\nwith lib;\nlet\n  cfg = config.pinpox.defaults.shell;\n  colors = config.pinpox.colors;\nin\n{\n\n  optio"
  },
  {
    "path": "home-manager/modules/shell/fish.nix",
    "chars": 2716,
    "preview": "{ pkgs, promterm, ... }:\n{\n\n  programs = {\n\n    fzf.enableFishIntegration = true;\n    dircolors.enableFishIntegration = "
  },
  {
    "path": "home-manager/modules/shell/starship.nix",
    "chars": 795,
    "preview": "{ ... }:\n{\n  programs.starship = {\n    enable = false;\n    enableBashIntegration = true;\n    enableZshIntegration = true"
  },
  {
    "path": "home-manager/modules/shell/zellij-chooser",
    "chars": 237,
    "preview": "#!/usr/bin/env bash\n\nZJ_SESSIONS=$(zellij list-sessions -n)\nNO_SESSIONS=$(echo \"${ZJ_SESSIONS}\" | wc -l)\n\nif [ \"${NO_SES"
  },
  {
    "path": "home-manager/modules/shell/zsh.nix",
    "chars": 8054,
    "preview": "{\n  flake-inputs,\n  pkgs,\n  promterm,\n  lib,\n  config,\n  ...\n}:\n{\n\n  programs.zsh = {\n    enable = true;\n    autosuggest"
  },
  {
    "path": "home-manager/modules/shell/zshrc",
    "chars": 4715,
    "preview": "# zsh-prompt.zsh - Nushell-style prompt for zsh\n#\n# Set HOST_COLOR before sourcing this file, e.g.:\n#   HOST_COLOR=\"mage"
  },
  {
    "path": "home-manager/modules/shell/zshrc-coffee",
    "chars": 679,
    "preview": "function coffee {\n\t# Hide cursor\n\ttput civis\n\n\t# Restore cursor on exit\n\ttrap 'tput cnorm; clear; return 0' EXIT INT TER"
  },
  {
    "path": "home-manager/modules/shell/zshrc-extra",
    "chars": 3398,
    "preview": "# Create and change to a directory\ntake () { mkdir -p -- \"$1\" && cd -- \"$1\"; }\n\n# Create and change to a new temporary d"
  },
  {
    "path": "home-manager/modules/ssh/default.nix",
    "chars": 1664,
    "preview": "{\n  config,\n  lib,\n  ...\n}:\n\nwith lib;\n\nlet\n  cfg = config.pinpox.programs.ssh;\nin\n{\n  options.pinpox.programs.ssh.enabl"
  },
  {
    "path": "home-manager/modules/ssh/ssh-key-cert.pub",
    "chars": 734,
    "preview": "ecdsa-sha2-nistp256-cert-v01@openssh.com AAAAKGVjZHNhLXNoYTItbmlzdHAyNTYtY2VydC12MDFAb3BlbnNzaC5jb20AAAAg+QuBDYto1/9245C"
  },
  {
    "path": "home-manager/modules/ssh/ssh-key.pub",
    "chars": 169,
    "preview": "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCdOfrnazSXp7ZmHcePXSd4leP3Qafr4fmDr3w+AxwRChSn1"
  },
  {
    "path": "home-manager/modules/sway/default.nix",
    "chars": 12085,
    "preview": "{\n  config,\n  pkgs,\n  lib,\n  wl-harmonograph,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.programs.sway;\n\n  start-sway "
  },
  {
    "path": "home-manager/modules/swaylock/default.nix",
    "chars": 4171,
    "preview": "{ lib, config, ... }:\nwith lib;\nlet\n  cfg = config.pinpox.programs.swaylock;\nin\n{\n  options.pinpox.programs.swaylock.ena"
  },
  {
    "path": "home-manager/modules/swaylock/style.css",
    "chars": 2467,
    "preview": "* {\n  border: none;\n  border-radius: 0;\n  min-height: 0;\n  font-family: \"Berkeley Mono\";\n  font-size: 15px;\n}\n\nwindow#wa"
  },
  {
    "path": "home-manager/modules/taskwarrior/default.nix",
    "chars": 703,
    "preview": "{\n  lib,\n  config,\n  pkgs,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.programs.taskwarrior;\nin\n{\n  options.pinpox.prog"
  },
  {
    "path": "home-manager/modules/theme-switcher/default.nix",
    "chars": 1868,
    "preview": "{\n  config,\n  lib,\n  pkgs,\n  ...\n}:\nwith lib;\nlet\n\n  toggle-theme = pkgs.writeShellScriptBin \"toggle-theme\" (builtins.re"
  },
  {
    "path": "home-manager/modules/theme-switcher/toggle-theme.sh",
    "chars": 701,
    "preview": "#!/usr/bin/env bash\n\n# Read current setting\ncurrent=$(dconf read /org/gnome/desktop/interface/color-scheme 2>/dev/null)\n"
  },
  {
    "path": "home-manager/modules/tmux/default.nix",
    "chars": 886,
    "preview": "{\n  lib,\n  config,\n  pkgs,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.programs.tmux;\nin\n{\n  options.pinpox.programs.tm"
  },
  {
    "path": "home-manager/modules/tmux/tmux.conf",
    "chars": 3736,
    "preview": "# Set the emulator's title\nset -g set-titles on\nset -g set-titles-string \"#W\"\n\n# Forward focus events from emulator\nset "
  },
  {
    "path": "home-manager/modules/waybar/default.nix",
    "chars": 7095,
    "preview": "{\n  config,\n  lib,\n  pkgs,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.programs.waybar;\n\n  # source=$(${pkgs.pulseaudio"
  },
  {
    "path": "home-manager/modules/waybar/style.css",
    "chars": 2655,
    "preview": "/***************\n *   GENERAL   *\n ***************/\n\n* {\n  border: none;\n  border-radius: 0;\n  min-height: 0;\n  font-fam"
  },
  {
    "path": "home-manager/modules/xdg/default.nix",
    "chars": 262,
    "preview": "{ config, lib, ... }:\nwith lib;\nlet\n  cfg = config.pinpox.defaults.xdg;\nin\n{\n\n  options.pinpox.defaults.xdg = {\n    enab"
  },
  {
    "path": "home-manager/modules/zed/default.nix",
    "chars": 989,
    "preview": "{\n  config,\n  lib,\n  pkgs,\n  ...\n}:\n\nwith lib;\n\nlet\n  cfg = config.pinpox.programs.zed;\n\nin\n{\n  options.pinpox.programs."
  },
  {
    "path": "home-manager/modules/zellij/default.nix",
    "chars": 1154,
    "preview": "{ lib, config, ... }:\nwith lib;\nlet\n  cfg = config.pinpox.programs.zellij;\nin\n{\n  options.pinpox.programs.zellij.enable "
  },
  {
    "path": "home-manager/modules/zk/config.toml",
    "chars": 5616,
    "preview": "# vim: filetype=dosini\n# zk configuration file\n#\n# Uncomment the properties you want to customize.\n\n# NOTE SETTINGS\n#\n# "
  },
  {
    "path": "home-manager/modules/zk/default.md",
    "chars": 139,
    "preview": "---\ntitle: {{title}}\ncreated: {{format-date now}}\nvisibility: private\nlanguage: en\ntags:\n  - {{slug title}}\n---\n\n{{conte"
  },
  {
    "path": "home-manager/modules/zk/default.nix",
    "chars": 1036,
    "preview": "{\n  lib,\n  pkgs,\n  config,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.programs.zk;\nin\n{\n  options.pinpox.programs.zk.e"
  },
  {
    "path": "home-manager/modules/zk/journal.md",
    "chars": 200,
    "preview": "---\ntitle: {{title}}\ncreated: {{format-date now}}\nvisibility: private\nlanguage: de\ntags:\n  - {{slug title}}\n  - journal\n"
  },
  {
    "path": "home-manager/profiles/common.nix",
    "chars": 1548,
    "preview": "{\n  lib,\n  pkgs,\n  nur,\n  flake-self,\n  ...\n}:\nwith lib;\n{\n  imports = [ ../colorscheme.nix ];\n\n  config = {\n\n    # Home"
  },
  {
    "path": "home-manager/profiles/desktop/default.nix",
    "chars": 3770,
    "preview": "{\n  pkgs,\n  ...\n}:\nlet\n\n  screenshot-region =\n    pkgs.writeShellScriptBin \"screenshot-region\" # sh\n      ''\n        ${p"
  },
  {
    "path": "home-manager/profiles/mobile/default.nix",
    "chars": 2607,
    "preview": "{\n  pkgs,\n  ...\n}:\n{\n\n  imports = [ ../common.nix ];\n\n  config = {\n\n    home.keyboard = {\n      # variant = \"colemak\";\n "
  },
  {
    "path": "home-manager/profiles/server/default.nix",
    "chars": 459,
    "preview": "{\n  pkgs,\n  ...\n}:\n{\n  imports = [ ../common.nix ];\n\n  config = {\n\n    # Install these packages for my user\n    home.pac"
  },
  {
    "path": "images/configuration.nix",
    "chars": 1530,
    "preview": "{\n  config,\n  pkgs,\n  lib,\n  modulesPath,\n  ...\n}:\nwith lib;\n{\n\n  imports = [ (modulesPath + \"/profiles/qemu-guest.nix\")"
  },
  {
    "path": "images/raspi.nix",
    "chars": 2945,
    "preview": "# # nix build '.#base-image'\n# raspi-image =\n#   let\n#     system = \"aarch64-linux\";\n#   in\n#   import \"${nixpkgs}/nixos"
  },
  {
    "path": "inventory.json",
    "chars": 191,
    "preview": "{\n  \"machines\": {\n    \"fichte\": {\n      \"installedAt\": 1760275487\n    },\n    \"clementine\": {\n      \"installedAt\": 177261"
  },
  {
    "path": "inventory.nix",
    "chars": 13130,
    "preview": "{ self }:\n{\n  machines = {\n    kiwi.tags = [ \"desktop\" ];\n    tanne.tags = [ \"desktop\" ];\n    fichte.tags = [ \"desktop\" "
  },
  {
    "path": "machines/birne/configuration.nix",
    "chars": 1196,
    "preview": "# Configuration for birne\n{\n  config,\n  lib,\n  ...\n}:\n{\n  imports = [ ./hardware-configuration.nix ];\n\n  # clan.core.net"
  },
  {
    "path": "machines/birne/hardware-configuration.nix",
    "chars": 1591,
    "preview": "# Do not modify this file!  It was generated by ‘nixos-generate-config’\n# and may be overwritten by future invocations. "
  },
  {
    "path": "machines/clementine/configuration.nix",
    "chars": 1186,
    "preview": "{\n  mc3000,\n  trippy-track,\n  pinpox-utils,\n  ...\n}:\n{\n  imports = [ trippy-track.nixosModules.default ];\n\n  clan.core.n"
  },
  {
    "path": "machines/clementine/disko.nix",
    "chars": 1285,
    "preview": "# ---\n# schema = \"single-disk\"\n# [placeholders]\n# mainDisk = \"/dev/disk/by-path/pci-0000:00:10.0\" \n# ---\n# This file was"
  },
  {
    "path": "machines/clementine/facter.json",
    "chars": 50017,
    "preview": "{\n  \"version\": 1,\n  \"system\": \"x86_64-linux\",\n  \"virtualisation\": \"kvm\",\n  \"hardware\": {\n    \"bios\": {\n      \"apm_info\":"
  },
  {
    "path": "machines/fichte/configuration.nix",
    "chars": 432,
    "preview": "{\n  pkgs,\n  nixos-hardware,\n  lib,\n  ...\n}:\n{\n\n  imports = [\n    ./disko-config-btrfs.nix\n    nixos-hardware.nixosModule"
  },
  {
    "path": "machines/fichte/disko-config-btrfs.nix",
    "chars": 2288,
    "preview": "{\n\n  boot.growPartition = true;\n  boot.supportedFilesystems.btrfs = true;\n\n  services.btrfs.autoScrub = {\n    enable = t"
  },
  {
    "path": "machines/fichte/facter.json",
    "chars": 87010,
    "preview": "{\n  \"version\": 1,\n  \"system\": \"x86_64-linux\",\n  \"virtualisation\": \"none\",\n  \"hardware\": {\n    \"bios\": {\n      \"apm_info\""
  },
  {
    "path": "machines/kartoffel/configuration.nix",
    "chars": 879,
    "preview": "# Configuration for kartoffel\n{ pkgs, lib, ... }:\n{\n\n  imports = [\n    ./hardware-configuration.nix\n    ./retiolum.nix\n "
  },
  {
    "path": "machines/kartoffel/hardware-configuration.nix",
    "chars": 904,
    "preview": "# Do not modify this file!  It was generated by ‘nixos-generate-config’\n# and may be overwritten by future invocations. "
  },
  {
    "path": "machines/kartoffel/retiolum.nix",
    "chars": 600,
    "preview": "{\n  config,\n  retiolum,\n  ...\n}:\n{\n\n  imports = [ retiolum.nixosModules.retiolum ];\n\n  networking.retiolum = {\n    ipv4 "
  },
  {
    "path": "machines/kfbox/configuration.nix",
    "chars": 4162,
    "preview": "{\n  aoe-taunt-discord-bot,\n  config,\n  go-karma-bot,\n\n  pkgs,\n  lib,\n  ...\n}:\nlet\n  pinpox-utils = import ../../utils { "
  },
  {
    "path": "machines/kfbox/hardware-configuration.nix",
    "chars": 86,
    "preview": "{ modulesPath, ... }:\n{\n  imports = [ (modulesPath + \"/profiles/qemu-guest.nix\") ];\n}\n"
  },
  {
    "path": "machines/kfbox/retiolum.nix",
    "chars": 557,
    "preview": "{\n  config,\n  retiolum,\n  ...\n}:\n{\n\n  imports = [ retiolum.nixosModules.retiolum ];\n\n  networking.retiolum = {\n    ipv4 "
  },
  {
    "path": "machines/kiwi/configuration.nix",
    "chars": 1238,
    "preview": "{\n  nixos-hardware,\n  lib,\n  ...\n}:\n{\n\n  imports = [\n    ./ollama-local.nix\n    ./opencrow-geninf.nix\n    ./disko-config"
  },
  {
    "path": "machines/kiwi/disko-config-btrfs.nix",
    "chars": 2500,
    "preview": "{\n\n  boot.growPartition = true;\n  boot.supportedFilesystems.btrfs = true;\n\n  services.btrfs.autoScrub = {\n    enable = t"
  },
  {
    "path": "machines/kiwi/framework.nix",
    "chars": 2022,
    "preview": "\n\n  config,\n  pkgs,\n  ...\n}:\n{\n\n  # For fingerprint support\n  # To enroll prints: `sudo fprint-enroll <username>`\n  serv"
  },
  {
    "path": "machines/kiwi/ollama-local.nix",
    "chars": 12234,
    "preview": "{ ... }:\nlet\n\n  vllmProvider = host: model: {\n    baseUrl = \"http://${host}:8000/v1\";\n    api = \"openai-completions\";\n  "
  },
  {
    "path": "machines/kiwi/opencrow-geninf.nix",
    "chars": 574,
    "preview": "{\n  distro,\n  opencrow,\n  pkgs,\n  ...\n}:\n{\n  imports = [\n    opencrow.nixosModules.default\n    distro.nixosModules.openc"
  },
  {
    "path": "machines/limette/configuration.nix",
    "chars": 502,
    "preview": "{\n  pkgs,\n  nixos-hardware,\n  ...\n}:\n{\n\n  networking.hostName = \"limette\";\n\n  pinpox.defaults.lvm-grub.enable = true;\n  "
  },
  {
    "path": "machines/limette/disko-config-btrfs.nix",
    "chars": 2153,
    "preview": "{\n\n  boot.growPartition = true;\n  boot.supportedFilesystems.btrfs = true;\n\n  disko.devices = {\n    disk = {\n      main ="
  },
  {
    "path": "machines/limette/disko-config-zfs.nix",
    "chars": 2960,
    "preview": "{ lib, config, ... }:\n{\n\n  # You may also find this setting useful to automatically set the latest compatible kernel:\n  "
  },
  {
    "path": "machines/porree/blog.nix",
    "chars": 298,
    "preview": "with import <nixpkgs> { };\n\nstdenv.mkDerivation rec {\n  name = \"blog\";\n\n  # src = ./git-repos/hugo-website;\n  src = buil"
  },
  {
    "path": "machines/porree/caddy.nix",
    "chars": 4714,
    "preview": "{\n  config,\n  pkgs,\n  ...\n}:\nlet\n  caddy-authfiles = config.clan.core.vars.generators.\"caddy-basicauth\".files;\n\n  mkBasi"
  },
  {
    "path": "machines/porree/configuration.nix",
    "chars": 4185,
    "preview": "{\n  matrix-hook,\n  config,\n  pkgs,\n  alertmanager-ntfy,\n  pinpox-utils,\n  ...\n}:\n{\n\n  imports = [\n    ./hardware-configu"
  },
  {
    "path": "machines/porree/hardware-configuration.nix",
    "chars": 86,
    "preview": "{ modulesPath, ... }:\n{\n  imports = [ (modulesPath + \"/profiles/qemu-guest.nix\") ];\n}\n"
  },
  {
    "path": "machines/porree/nostr/nostr.json",
    "chars": 102,
    "preview": "{\n  \"names\": {\n    \"pinpox\": \"cb1250be2faac3f301b2e9f6abc8651fbd7de5623fa7cc9b98d260ff266ce878\"\n  }\n}\n"
  },
  {
    "path": "machines/porree/retiolum.nix",
    "chars": 562,
    "preview": "{\n  config,\n  retiolum,\n  ...\n}:\n{\n\n  imports = [ retiolum.nixosModules.retiolum ];\n\n  networking.retiolum.ipv4 = \"10.24"
  },
  {
    "path": "machines/tanne/configuration.nix",
    "chars": 373,
    "preview": "{\n  nixos-hardware,\n  lib,\n  ...\n}:\n{\n\n  imports = [\n    ./disko-config-btrfs.nix\n    nixos-hardware.nixosModules.lenovo"
  },
  {
    "path": "machines/tanne/disko-config-btrfs.nix",
    "chars": 2499,
    "preview": "{\n\n  boot.growPartition = true;\n  boot.supportedFilesystems.btrfs = true;\n\n  services.btrfs.autoScrub = {\n    enable = t"
  },
  {
    "path": "machines/traube/configuration.nix",
    "chars": 274,
    "preview": "{\n  pkgs,\n  lib,\n  ...\n}:\n{\n  imports = [ ];\n\n  nixpkgs.hostPlatform = \"aarch64-linux\";\n\n  # Lock CPU governor to perfor"
  },
  {
    "path": "machines/traube/disko.nix",
    "chars": 2741,
    "preview": "# ---\n# schema = \"btrfs-single-disk-subvolumes\"\n# [placeholders]\n# mainDisk = \"/dev/disk/by-id/nvme-Samsung_SSD_970_EVO_"
  },
  {
    "path": "machines/traube/facter.json",
    "chars": 51365,
    "preview": "{\n  \"version\": 1,\n  \"system\": \"aarch64-linux\",\n  \"virtualisation\": \"none\",\n  \"uefi\": {\n    \"supported\": true,\n    \"platf"
  },
  {
    "path": "machines/uconsole/configuration.nix",
    "chars": 1748,
    "preview": "{\n  nixos-hardware,\n  lib,\n  pkgs,\n  config,\n  ...\n}:\n{\n  imports = [\n    # nixos-hardware.nixosModules.clockworkpi-ucon"
  },
  {
    "path": "machines/uconsole/disko-config.nix",
    "chars": 8562,
    "preview": "{ pkgs, config, lib, ... }:\nlet\n  # Raspberry Pi firmware files needed for boot\n  rpiFirmware = pkgs.raspberrypifw;\n\n  #"
  },
  {
    "path": "modules/bluetooth/default.nix",
    "chars": 442,
    "preview": "{\n  lib,\n  pkgs,\n  config,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.defaults.bluetooth;\nin\n{\n\n  options.pinpox.defau"
  },
  {
    "path": "modules/caddy-security/default.nix",
    "chars": 5899,
    "preview": "{\n  pkgs,\n  config,\n  lib,\n  pinpox-utils,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.services.caddy-security;\nin\n{\n\n "
  },
  {
    "path": "modules/calibre-web/default.nix",
    "chars": 1018,
    "preview": "{ config, lib, ... }:\nwith lib;\nlet\n  cfg = config.pinpox.services.calibre-web;\nin\n{\n\n  options.pinpox.services.calibre-"
  },
  {
    "path": "modules/ci/default.nix",
    "chars": 288,
    "preview": "{\n  config,\n  pkgs,\n  lib,\n  flake-self,\n  nixpkgs,\n  ...\n}:\nwith lib;\n{\n  options.pinpox.defaults = {\n    CISkip = mkOp"
  },
  {
    "path": "modules/clan-common/default.nix",
    "chars": 1306,
    "preview": "{\n  config,\n  clan-core,\n  self,\n  pkgs,\n  lib,\n  ...\n}:\n{\n\n  # Make pinpox-utils available to all modules\n  # _module.a"
  },
  {
    "path": "modules/environment/default.nix",
    "chars": 671,
    "preview": "{\n  config,\n  pkgs,\n  lib,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.defaults.environment;\nin\n{\n\n  options.pinpox.def"
  },
  {
    "path": "modules/fonts/default.nix",
    "chars": 988,
    "preview": "{\n  config,\n  pkgs,\n  lib,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.defaults.fonts;\nin\n{\n\n  options.pinpox.defaults."
  },
  {
    "path": "modules/forgejo/default.nix",
    "chars": 3651,
    "preview": "{ config, lib, pkgs, ... }:\nwith lib;\nlet\n  cfg = config.pinpox.services.forgejo;\n  oidcSecretPath = config.clan.core.va"
  },
  {
    "path": "modules/gitea/default.nix",
    "chars": 1496,
    "preview": "{ config, lib, ... }:\nwith lib;\nlet\n  cfg = config.pinpox.services.gitea;\nin\n{\n\n  options.pinpox.services.gitea = {\n    "
  },
  {
    "path": "modules/hedgedoc/default.nix",
    "chars": 2712,
    "preview": "{\n  config,\n  lib,\n  pinpox-utils,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.services.hedgedoc;\nin\n# pinpox-utils = i"
  },
  {
    "path": "modules/hello/default.nix",
    "chars": 620,
    "preview": "{\n  lib,\n  pkgs,\n  config,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.services.hello;\nin\n{\n  options.pinpox.services.h"
  },
  {
    "path": "modules/hello/test.nix",
    "chars": 444,
    "preview": "{\n  pkgs,\n  system,\n  self,\n  ...\n}:\n\nwith import (pkgs + \"/nixos/lib/testing-python.nix\") { inherit system; };\n\n(makeTe"
  },
  {
    "path": "modules/home-assistant/default.nix",
    "chars": 14490,
    "preview": "{\n  config,\n  lib,\n  pkgs,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.services.home-assistant;\nin\n{\n\n  options.pinpox."
  },
  {
    "path": "modules/http2irc/default.nix",
    "chars": 2324,
    "preview": "{\n  lib,\n  pkgs,\n  config,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.services.monitoring-server.http-irc;\n\n  http2irc"
  },
  {
    "path": "modules/immich/default.nix",
    "chars": 3187,
    "preview": "{\n  config,\n  lib,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.services.immich;\nin\n{\n\n  options.pinpox.services.immich "
  },
  {
    "path": "modules/jitsi-matrix-presence/default.nix",
    "chars": 1320,
    "preview": "{\n  config,\n  lib,\n  pkgs,\n  jitsi-matrix-presence,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.services.jitsi-matrix-p"
  },
  {
    "path": "modules/kf-homepage/default.nix",
    "chars": 416,
    "preview": "{ lib, config, ... }:\nwith lib;\nlet\n  cfg = config.pinpox.services.kf-homepage;\nin\n{\n\n  options.pinpox.services.kf-homep"
  },
  {
    "path": "modules/kf-homepage/page/index.html",
    "chars": 1294,
    "preview": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <title>Krosse Flagge</title>\n    <meta charset=\"UTF-8\" />\n    <meta name=\""
  },
  {
    "path": "modules/locale/default.nix",
    "chars": 821,
    "preview": "{ config, lib, ... }:\nwith lib;\nlet\n  cfg = config.pinpox.defaults.locale;\nin\n{\n\n  options.pinpox.defaults.locale = {\n  "
  },
  {
    "path": "modules/lvm-grub/default.nix",
    "chars": 629,
    "preview": "{ config, lib, ... }:\nwith lib;\nlet\n  cfg = config.pinpox.defaults.lvm-grub;\nin\n{\n\n  options.pinpox.defaults.lvm-grub = "
  },
  {
    "path": "modules/miniflux/default.nix",
    "chars": 2122,
    "preview": "{\n  config,\n  lib,\n  pkgs,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.services.miniflux;\n  oidcSecretPath = config.cla"
  },
  {
    "path": "modules/minio/default.nix",
    "chars": 1437,
    "preview": "{\n  lib,\n  config,\n  pkgs,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.services.minio;\nin\n{\n\n  options.pinpox.services."
  },
  {
    "path": "modules/minio/policies/nextcloud-external.json",
    "chars": 459,
    "preview": "{\n  \"ID\": \"NextcloudExternalRepoPolicy\",\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Sid\": \"AllowObjects\",\n"
  },
  {
    "path": "modules/minio/policies/restic.json",
    "chars": 424,
    "preview": "{\n  \"ID\": \"ResticRepoPolicy\",\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Sid\": \"AllowObjects\",\n      \"Effe"
  },
  {
    "path": "modules/networking/default.nix",
    "chars": 1350,
    "preview": "{\n  config,\n  lib,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.defaults.networking;\nin\n{\n\n  options.pinpox.defaults.net"
  },
  {
    "path": "modules/nextcloud/default.nix",
    "chars": 7149,
    "preview": "{\n  lib,\n  pkgs,\n  config,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.services.nextcloud;\n\n  # Pin Nextcloud major ver"
  },
  {
    "path": "modules/nix-common/default.nix",
    "chars": 3989,
    "preview": "{\n  config,\n  pkgs,\n  lib,\n  flake-self,\n  nixpkgs,\n  nix-index-database,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.d"
  },
  {
    "path": "modules/ntfy-sh/default.nix",
    "chars": 947,
    "preview": "{ lib, config, ... }:\nwith lib;\nlet\n  cfg = config.pinpox.services.ntfy-sh;\n  ntfy-port = \"8090\";\n  ntfy-host = \"push.pa"
  },
  {
    "path": "modules/opencloud/default.nix",
    "chars": 6135,
    "preview": "{\n  lib,\n  pkgs,\n  config,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.services.opencloud;\nin\n{\n\n  options.pinpox.servi"
  },
  {
    "path": "modules/opencrow/default.nix",
    "chars": 8449,
    "preview": "{\n  opencrow,\n  mics-skills,\n  config,\n  lib,\n  pkgs,\n  pinpox-utils,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.servi"
  },
  {
    "path": "modules/openssh/ca.pub",
    "chars": 89,
    "preview": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAPcS8NMzwYLvKFOXeTZwX/W6ua0zIzs4zA0PW0xz62i user-ca\n"
  },
  {
    "path": "modules/openssh/default.nix",
    "chars": 772,
    "preview": "{\n  config,\n  pkgs,\n  lib,\n  pinpox-keys,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.services.openssh;\nin\n{\n\n  options"
  },
  {
    "path": "modules/owncast/default.nix",
    "chars": 733,
    "preview": "{ config, lib, ... }:\nwith lib;\nlet\n  cfg = config.pinpox.services.owncast;\nin\n{\n  options.pinpox.services.owncast = {\n "
  },
  {
    "path": "modules/paperless/default.nix",
    "chars": 2544,
    "preview": "{\n  config,\n  lib,\n  pkgs,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.services.paperless;\n  paperlessPermsApp = ./djan"
  },
  {
    "path": "modules/paperless/django-apps/paperless_perms/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "modules/paperless/django-apps/paperless_perms/apps.py",
    "chars": 2150,
    "preview": "\"\"\"Auto-manage permissions for Remote-User accounts in Paperless-ngx.\n\nLoaded as a Django app via PAPERLESS_APPS. On sta"
  },
  {
    "path": "modules/radio/default.nix",
    "chars": 1672,
    "preview": "{\n  config,\n  lib,\n  radio,\n  pkgs,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.services.radio;\nin\n{\n\n  options.pinpox."
  },
  {
    "path": "modules/restic/default.nix",
    "chars": 4926,
    "preview": "{\n  lib,\n  pkgs,\n  config,\n  pinpox-utils,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.services.restic-client;\nin\n{\n\n  "
  },
  {
    "path": "modules/screego/default.nix",
    "chars": 1746,
    "preview": "{\n  config,\n  lib,\n  pkgs,\n  ...\n}:\nlet\n  cfg = config.pinpox.services.screego;\nin\n{\n  options.pinpox.services.screego ="
  },
  {
    "path": "modules/sound/default.nix",
    "chars": 4353,
    "preview": "{\n  config,\n  pkgs,\n  lib,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.defaults.sound;\nin\n{\n\n  options.pinpox.defaults."
  },
  {
    "path": "modules/storagebox/default.nix",
    "chars": 2488,
    "preview": "{\n  config,\n  pkgs,\n  lib,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.defaults.storagebox;\nin\n{\n\n  options.pinpox.defa"
  },
  {
    "path": "modules/twitch-first/default.nix",
    "chars": 1274,
    "preview": "{\n  config,\n  lib,\n  pkgs,\n  pinpox-utils,\n  twitch-first,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.services.twitch-"
  },
  {
    "path": "modules/unbound-desktop/default.nix",
    "chars": 1884,
    "preview": "{ lib, config, ... }:\nwith lib;\nlet\n  cfg = config.pinpox.services.unbound-desktop;\nin\n{\n\n  options.pinpox.services.unbo"
  },
  {
    "path": "modules/unifi-controller/default.nix",
    "chars": 1741,
    "preview": "{\n  lib,\n  config,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.services.unifi-controller;\nin\n{\n\n  options.pinpox.servic"
  },
  {
    "path": "modules/vaultwarden/default.nix",
    "chars": 1626,
    "preview": "{\n  config,\n  lib,\n  pinpox-utils,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.services.vaultwarden;\nin\n{\n\n  options.pi"
  },
  {
    "path": "modules/vikunja/default.nix",
    "chars": 2103,
    "preview": "{\n  config,\n  lib,\n  pinpox-utils,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.services.vikunja;\nin\n{\n\n  options.pinpox"
  },
  {
    "path": "modules/virtualisation/default.nix",
    "chars": 1007,
    "preview": "{\n  config,\n  lib,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.virtualisation;\nin\n{\n\n  options.pinpox.virtualisation = "
  },
  {
    "path": "modules/wastebin/default.nix",
    "chars": 1177,
    "preview": "{\n  config,\n  lib,\n  pkgs,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.services.wastebin;\nin\n{\n\n  options.pinpox.servic"
  },
  {
    "path": "modules/wayland/default.nix",
    "chars": 797,
    "preview": "{\n  config,\n  pkgs,\n  lib,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.services.wayland;\nin\n{\n\n  options.pinpox.service"
  },
  {
    "path": "modules/web-vm/default.nix",
    "chars": 482,
    "preview": "{ lib, config, ... }:\nwith lib;\nlet\n  cfg = config.pinpox.services.web-vm;\nin\n{\n\n  options.pinpox.services.web-vm.enable"
  },
  {
    "path": "modules/yubikey/default.nix",
    "chars": 2489,
    "preview": "{\n  config,\n  pkgs,\n  lib,\n  age-plugin-picohsm,\n  passage-secret-service,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox."
  },
  {
    "path": "modules/zsh/default.nix",
    "chars": 663,
    "preview": "{\n  config,\n  pkgs,\n  lib,\n  ...\n}:\nwith lib;\nlet\n  cfg = config.pinpox.defaults.zsh;\nin\n{\n\n  options.pinpox.defaults.zs"
  },
  {
    "path": "overlays/default.nix",
    "chars": 2931,
    "preview": "inputs: flake-self: pinpox-utils:\nlet\n  # Pass flake inputs to overlay so we can use the sources pinned in flake.lock\n  "
  },
  {
    "path": "overlays/nextcloud.patch",
    "chars": 2680,
    "preview": "From 3c3e45f0ad4b4f10161197f70daf46c8888ba91e Mon Sep 17 00:00:00 2001\nFrom: Josh <josh.t.richards@gmail.com>\nDate: Fri,"
  },
  {
    "path": "packages/fritzbox_exporter/default.nix",
    "chars": 667,
    "preview": "{\n  lib,\n  fetchFromGitHub,\n  buildGoModule,\n  pkgs,\n}:\n\nbuildGoModule rec {\n  pname = \"fritzbox_exporter\";\n  version = "
  },
  {
    "path": "packages/groups-relay/default.nix",
    "chars": 630,
    "preview": "{\n  lib,\n  buildGoModule,\n  fetchFromGitHub,\n}:\n\nbuildGoModule {\n  pname = \"groups-relay\";\n  version = \"0-unstable-2025-"
  },
  {
    "path": "packages/hello-custom/default.nix",
    "chars": 769,
    "preview": "{\n  lib,\n  stdenv,\n  fetchurl,\n}:\n\nstdenv.mkDerivation rec {\n  pname = \"hello\";\n  version = \"2.10\";\n\n  src = fetchurl {\n"
  },
  {
    "path": "packages/machine-report/default.nix",
    "chars": 736,
    "preview": "{\n  stdenv,\n  lib,\n  makeWrapper,\n  procps,\n  coreutils,\n  gawk,\n  gnused,\n  gnugrep,\n  util-linux,\n  iproute2,\n  net-to"
  },
  {
    "path": "packages/machine-report/machine_report.sh",
    "chars": 16222,
    "preview": "#!/usr/bin/env bash\n# TR-100 Machine Report\n# Copyright © 2024, U.S. Graphics, LLC. BSD-3-Clause License.\n\n# Global vari"
  },
  {
    "path": "packages/manual/default.nix",
    "chars": 2925,
    "preview": "{\n  stdenvNoCC,\n  pkgs,\n  flake-self,\n  inputs,\n  pinpox-utils,\n}:\n\nstdenvNoCC.mkDerivation rec {\n  pname = \"flake-manua"
  },
  {
    "path": "packages/manual/template.html",
    "chars": 3144,
    "preview": "<!doctype html>\n<html>\n  <head>\n    <meta charset=\"utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, init"
  },
  {
    "path": "packages/mqtt2prometheus/default.nix",
    "chars": 645,
    "preview": "{\n  lib,\n  fetchFromGitHub,\n  buildGoModule,\n  pkgs,\n}:\n\n# https://github.com/hikhvar/mqtt2prometheus\n\nbuildGoModule rec"
  }
]

// ... and 202 more files (download for full content)

About this extraction

This page contains the full source code of the pinpox/nixos GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 402 files (758.3 KB), approximately 240.3k tokens, and a symbol index with 25 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!