clean up & hyprland experiments
- Cleaned up docs - removed hyprglass - added various ways to do scroll view
This commit is contained in:
1 parent
c304803fda
commit
3c86efa4ff
23 files changed
+443
-212
No files matched your search
+1
-1
@@ -16,7 +16,7 @@ modules/
|
||||
├── home/ # Home Manager: shell, programs, git, fonts, services
|
||||
├── nixos/
|
||||
│ ├── common/ # Core system settings, networking, SSH, QEMU, fonts, hardware
|
||||
│ ├── server/ # Server services: K3s, Gitea, AI stack, DNS, Dockge, ARRs...
|
||||
│ ├── server/ # Server services: K3s/K8s, DNS, AI stack, ARRs, media…
|
||||
│ └── desktop/ # Desktop: tiler (niri/hyprland), packages, theming, crypto
|
||||
└── openwrt/ # OpenWrt router config generator
|
||||
```
|
||||
|
||||
@@ -16,10 +16,13 @@ core/
|
||||
|
||||
## What lives here
|
||||
|
||||
- **Overlays** (`default.nix`): exposes `pkgs.grok-cli` (from `pkgs/grok-cli`), `pkgs.buzz-desktop` (from `pkgs/buzz-desktop`), and patches
|
||||
- **Overlays** (`default.nix`): exposes the `pkgs/` packages — `grok-cli`, `ds4`
|
||||
(+`ds4-rocm`/`ds4-cuda`), `colibri` (+`colibri-rocm`), `niri-touchscreen-gestures`,
|
||||
`buzz-desktop`, `ollama` (+`ollama-rocm`/`ollama-vulkan`) — and patches
|
||||
`python3Packages.pipx` to skip its flaky install check on nixpkgs 26.05.
|
||||
- **Distributed builds** (`default.nix`): registers `bigbox1.lab.internal` as a remote
|
||||
`x86_64-linux` build machine and enables `builders-use-substitutes`.
|
||||
- **Distributed builds** (`default.nix`): registers `bigbox1.lab.internal` and
|
||||
`fwdesk.lab.internal` as remote `x86_64-linux` build machines and enables
|
||||
`builders-use-substitutes`.
|
||||
- **User** (`user.nix`): defines `skyg.user.{name,fullName,email}` plus
|
||||
`skyg.home-manager.{version,extraImports}`. When `skyg.user.enable` is set it wires up
|
||||
Home Manager for both `root` and the named user using the functions in `modules/home`.
|
||||
|
||||
@@ -14,6 +14,7 @@ common/
|
||||
├── user.nix # skyg.user.createSystemUser — creates the system user/groups + zsh shell
|
||||
├── fonts.nix # System font packages + fontconfig defaults (Fira Code, Noto, …)
|
||||
├── ssh-server.nix # skyg.nixos.common.ssh-server — hardened sshd + master pubkey
|
||||
├── ssh-notify.nix # skyg.nixos.common.ssh-notify — forward notify-send from SSH sessions to a desktop client
|
||||
├── qemu.nix # skyg.core.qemu — QEMU/quickemu + SPICE guest tooling
|
||||
├── containers/ # Docker vs Podman runtime selection
|
||||
├── hardware/ # GPU, fan control, audio, laptop power, Coral TPU udev
|
||||
@@ -39,6 +40,7 @@ skyg.core.hostName → networking.nix
|
||||
skyg.user.createSystemUser → user.nix
|
||||
skyg.core.qemu.* → qemu.nix
|
||||
skyg.nixos.common.ssh-server.* → ssh-server.nix
|
||||
skyg.nixos.common.ssh-notify.* → ssh-notify.nix
|
||||
skyg.nixos.common.containers.* → containers/
|
||||
skyg.nixos.common.hardware.* → hardware/
|
||||
skyg.nixos.common.pritunl.* → pritunl/
|
||||
|
||||
@@ -12,6 +12,7 @@ tiler/
|
||||
├── niri.nix # skyg.nixos.desktop.tiler.niri — niri compositor (sets tiler.enable)
|
||||
├── niri-touchscreen-gestures.nix # skyg.nixos.desktop.tiler.niri.touchscreen-gestures — touchscreen swipe support
|
||||
├── hyprland.nix # skyg.nixos.desktop.tiler.hyprland — Hyprland via flake (sets tiler.enable)
|
||||
├── noctalia.nix # skyg.nixos.desktop.tiler.noctalia — noctalia shell + per-host config symlink
|
||||
└── swww.nix # skyg.nixos.desktop.tiler.background — swww/waypaper wallpaper tools
|
||||
```
|
||||
|
||||
@@ -34,6 +35,8 @@ skyg.nixos.desktop.tiler.niri.enable
|
||||
skyg.nixos.desktop.tiler.niri.touchscreen-gestures.enable # 3/4-finger swipes → niri actions
|
||||
skyg.nixos.desktop.tiler.hyprland.enable
|
||||
skyg.nixos.desktop.tiler.hyprland.configName # per-host config dir (default: hostName)
|
||||
skyg.nixos.desktop.tiler.noctalia.enable # standalone noctalia + config symlink
|
||||
skyg.nixos.desktop.tiler.noctalia.configName # per-host config dir (default: hostName)
|
||||
skyg.nixos.desktop.tiler.background.enable
|
||||
```
|
||||
|
||||
@@ -43,7 +46,12 @@ skyg.nixos.desktop.tiler.background.enable
|
||||
`xdg-desktop-portal-hyprland` kept in sync), launched via UWSM. It:
|
||||
|
||||
- Installs the noctalia shell and autostart-friendly tools (grim/slurp/satty,
|
||||
wofi/rofi, hypridle). There is no waybar/hyprpanel — the shell is noctalia.
|
||||
wofi/rofi, hypridle, wl-clipboard). There is no waybar/hyprpanel — the shell is noctalia.
|
||||
- Hyprland plugins (=scrolloverview overview): the packages are
|
||||
installed and their `.so` paths exported as session variables (`SCROLLOVERVIEW_SO`);
|
||||
`scrolloverview.lua` call `hl.plugin.load` on them. The store path changes on every
|
||||
flake update, so it can't be hardcoded in the config. The active plugin is toggled
|
||||
by the `*_SO` line here plus the matching `require()` in `hyprland.lua`.
|
||||
- Symlinks `~/.config/hypr` -> `configs/<configName>/hypr`, where `configName`
|
||||
defaults to `config.skyg.core.hostName` (so `fwbook` -> `configs/fwbook/hypr`).
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
, pkgs
|
||||
, skygUtils
|
||||
, hyprland
|
||||
, hyprgrass
|
||||
, scrolloverview
|
||||
, noctalia
|
||||
, ...
|
||||
}:
|
||||
@@ -56,16 +56,11 @@ in
|
||||
grim
|
||||
slurp
|
||||
satty
|
||||
hyprgrass.packages.${system}.hyprgrass
|
||||
scrolloverview.packages.${system}.scrolloverview
|
||||
];
|
||||
|
||||
# Resolved store path for the hyprgrass plugin .so, read by
|
||||
# configs/fwbook/hypr/conf/hyprgrass.lua via os.getenv to call
|
||||
# hl.plugin.load(...). Adding the package to systemPackages above only
|
||||
# puts the file on disk -- Hyprland needs an explicit load call, and the
|
||||
# store path changes on every flake update so it can't be hardcoded there.
|
||||
environment.sessionVariables.HYPRGRASS_SO =
|
||||
"${hyprgrass.packages.${system}.hyprgrass}/lib/libhyprgrass.so";
|
||||
# Resolved store path for the scrolloverview plugin
|
||||
environment.sessionVariables.SCROLLOVERVIEW_SO =
|
||||
"${scrolloverview.packages.${system}.scrolloverview}/lib/libscrolloverview.so";
|
||||
|
||||
# Symlink ~/.config/hypr -> configs/<configName>/hypr (host-specific).
|
||||
system.userActivationScripts.hyprlandConfig.text = skygUtils.makeHyperlinkScriptToConfigs {
|
||||
|
||||
@@ -16,14 +16,14 @@ server/
|
||||
├── dns/ # Local DNS resolver, certbot, local CA
|
||||
├── k3s/ # Single-binary K3s cluster role
|
||||
├── k8s/ # Full upstream Kubernetes (master/node)
|
||||
└── services/ # Self-hosted apps (jellyfin, audiobookshelf, comfyui, scrypted, dockge, ai…)
|
||||
└── services/ # Self-hosted apps (jellyfin, audiobookshelf, comfyui, ds4, colibri, ai…)
|
||||
```
|
||||
|
||||
## Notable details
|
||||
|
||||
- **`timers.nix`** is a reusable helper: anything added to `skyg.server.timers.<name>`
|
||||
(with `script`, `OnCalendar`, `wantedBy`) becomes a systemd timer + oneshot service. Other
|
||||
modules (e.g. `services/scrypted.nix`) use it for backups/auto-updates.
|
||||
(with `script`, `OnCalendar`, `wantedBy`) becomes a systemd timer + oneshot service. Host
|
||||
files (e.g. `hosts/hl-minipc2.nix`'s scrypted-backups) use it for backups/auto-updates.
|
||||
- **`exporters.nix`** enables the Prometheus node exporter with the systemd collector and
|
||||
opens port 9100.
|
||||
- Naming: this tree mostly uses the legacy `skyg.server.*` prefix for cross-cutting modules
|
||||
|
||||
@@ -45,16 +45,12 @@ Then add it to `services/default.nix`'s `imports` list (and to the `services/ABO
|
||||
6. **Scheduled jobs** (backups, auto-updates) should use the `skyg.server.timers.<name>`
|
||||
helper in `timers.nix` rather than hand-writing `systemd.timers`/`systemd.services`.
|
||||
7. **Secrets** (tokens, API keys, join tokens) come from **agenix** (`config.age.secrets.*`)
|
||||
or an `environmentFile` path — never hardcoded, never committed. See `openclaw.nix` for
|
||||
the agenix-token pattern and `k3s/`/`dns/routing/` for `envPath`/secret-file patterns.
|
||||
or an `environmentFile` path — never hardcoded, never committed. See `colibri.nix`/
|
||||
`signal-cli.nix` for the `environmentFile` (agenix) pattern and `k3s/`/`dns/routing/`
|
||||
for `envPath`/secret-file patterns.
|
||||
8. **Stable identities.** Where a service stores data on NFS, keep its `uid`/`gid` fixed and
|
||||
unique (see `arrs/` and `jellyfin.nix`) so ownership survives across hosts.
|
||||
|
||||
## Gotcha: openclaw.nix
|
||||
|
||||
`openclaw.nix` is **not** imported by `services/default.nix`. If you enable it, import it
|
||||
explicitly. Don't assume every file in `services/` is wired in.
|
||||
|
||||
## Validation
|
||||
|
||||
Do **not** build or switch (see root `GUIDELINES.md`). Use `nix-instantiate --parse` on the
|
||||
|
||||
@@ -12,9 +12,9 @@ services/
|
||||
├── default.nix # imports the services below
|
||||
├── ai-services.nix # skyg.nixos.server.services.ai — ollama + Wyoming (whisper/piper/wake)
|
||||
├── audiobookshelf.nix # skyg.nixos.server.services.audiobookshelf — audiobook/podcast server
|
||||
├── ds4.nix # skyg.nixos.server.services.ds4 — ds4-server HTTP API (DwarfStar local inference)
|
||||
├── jellyfin.nix # skyg.nixos.server.services.jellyfin — media server (uid/gid 7777)
|
||||
├── signal-cli.nix # skyg.nixos.server.services.signal-cli — signal-cli HTTP daemon (Hermes Signal bridge)
|
||||
├── openclaw.nix # skyg.nixos.server.services.openclaw — AI gateway (NOT imported by default)
|
||||
├── colibri.nix # skyg.nixos.server.services.colibri — coli serve HTTP API (GLM-5.2/OLMoE local inference)
|
||||
└── comfyui/ # skyg.nixos.server.services.comfyui — ComfyUI with ROCm/CUDA GPU support
|
||||
```
|
||||
@@ -23,9 +23,10 @@ services/
|
||||
|
||||
- **`ai-services.nix`** runs ollama (GPU-passthrough) and openwakeword as containers and
|
||||
enables NixOS-native Wyoming faster-whisper + piper. Opens 11434/10200/10300/10400.
|
||||
- **`openclaw.nix`** is a native systemd service (with agenix-token support and security
|
||||
hardening). Note: it is **not** listed in `default.nix`'s imports, so it must be imported
|
||||
explicitly if used.
|
||||
- **`ds4.nix`** runs `ds4-server` (the OpenAI/Anthropic-compatible HTTP API for DwarfStar
|
||||
DeepSeek V4 inference) as a native systemd service. `package` selects the backend
|
||||
(`pkgs.ds4` cpu / `pkgs.ds4-rocm` / `pkgs.ds4-cuda`); model path, ctx, KV offload, and
|
||||
GPU device IDs are all options.
|
||||
- **`colibri.nix`** runs `coli serve` (colibrì's OpenAI-compatible API) as a native systemd
|
||||
service, mirroring `services/ds4.nix`'s shape. `package` picks the backend (`pkgs.colibri`
|
||||
cpu / `pkgs.colibri-rocm`); `environmentFile` supplies `COLI_API_KEY` via agenix instead of
|
||||
@@ -36,10 +37,9 @@ services/
|
||||
```
|
||||
skyg.nixos.server.services.ai.enable
|
||||
skyg.nixos.server.services.audiobookshelf.{enable,package,configDir,dataDir}
|
||||
skyg.nixos.server.services.ds4.{enable,package,model,host,port,ctx,kvDiskDir,...}
|
||||
skyg.nixos.server.services.jellyfin.enable
|
||||
skyg.nixos.server.services.scrypted.enable
|
||||
skyg.nixos.server.services.signal-cli.{enable,host,port,configDir,account,environmentFile,openFirewall}
|
||||
skyg.nixos.server.services.openclaw.{enable,port,gatewayToken,...}
|
||||
skyg.nixos.server.services.colibri.{enable,package,model,host,port,environmentFile,openFirewall,...}
|
||||
skyg.nixos.server.services.comfyui.{enable,mode,port,openFirewall}
|
||||
```
|
||||
|
||||
Reference in new issue
Block a user