Compare commits
31 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ae6c81bf54 | |||
| f01b1f2c4f | |||
| ff34fe762e | |||
| 7e4407a1f8 | |||
| 539fb26791 | |||
| 003a2f77dd | |||
| 86e7f9c1a8 | |||
| adb7fcfad7 | |||
| 5235f5abcb | |||
| f53f2331d0 | |||
| 84cec9e935 | |||
| 79b26ddfda | |||
| b8961fb47d | |||
| 4851f745d8 | |||
| 59b5cfb47c | |||
| a8364f21ca | |||
| f135c1646f | |||
| 7a1b0541c2 | |||
| 6c5f61997d | |||
| 763253693c | |||
| b6f4bb7955 | |||
| 74d65a0d75 | |||
| 85bd12778a | |||
| d9565448b9 | |||
| af2655f9e2 | |||
| 6d0684610e | |||
| 17c3a3189f | |||
| 18d1ce711d | |||
| cbdb42f333 | |||
| b44775e3e5 | |||
| 1444912326 |
@@ -0,0 +1,92 @@
|
|||||||
|
# CLAUDE.md
|
||||||
|
|
||||||
|
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||||
|
|
||||||
|
## Commands
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Apply configuration (switch/boot/test)
|
||||||
|
sudo nixos-rebuild switch --flake '.#jupiter'
|
||||||
|
sudo nixos-rebuild switch --flake '.#mibook'
|
||||||
|
|
||||||
|
# Build without switching (CI-style check)
|
||||||
|
nix build '.#nixosConfigurations.jupiter.config.system.build.toplevel'
|
||||||
|
|
||||||
|
# Update all flake inputs
|
||||||
|
nix flake update
|
||||||
|
|
||||||
|
# Format Nix files
|
||||||
|
nixfmt-rfc-style <file> # or: find . -name '*.nix' | xargs nixfmt-rfc-style
|
||||||
|
```
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
|
||||||
|
This is a flake-parts NixOS configuration for two machines:
|
||||||
|
|
||||||
|
- **jupiter** — home server running media/automation services
|
||||||
|
- **mibook** — laptop running KDE desktop + development tools
|
||||||
|
|
||||||
|
### Module Loading Chain
|
||||||
|
|
||||||
|
```
|
||||||
|
flake.nix
|
||||||
|
└── machines/configuration.nix # flake-parts module; defines nixosConfigurations
|
||||||
|
├── machines/core/ # base modules applied to every machine
|
||||||
|
│ ├── core.nix # system packages, locale, timezone
|
||||||
|
│ ├── network.nix
|
||||||
|
│ ├── nix.nix
|
||||||
|
│ └── users.nix
|
||||||
|
├── modules/ # custom NixOS option modules (my.profiles.*, my.hardware.*, my.services.*)
|
||||||
|
│ ├── environments/ # per-service/app profiles
|
||||||
|
│ ├── hardware/ # hardware profiles (nvidia, bluetooth, sound, wifi)
|
||||||
|
│ └── services/ # infrastructure services (vpn, webserver)
|
||||||
|
└── machines/<name>/
|
||||||
|
├── configuration.nix # machine-specific NixOS settings
|
||||||
|
├── environments.nix # enables profiles via my.profiles.* / my.hardware.* options
|
||||||
|
├── disks.nix
|
||||||
|
└── hardware-configuration.nix
|
||||||
|
```
|
||||||
|
|
||||||
|
### Profile / Module Pattern
|
||||||
|
|
||||||
|
Every module under `modules/` follows the same structure:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let cfg = config.my.profiles.<name>; in
|
||||||
|
{
|
||||||
|
options.my.profiles.<name>.enable = lib.mkEnableOption "...";
|
||||||
|
config = lib.mkIf cfg.enable { ... };
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Namespaces in use:
|
||||||
|
- `my.profiles.*` — application/service profiles
|
||||||
|
- `my.hardware.*` — hardware profiles
|
||||||
|
- `my.services.*` — infrastructure services
|
||||||
|
|
||||||
|
Profiles are enabled per-machine in `machines/<name>/environments.nix`.
|
||||||
|
|
||||||
|
### Unstable Packages
|
||||||
|
|
||||||
|
`pkgs.unstable` is available everywhere via an overlay defined in `machines/configuration.nix`. Use it when a package isn't in the pinned stable channel (`nixpkgs/nixos-25.11`).
|
||||||
|
|
||||||
|
### Homepage Dashboard Integration
|
||||||
|
|
||||||
|
Modules that expose a web UI can self-register with the homepage dashboard by adding to `my.homepage.services`:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
my.homepage.services = [{
|
||||||
|
group = "Services";
|
||||||
|
name = "My Service";
|
||||||
|
description = "...";
|
||||||
|
href = "http://${hostName}:PORT";
|
||||||
|
icon = "si-iconname"; # optional
|
||||||
|
}];
|
||||||
|
```
|
||||||
|
|
||||||
|
### Adding a New Service Module
|
||||||
|
|
||||||
|
1. Create `modules/environments/<name>/default.nix` following the profile pattern above.
|
||||||
|
2. Add `./environments/<name>` to `modules/environments/default.nix` (or the relevant `default.nix`).
|
||||||
|
3. Enable it in the target machine's `machines/<name>/environments.nix`.
|
||||||
@@ -0,0 +1,154 @@
|
|||||||
|
# Jellyfin Hardware Transcoding (jupiter) Implementation Plan
|
||||||
|
|
||||||
|
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
||||||
|
|
||||||
|
**Goal:** Give jupiter's Jellyfin service access to the Intel iGPU's VAAPI render node so Quick Sync hardware transcoding can be enabled, instead of every transcode falling back to CPU.
|
||||||
|
|
||||||
|
**Architecture:** One NixOS module change (`modules/environments/jellyfin/default.nix`) grants the `jellyfin` systemd service supplementary access to the `video`/`render` groups and installs `libva-utils` for verification. This is declarative and build-verifiable from the Mac. Enabling Quick Sync inside Jellyfin's own dashboard, and the on-machine verification, is a manual step run by the user on jupiter after deploy — the NixOS module has no option for it and this environment's convention is that the assistant never SSHes into jupiter directly (see `docs/superpowers/specs/2026-07-26-jellyfin-hw-transcoding.md`).
|
||||||
|
|
||||||
|
**Tech Stack:** NixOS (flake-parts), nixpkgs `services.jellyfin` module, VAAPI/`intel-media-driver`, `libva-utils`.
|
||||||
|
|
||||||
|
## Global Constraints
|
||||||
|
|
||||||
|
- No SSH from the assistant into jupiter — all on-machine commands are given to the user to run and paste back.
|
||||||
|
- Follow the existing profile pattern in `modules/environments/jellyfin/default.nix` (`config = lib.mkIf cfg.enable { ... }`); don't introduce a new toggle option — hardcode the hardware-acceleration wiring on, per the approved spec.
|
||||||
|
- Verify locally via `nix eval` / `nix build` before asking the user to deploy.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Task 1: Grant Jellyfin access to the iGPU and verify the build
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: `modules/environments/jellyfin/default.nix`
|
||||||
|
|
||||||
|
**Interfaces:**
|
||||||
|
- Produces: `systemd.services.jellyfin.serviceConfig.SupplementaryGroups = [ "video" "render" ];` — verified via `nix eval` in Step 2.
|
||||||
|
|
||||||
|
- [ ] **Step 1: Add the device-access config and `libva-utils` package**
|
||||||
|
|
||||||
|
Read the current file first (`modules/environments/jellyfin/default.nix`), then edit the `config = lib.mkIf cfg.enable { ... }` block so it reads:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.jellyfin = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = [ pkgs.libva-utils ];
|
||||||
|
|
||||||
|
my.homepage.services = [
|
||||||
|
{
|
||||||
|
group = "Media";
|
||||||
|
name = "Jellyfin";
|
||||||
|
description = "Media server";
|
||||||
|
href = "http://${hostName}:${toString port}";
|
||||||
|
icon = "jellyfin.png";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
systemd.services.jellyfin = {
|
||||||
|
after = [ "network-online.target" ];
|
||||||
|
serviceConfig.SupplementaryGroups = [
|
||||||
|
"video"
|
||||||
|
"render"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
Note the two existing `systemd.services.jellyfin` keys (`after`) and the new `serviceConfig.SupplementaryGroups` now live in the same attrset — don't create a second `systemd.services.jellyfin = { ... }` block, it would overwrite the first.
|
||||||
|
|
||||||
|
- [ ] **Step 2: Verify the rendered config with `nix eval`**
|
||||||
|
|
||||||
|
Run (from the repo root on the Mac):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nix eval '.#nixosConfigurations.jupiter.config.systemd.services.jellyfin.serviceConfig.SupplementaryGroups' \
|
||||||
|
--extra-experimental-features 'nix-command flakes'
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected output: `[ "video" "render" ]`
|
||||||
|
|
||||||
|
- [ ] **Step 3: Verify the machine still builds**
|
||||||
|
|
||||||
|
Run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nix build '.#nixosConfigurations.jupiter.config.system.build.toplevel' \
|
||||||
|
--extra-experimental-features 'nix-command flakes' --no-link
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected: build succeeds with no errors (may take a while; watch for any evaluation error mentioning `jellyfin` or `libva-utils`).
|
||||||
|
|
||||||
|
- [ ] **Step 4: Format and commit**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nixfmt-rfc-style modules/environments/jellyfin/default.nix
|
||||||
|
git add modules/environments/jellyfin/default.nix
|
||||||
|
git commit -m "feat(jellyfin): grant iGPU access for Quick Sync hardware transcoding"
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Task 2: Deploy on jupiter and enable Quick Sync (user-executed)
|
||||||
|
|
||||||
|
**Files:** none (on-machine deploy + Jellyfin dashboard UI)
|
||||||
|
|
||||||
|
**Interfaces:**
|
||||||
|
- Consumes: the `SupplementaryGroups` change from Task 1, already merged into the flake.
|
||||||
|
|
||||||
|
These steps run **on jupiter**, by the user — paste the output back so we can confirm each one before moving to the next.
|
||||||
|
|
||||||
|
- [ ] **Step 1: Deploy**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo nixos-rebuild switch --flake '.#jupiter'
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected: switch succeeds, no errors mentioning `jellyfin`.
|
||||||
|
|
||||||
|
- [ ] **Step 2: Confirm the service picked up the new groups**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
systemctl show jellyfin -p SupplementaryGroups
|
||||||
|
systemctl status jellyfin --no-pager
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected: `SupplementaryGroups=video render` (order may vary) and the service is `active (running)`.
|
||||||
|
|
||||||
|
- [ ] **Step 3: Confirm VAAPI driver loads**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
vainfo
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected: output starts with something like `vainfo: VA-API version: 1.x` and `Driver version: Intel iHD driver`, followed by a list of supported VAProfiles/VAEntrypoints (e.g. `VAProfileH264Main : VAEntrypointVLD`, `VAEntrypointEncSlice`).
|
||||||
|
|
||||||
|
If this instead prints a permissions or "no VA display" error, paste it back — that means the group grant isn't reaching the process and Task 1 needs a follow-up fix (e.g. the jellyfin service may be more sandboxed than expected, requiring an explicit `DeviceAllow=char-drm rw` in `serviceConfig` as well).
|
||||||
|
|
||||||
|
- [ ] **Step 4: Enable Quick Sync in the Jellyfin dashboard**
|
||||||
|
|
||||||
|
In the Jellyfin web UI:
|
||||||
|
1. **Dashboard → Playback**.
|
||||||
|
2. Hardware acceleration: **Intel QuickSync (QSV)**.
|
||||||
|
3. VA-API device: `/dev/dri/renderD128`.
|
||||||
|
4. Enable hardware decoding for the codecs your library uses (H264 at minimum).
|
||||||
|
5. If the library has HDR content, enable tone-mapping.
|
||||||
|
6. Save.
|
||||||
|
|
||||||
|
- [ ] **Step 5: Functional check**
|
||||||
|
|
||||||
|
Play a file that requires transcoding (or force a lower quality in the client's playback settings to trigger one), then:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
journalctl -u jellyfin -n 50 --no-pager
|
||||||
|
```
|
||||||
|
|
||||||
|
Look for a line referencing `qsv` or `vaapi` in the transcode command. Separately, watch CPU usage (`htop`) during playback — it should stay low on the core doing the transcode, rather than pegging at 100%, since the iGPU is now doing the encode/decode work.
|
||||||
|
|
||||||
|
## Self-Review Notes
|
||||||
|
|
||||||
|
- Spec coverage: NixOS change (Task 1) ✓, manual dashboard step (Task 2 Step 4) ✓, verification via `vainfo`/build (Task 1 Step 2-3, Task 2 Step 3) ✓, functional check (Task 2 Step 5) ✓. Toggle option explicitly excluded per approved spec — not present, correctly.
|
||||||
|
- No placeholders — every step has literal commands/code.
|
||||||
|
- `SupplementaryGroups` key/value matches exactly between Task 1 (produced) and Task 2 (consumed/checked).
|
||||||
@@ -0,0 +1,145 @@
|
|||||||
|
# Intel Quick Sync hardware transcoding for Jellyfin on jupiter
|
||||||
|
|
||||||
|
## Problem
|
||||||
|
|
||||||
|
Jellyfin streams stutter on jupiter whenever a client needs a transcode
|
||||||
|
(unsupported codec/container, bitrate cap, or a client that can't
|
||||||
|
direct-play). Transcoding currently runs entirely on CPU.
|
||||||
|
|
||||||
|
jupiter's Intel iGPU is already usable at the OS level:
|
||||||
|
|
||||||
|
- `hardware.graphics.enable = true` with `intel-media-driver` (the `iHD`
|
||||||
|
VAAPI driver) is configured in
|
||||||
|
`machines/jupiter/hardware-configuration.nix:20-27`.
|
||||||
|
- The commented-out `i915.force_probe = "9a49"` kernel param there
|
||||||
|
corresponds to a Quick-Sync-capable Intel UHD iGPU, confirming the
|
||||||
|
hardware supports it.
|
||||||
|
|
||||||
|
But `modules/environments/jellyfin/default.nix` never grants the
|
||||||
|
`jellyfin` systemd service access to `/dev/dri`, so Jellyfin has no path
|
||||||
|
to the GPU and silently falls back to software transcoding.
|
||||||
|
|
||||||
|
## Goal
|
||||||
|
|
||||||
|
Give the Jellyfin service access to the iGPU's VAAPI render node, so
|
||||||
|
Quick Sync can be enabled in Jellyfin's own dashboard and transcodes are
|
||||||
|
offloaded from the CPU.
|
||||||
|
|
||||||
|
## Non-goals
|
||||||
|
|
||||||
|
- Remote/external access or reverse-proxy tuning.
|
||||||
|
- General CPU/RAM headroom review of jupiter.
|
||||||
|
- A toggle option (`my.profiles.jellyfin.hardwareAcceleration.enable`) —
|
||||||
|
jupiter only has the one iGPU, so this is hardcoded on rather than
|
||||||
|
made configurable.
|
||||||
|
|
||||||
|
## Design
|
||||||
|
|
||||||
|
### NixOS change (declarative)
|
||||||
|
|
||||||
|
In `modules/environments/jellyfin/default.nix`, inside the existing
|
||||||
|
`config = lib.mkIf cfg.enable { ... }` block, grant the systemd service
|
||||||
|
supplementary access to the `video` and `render` groups (the groups that
|
||||||
|
own `/dev/dri/card*` and `/dev/dri/renderD*`):
|
||||||
|
|
||||||
|
```nix
|
||||||
|
systemd.services.jellyfin.serviceConfig.SupplementaryGroups = [
|
||||||
|
"video"
|
||||||
|
"render"
|
||||||
|
];
|
||||||
|
```
|
||||||
|
|
||||||
|
This is additive to the existing `systemd.services.jellyfin.after = [
|
||||||
|
"network-online.target" ];` block already in the file — both apply to
|
||||||
|
the same service.
|
||||||
|
|
||||||
|
Also add `libva-utils` to `environment.systemPackages` (or scoped to
|
||||||
|
this module) so `vainfo` is available on jupiter to verify the driver
|
||||||
|
loads correctly.
|
||||||
|
|
||||||
|
### Manual step (not declarative)
|
||||||
|
|
||||||
|
Jellyfin stores its transcoding/hardware-acceleration choice in its own
|
||||||
|
internal `encoding.xml`, which the NixOS module does not expose as an
|
||||||
|
option. After deploying the Nix change, one-time manual configuration in
|
||||||
|
the Jellyfin dashboard is required:
|
||||||
|
|
||||||
|
1. **Dashboard → Playback**.
|
||||||
|
2. Hardware acceleration: **Intel QuickSync (QSV)**.
|
||||||
|
3. VA-API device: `/dev/dri/renderD128`.
|
||||||
|
4. Enable hardware decoding for the codecs your library actually uses
|
||||||
|
(H264 at minimum; HEVC/VP9 depending on iGPU generation).
|
||||||
|
5. If any HDR content exists in the library, enable tone-mapping — this
|
||||||
|
is one of the more CPU-expensive operations Quick Sync can offload.
|
||||||
|
|
||||||
|
## Verification
|
||||||
|
|
||||||
|
Build-time (from the Mac, no SSH needed):
|
||||||
|
|
||||||
|
```
|
||||||
|
nix eval '.#nixosConfigurations.jupiter.config.systemd.services.jellyfin.serviceConfig.SupplementaryGroups' \
|
||||||
|
--extra-experimental-features 'nix-command flakes'
|
||||||
|
```
|
||||||
|
|
||||||
|
Expect `[ "video" "render" ]`.
|
||||||
|
|
||||||
|
On jupiter after `sudo nixos-rebuild switch --flake '.#jupiter'`:
|
||||||
|
|
||||||
|
```
|
||||||
|
systemctl status jellyfin
|
||||||
|
journalctl -u jellyfin -n 50 --no-pager
|
||||||
|
vainfo
|
||||||
|
```
|
||||||
|
|
||||||
|
`vainfo` should list the `iHD` driver and print supported VAEntrypoints
|
||||||
|
(VLD decode / encode profiles for H264/HEVC).
|
||||||
|
|
||||||
|
Functional check: play a file on a client that forces transcoding (or
|
||||||
|
force it manually via Jellyfin's playback quality setting), then in
|
||||||
|
Jellyfin's dashboard **Activity/Now Playing** panel confirm the
|
||||||
|
transcode reason and check that CPU usage on jupiter (`htop`) stays low
|
||||||
|
during playback rather than pegging a core — Quick Sync offload should
|
||||||
|
show up as low CPU, some GPU (`intel_gpu_top`) activity instead.
|
||||||
|
|
||||||
|
## Open items
|
||||||
|
|
||||||
|
- Exact supported codec list depends on the iGPU generation (device ID
|
||||||
|
`9a49`) — confirm via `vainfo` output once run, and enable only the
|
||||||
|
hardware decode paths it actually reports.
|
||||||
|
|
||||||
|
## Post-deploy fix: two additional runtime packages required
|
||||||
|
|
||||||
|
After the initial deploy (Task 1's `SupplementaryGroups` grant) and
|
||||||
|
enabling QSV in the dashboard, HEVC HDR playback hung indefinitely
|
||||||
|
(Direct Play worked for some titles; titles that needed a real
|
||||||
|
transcode+tonemap never produced output). Root-caused via
|
||||||
|
`journalctl -u jellyfin` and the per-session ffmpeg transcode log
|
||||||
|
(`find / -xdev -iname '*ffmpeg-transcode*'`) — two separate runtimes
|
||||||
|
were missing beyond `intel-media-driver` (which only provides VAAPI):
|
||||||
|
|
||||||
|
1. **QSV session creation failed:** `Error creating a MFX session: -9`
|
||||||
|
/ `Error initializing an MFX session: -3` on
|
||||||
|
`-init_hw_device qsv=qs@va`. VAAPI and QSV are separate runtimes on
|
||||||
|
Linux — QSV needs the oneVPL/MFX GPU implementation. Fix: added
|
||||||
|
`pkgs.vpl-gpu-rt` ("oneAPI Video Processing Library Intel GPU
|
||||||
|
implementation"; note `onevpl-intel-gpu` is the old, renamed
|
||||||
|
attribute) to `hardware.graphics.extraPackages` in
|
||||||
|
`machines/jupiter/hardware-configuration.nix`.
|
||||||
|
|
||||||
|
2. **OpenCL device creation failed:** `Failed to get number of OpenCL
|
||||||
|
platforms: -1001` (`CL_PLATFORM_NOT_FOUND_KHR`) on
|
||||||
|
`-init_hw_device opencl=ocl@va`. The `tonemap_opencl` filter jellyfin
|
||||||
|
uses for HDR→SDR tone-mapping needs a working OpenCL ICD, which
|
||||||
|
nothing installed so far provides. Fix: added
|
||||||
|
`pkgs.intel-compute-runtime` ("Intel Graphics Compute Runtime oneAPI
|
||||||
|
Level Zero and OpenCL, supporting 12th Gen and newer" — matches
|
||||||
|
jupiter's Tiger Lake/Xe iGPU) to the same `extraPackages` list.
|
||||||
|
|
||||||
|
Confirmed working end-to-end: HEVC HDR transcode with QSV encode +
|
||||||
|
OpenCL tone-map runs at `speed=2.68x` realtime on jupiter's iGPU, and
|
||||||
|
plays smoothly on Apple TV (JellyTV app).
|
||||||
|
|
||||||
|
Both packages live in `machines/jupiter/hardware-configuration.nix`
|
||||||
|
(`hardware.graphics.extraPackages`), alongside `intel-media-driver`,
|
||||||
|
rather than in the jellyfin module itself — they're iGPU runtime
|
||||||
|
capabilities, not something specific to the jellyfin service.
|
||||||
@@ -0,0 +1,105 @@
|
|||||||
|
# mibook: choose terminal-only vs desktop at boot
|
||||||
|
|
||||||
|
## Goal
|
||||||
|
|
||||||
|
Let mibook offer a choice, each time it boots, between the normal KDE desktop
|
||||||
|
and a terminal-only ("server") mode with no graphical session — decided at
|
||||||
|
boot, without rebuilding the system.
|
||||||
|
|
||||||
|
## Background: why the first attempt failed
|
||||||
|
|
||||||
|
The first implementation booted mibook to a text console by default
|
||||||
|
(`systemd.defaultUnit = "multi-user.target"`, display manager not started) and
|
||||||
|
provided a `desktop` command to start KDE on demand. On real hardware this
|
||||||
|
locked the machine out:
|
||||||
|
|
||||||
|
- **No SSH.** mibook is WiFi-only and its WiFi credentials are stored per-user
|
||||||
|
in KWallet ("agent-owned"). NetworkManager only receives the password once a
|
||||||
|
desktop session is running, so a headless boot never joins the network and
|
||||||
|
the machine has no IP — nothing to SSH into.
|
||||||
|
- **No usable console.** The boot appeared to "hang" with no login prompt:
|
||||||
|
`NetworkManager-wait-online` stalled waiting for a network that never came
|
||||||
|
up, and the `getty` login prompt on tty1 was buried under later service
|
||||||
|
messages.
|
||||||
|
|
||||||
|
Conclusion: a headless WiFi laptop cannot be reached remotely, and the plain
|
||||||
|
console was hard to use. The design must (a) keep the desktop as the reliable
|
||||||
|
default, (b) make the terminal path a deliberate, self-sufficient choice, and
|
||||||
|
(c) not depend on the network being up.
|
||||||
|
|
||||||
|
## Behavior
|
||||||
|
|
||||||
|
- The **default GRUB entry** boots straight into KDE — unchanged from the
|
||||||
|
known-working baseline.
|
||||||
|
- A **separate GRUB entry, `mibook (terminal)`** (a NixOS *specialisation*),
|
||||||
|
boots to a text console with **autologin** for `finn`. From there the user
|
||||||
|
can work in the shell or run `desktop` to bring KDE up (via SDDM).
|
||||||
|
- The choice is made in the GRUB menu at boot — matching the original request
|
||||||
|
to "decide each time I boot."
|
||||||
|
- Booting never stalls on the network.
|
||||||
|
|
||||||
|
### Known limitation (documented, not fixed in config)
|
||||||
|
|
||||||
|
In terminal mode WiFi will not connect on its own, because the password is
|
||||||
|
stored per-user in KWallet. To reach mibook over SSH from terminal mode, the
|
||||||
|
user must first save the WiFi as a **system** connection in KDE:
|
||||||
|
network settings → the WiFi network → "All users may connect to this network".
|
||||||
|
Until then, terminal mode is local-console-only. This is a one-time manual
|
||||||
|
step outside the scope of the Nix config.
|
||||||
|
|
||||||
|
## Implementation
|
||||||
|
|
||||||
|
### `machines/mibook/configuration.nix`
|
||||||
|
|
||||||
|
- Add a NixOS specialisation `specialisation.terminal.configuration`:
|
||||||
|
- `system.nixos.tags = [ "terminal" ];` — labels the generated boot entry.
|
||||||
|
- `systemd.defaultUnit = lib.mkForce "multi-user.target";` — boots to the
|
||||||
|
text console. `graphical.target` is what pulls in the display manager (via
|
||||||
|
its embedded `Wants=display-manager.service`), so defaulting to
|
||||||
|
`multi-user.target` leaves SDDM installed but not started at boot.
|
||||||
|
- `services.getty.autologinUser = "finn";` — guarantees a usable shell on
|
||||||
|
the console instead of a login prompt that can scroll off screen.
|
||||||
|
- A `desktop` command via
|
||||||
|
`pkgs.writeShellScriptBin "desktop" "exec sudo systemctl start display-manager.service"`
|
||||||
|
in `environment.systemPackages`, to start KDE on demand.
|
||||||
|
- Add `systemd.services.NetworkManager-wait-online.enable = false;` (applies to
|
||||||
|
both the default and terminal boots) so boot never stalls waiting for the
|
||||||
|
network.
|
||||||
|
|
||||||
|
### Reverted from the first attempt
|
||||||
|
|
||||||
|
- `modules/environments/kde-desktop/default.nix` — remove the `startOnBoot`
|
||||||
|
option and its `mkMerge`/`mkIf` machinery; back to the original profile that
|
||||||
|
simply enables SDDM + Plasma 6.
|
||||||
|
- `machines/mibook/environments.nix` — remove `kde-desktop.startOnBoot = false;`
|
||||||
|
(back to just `kde-desktop.enable = true;`).
|
||||||
|
|
||||||
|
## Why a specialisation
|
||||||
|
|
||||||
|
A specialisation generates a second boot-menu entry automatically from a
|
||||||
|
modified copy of the configuration. It is the idiomatic NixOS mechanism for a
|
||||||
|
boot-time choice and avoids fragile hand-written GRUB `extraEntries` that would
|
||||||
|
need to track kernel/initrd paths across generations. The default entry remains
|
||||||
|
byte-for-byte the working desktop configuration.
|
||||||
|
|
||||||
|
## Testing / verification
|
||||||
|
|
||||||
|
- `nix build '.#nixosConfigurations.mibook.config.system.build.toplevel'`
|
||||||
|
builds both `nixos-system-mibook` and `nixos-system-mibook-terminal`.
|
||||||
|
- Verified on the built closures:
|
||||||
|
- Parent `default.target` → `graphical.target`; no console autologin
|
||||||
|
(identical to the pre-change baseline).
|
||||||
|
- Specialisation `default.target` → `multi-user.target`; tty1 getty wrapper
|
||||||
|
contains `--autologin finn`; `desktop` present in the system profile.
|
||||||
|
- `NetworkManager-wait-online` disabled in both.
|
||||||
|
- Post-`switch` manual check on mibook: default GRUB entry boots to KDE; the
|
||||||
|
`terminal` entry boots to an autologged-in console; running `desktop` there
|
||||||
|
starts SDDM and a working Plasma session.
|
||||||
|
|
||||||
|
## Trade-offs
|
||||||
|
|
||||||
|
- Autologin on the terminal console means physical access grants a shell
|
||||||
|
without a password. Acceptable for a personal laptop the user controls; the
|
||||||
|
desktop (default) boot is unaffected.
|
||||||
|
- `desktop` relies on `sudo`; the user has sudo access, so no extra config is
|
||||||
|
required.
|
||||||
Generated
+51
-40
@@ -21,11 +21,11 @@
|
|||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777988971,
|
"lastModified": 1782949081,
|
||||||
"narHash": "sha256-qIoWPDs+0/8JecyYgE3gpKQxW/4bLW/gp45vow9ioCQ=",
|
"narHash": "sha256-vp6Y/Grm98ESt6ceOkWiHWyZRDV3J1RID4w+6NWK9yA=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "0678d8986be1661af6bb555f3489f2fdfc31f6ff",
|
"rev": "17c9d6cdfc60c64f4ee8d306f9bc0b4ccb51481e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -42,11 +42,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1775087534,
|
"lastModified": 1782949081,
|
||||||
"narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=",
|
"narHash": "sha256-vp6Y/Grm98ESt6ceOkWiHWyZRDV3J1RID4w+6NWK9yA=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b",
|
"rev": "17c9d6cdfc60c64f4ee8d306f9bc0b4ccb51481e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -60,20 +60,17 @@
|
|||||||
"flake-compat": [
|
"flake-compat": [
|
||||||
"nix"
|
"nix"
|
||||||
],
|
],
|
||||||
"gitignore": [
|
|
||||||
"nix"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nix",
|
"nix",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1776796298,
|
"lastModified": 1783008725,
|
||||||
"narHash": "sha256-PcRvlWayisPSjd0UcRQbhG8Oqw78AcPE6x872cPRHN8=",
|
"narHash": "sha256-jGiy6+sxjNWXSjp25uoJuNfyH9zBK1PEDY0lVoL4ibQ=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "git-hooks.nix",
|
"repo": "git-hooks.nix",
|
||||||
"rev": "3cfd774b0a530725a077e17354fbdb87ea1c4aad",
|
"rev": "bca82caa46d5ec0f5d422c61fb1e30bc51313cbe",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -92,11 +89,11 @@
|
|||||||
"nixpkgs-regression": "nixpkgs-regression"
|
"nixpkgs-regression": "nixpkgs-regression"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1778249748,
|
"lastModified": 1784762557,
|
||||||
"narHash": "sha256-D+3kaW4NUUaiFTsEpmregtGZVniljBThg/O0JIjRL8k=",
|
"narHash": "sha256-R/r6jRnANV50c8F5Fz5+1Q1moab0IGWRk+cg5ME2nMY=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nix",
|
"repo": "nix",
|
||||||
"rev": "616df97974fd29b79f83502f63854d6d471ee055",
|
"rev": "d10c84cd0cc0efdcb29cf2611caf5fbcd10fa071",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -142,12 +139,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs_2"
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1778143761,
|
"lastModified": 1784723954,
|
||||||
"narHash": "sha256-lkesY6x2X2qxlqLM7CT2iM/0rP2JB7fruPN3h8POXmI=",
|
"narHash": "sha256-1CfD8ZUjCkTgjsneLZ/lxCHhgDfqxxE7/GX0MmsgiqA=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "3bcaa367d4c550d687a17ac792fd5cda214ee871",
|
"rev": "a017f5b72210026af5b3ac5949f08d94380a6fbd",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -158,15 +158,15 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1771903837,
|
"lastModified": 1783148766,
|
||||||
"narHash": "sha256-jEA8WggGKtMFeNeCKq3NK8cLEjJmG6/RLUElYYbBZ0E=",
|
"narHash": "sha256-H9+N+GFtsbVC8ZniHliChM7ndizxtqVZs6bnGOLM3WQ=",
|
||||||
"rev": "e764fc9a405871f1f6ca3d1394fb422e0a0c3951",
|
"rev": "a50de1b7d8a586adc18d2395c19de7d6058e6030",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://releases.nixos.org/nixos/25.11/nixos-25.11.6495.e764fc9a4058/nixexprs.tar.xz"
|
"url": "https://releases.nixos.org/nixos/26.05/nixos-26.05.4193.a50de1b7d8a5/nixexprs.tar.xz"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://channels.nixos.org/nixos-25.11/nixexprs.tar.xz"
|
"url": "https://channels.nixos.org/nixos-26.05/nixexprs.tar.xz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-23-11": {
|
"nixpkgs-23-11": {
|
||||||
@@ -187,11 +187,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
"nixpkgs-lib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777168982,
|
"lastModified": 1782614948,
|
||||||
"narHash": "sha256-GOkGPcboWE9BmGCRMLX3worL4EMnsnG8MyKmXNeYuhQ=",
|
"narHash": "sha256-ePjCwr1sNm9NYUqywL7QfK3JnlS015msC+eBu2zKlp8=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs.lib",
|
"repo": "nixpkgs.lib",
|
||||||
"rev": "f5901329dade4a6ea039af1433fb087bd9c1fe14",
|
"rev": "db3f255737b94216eb71cce308e2912cf6bc2d7c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -218,12 +218,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777954456,
|
"lastModified": 1784796856,
|
||||||
"narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=",
|
"narHash": "sha256-vwxWgF+Gj276WznzGb1LxGsK/39HaQwgQXiU3EkC844=",
|
||||||
"owner": "NixOS",
|
"rev": "e2587caef70cea85dd97d7daab492899902dbf5d",
|
||||||
"repo": "nixpkgs",
|
"type": "tarball",
|
||||||
"rev": "549bd84d6279f9852cae6225e372cc67fb91a4c1",
|
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1040357.e2587caef70c/nixexprs.tar.xz"
|
||||||
"type": "github"
|
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"id": "nixpkgs",
|
||||||
@@ -233,16 +232,28 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1778003029,
|
"lastModified": 1767892417,
|
||||||
"narHash": "sha256-q/nkKLDtHIyLjZpKhWk3cSK5IYsFqtMd6UtXF3ddjgA=",
|
"narHash": "sha256-8bW3q88CEg2u4hSP66Vf4lpbLonHz7hqDNBMcCY7E9U=",
|
||||||
"owner": "NixOS",
|
"rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba",
|
||||||
"repo": "nixpkgs",
|
"type": "tarball",
|
||||||
"rev": "0c88e1f2bdb93d5999019e99cb0e61e1fe2af4c5",
|
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre924538.3497aa5c9457/nixexprs.tar.xz"
|
||||||
"type": "github"
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1784707089,
|
||||||
|
"narHash": "sha256-DUedXhD2Rg8q4Xyd07Sb90eZGy4gg6W+Vl/WbLNwAZo=",
|
||||||
|
"rev": "b3fe9581c9061c749abef42b6d4ee7b7c05c33fa",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://releases.nixos.org/nixos/26.05/nixos-26.05.5845.b3fe9581c906/nixexprs.tar.xz"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"id": "nixpkgs",
|
||||||
"ref": "nixos-25.11",
|
"ref": "nixos-26.05",
|
||||||
"type": "indirect"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -252,7 +263,7 @@
|
|||||||
"nix": "nix",
|
"nix": "nix",
|
||||||
"nixos-generators": "nixos-generators",
|
"nixos-generators": "nixos-generators",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_3",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nix.url = "github:NixOS/nix";
|
nix.url = "github:NixOS/nix";
|
||||||
nixpkgs.url = "nixpkgs/nixos-25.11";
|
nixpkgs.url = "nixpkgs/nixos-26.05";
|
||||||
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
|
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||||
@@ -11,7 +11,6 @@
|
|||||||
url = "github:nix-community/nixos-generators";
|
url = "github:nix-community/nixos-generators";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
# hyprland.url = "github:hyprwm/Hyprland";
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
./disks.nix
|
./disks.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./environments.nix
|
./environments.nix
|
||||||
# ./network.nix
|
./network.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "jupiter";
|
networking.hostName = "jupiter";
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
# Try fix wifi disconnect
|
# Try fix wifi disconnect
|
||||||
networking.networkmanager.wifi.powersave = false;
|
networking.networkmanager.wifi.powersave = false;
|
||||||
|
|
||||||
# Disable hibernate completely
|
# Disable hibernate completely
|
||||||
powerManagement.enable = true;
|
powerManagement.enable = true;
|
||||||
systemd.targets."hibernate".enable = false;
|
systemd.targets."hibernate".enable = false;
|
||||||
|
|||||||
@@ -35,6 +35,8 @@
|
|||||||
#vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
|
#vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
|
||||||
libva-vdpau-driver
|
libva-vdpau-driver
|
||||||
libvdpau-va-gl
|
libvdpau-va-gl
|
||||||
|
vpl-gpu-rt # oneVPL/MFX runtime, required for QSV (h264_qsv/hevc_qsv) session creation
|
||||||
|
intel-compute-runtime # OpenCL runtime, required for tonemap_opencl (HDR tone-mapping)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -7,4 +7,4 @@ _: {
|
|||||||
domain = "jupiter.solar.internal";
|
domain = "jupiter.solar.internal";
|
||||||
search = [ "jupiter.solar.internal" ];
|
search = [ "jupiter.solar.internal" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
useOSProber = true;
|
useOSProber = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
# Configure keymap in X11
|
||||||
services.xserver.xkb = {
|
services.xserver.xkb = {
|
||||||
layout = "de";
|
layout = "de";
|
||||||
@@ -34,9 +33,8 @@
|
|||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
|
||||||
hardware.nvidia.prime = {
|
hardware.nvidia.prime = {
|
||||||
sync.enable = true;
|
sync.enable = false;
|
||||||
|
|
||||||
nvidiaBusId = "PCI:01:00:0";
|
nvidiaBusId = "PCI:01:00:0";
|
||||||
intelBusId = "PCI:00:2:0";
|
intelBusId = "PCI:00:2:0";
|
||||||
@@ -44,6 +42,45 @@
|
|||||||
|
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
|
|
||||||
|
# Don't let boot stall waiting for a network that may never come up
|
||||||
|
# (WiFi credentials live in KWallet and need a desktop session), which
|
||||||
|
# otherwise hangs the terminal boot before the login prompt appears.
|
||||||
|
systemd.services.NetworkManager-wait-online.enable = false;
|
||||||
|
|
||||||
|
# Boot-time choice: the default GRUB entry boots straight into KDE.
|
||||||
|
# A separate "terminal" entry (a NixOS specialisation) boots to a text
|
||||||
|
# console with autologin, where you can work or run `desktop` to bring
|
||||||
|
# KDE up. Pick the entry you want in the GRUB menu at boot.
|
||||||
|
#
|
||||||
|
# NOTE: in terminal mode WiFi will not connect on its own (the password
|
||||||
|
# is stored per-user in KWallet). To reach the machine over SSH from
|
||||||
|
# terminal mode, first save the WiFi as a system connection in KDE:
|
||||||
|
# network settings -> your WiFi -> "All users may connect to this network".
|
||||||
|
specialisation.terminal.configuration = {
|
||||||
|
system.nixos.tags = [ "terminal" ];
|
||||||
|
|
||||||
|
# Boot to a text console. graphical.target is what pulls in the display
|
||||||
|
# manager (via its embedded Wants=display-manager.service), so defaulting
|
||||||
|
# to multi-user.target leaves SDDM installed but not started at boot.
|
||||||
|
systemd.defaultUnit = lib.mkForce "multi-user.target";
|
||||||
|
|
||||||
|
# Guarantee a usable shell on the console (no login prompt to hunt for).
|
||||||
|
services.getty.autologinUser = "finn";
|
||||||
|
|
||||||
|
# Bring the desktop up on demand from the terminal.
|
||||||
|
environment.systemPackages = [
|
||||||
|
(pkgs.writeShellScriptBin "desktop" "exec sudo systemctl start display-manager.service")
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# KDE (PowerDevil) power settings: do nothing on lid close while on AC power.
|
||||||
|
# Shipped as a system-wide default; KConfig cascades so a user's own
|
||||||
|
# ~/.config/powerdevilrc will override this if present.
|
||||||
|
environment.etc."xdg/powerdevilrc".text = ''
|
||||||
|
[AC][SuspendAndShutdown]
|
||||||
|
LidAction=0
|
||||||
|
'';
|
||||||
|
|
||||||
system = {
|
system = {
|
||||||
stateVersion = "23.05";
|
stateVersion = "23.05";
|
||||||
autoUpgrade.enable = true;
|
autoUpgrade.enable = true;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ in
|
|||||||
my.hardware = {
|
my.hardware = {
|
||||||
bluetooth.enable = true;
|
bluetooth.enable = true;
|
||||||
sound.enable = false;
|
sound.enable = false;
|
||||||
nvidia.enable = true;
|
nvidia.enable = false;
|
||||||
};
|
};
|
||||||
my.services = {
|
my.services = {
|
||||||
vpn.enable = true;
|
vpn.enable = true;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
let
|
let
|
||||||
cfg = config.my.profiles.audiobookshelf;
|
cfg = config.my.profiles.audiobookshelf;
|
||||||
hostName = config.networking.hostName;
|
hostName = config.networking.hostName;
|
||||||
|
domain = config.networking.domain;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.my.profiles.audiobookshelf = with lib; {
|
options.my.profiles.audiobookshelf = with lib; {
|
||||||
@@ -32,7 +33,7 @@ in
|
|||||||
group = "Media";
|
group = "Media";
|
||||||
name = "Audiobookshelf";
|
name = "Audiobookshelf";
|
||||||
description = "Audiobooks and podcasts";
|
description = "Audiobooks and podcasts";
|
||||||
href = "http://${hostName}:63834";
|
href = "http://${domain}:63834";
|
||||||
icon = "audiobookshelf.png";
|
icon = "audiobookshelf.png";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -11,11 +11,6 @@ let
|
|||||||
hostName = config.networking.hostName;
|
hostName = config.networking.hostName;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
|
||||||
# services.openthread-border-router isn't in nixos-25.11; pull from
|
|
||||||
# nixpkgs-unstable. Package comes from the existing unstable overlay.
|
|
||||||
"${self.inputs.nixpkgs-unstable}/nixos/modules/services/home-automation/openthread-border-router.nix"
|
|
||||||
];
|
|
||||||
|
|
||||||
options.my.profiles.home-assistant = with lib; {
|
options.my.profiles.home-assistant = with lib; {
|
||||||
enable = mkEnableOption "Home Automation";
|
enable = mkEnableOption "Home Automation";
|
||||||
@@ -34,6 +29,8 @@ in
|
|||||||
"otbr"
|
"otbr"
|
||||||
"thread"
|
"thread"
|
||||||
"xiaomi_miio"
|
"xiaomi_miio"
|
||||||
|
"apple_tv" # Apple TV (pyatv); pair via UI PIN flow
|
||||||
|
"tuya" # Tuya/SmartLife cloud; Unistyle WLAN irrigation computer
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
services.home-assistant.config = {
|
services.home-assistant.config = {
|
||||||
@@ -43,7 +40,7 @@ in
|
|||||||
internal_url = "http://${hostName}:8123";
|
internal_url = "http://${hostName}:8123";
|
||||||
external_url = "http://jupiter.solar.internal:8123";
|
external_url = "http://jupiter.solar.internal:8123";
|
||||||
};
|
};
|
||||||
mobile_app = {};
|
mobile_app = { };
|
||||||
automation = "!include automations.yaml";
|
automation = "!include automations.yaml";
|
||||||
script = "!include scripts.yaml";
|
script = "!include scripts.yaml";
|
||||||
scene = "!include scenes.yaml";
|
scene = "!include scenes.yaml";
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
let
|
let
|
||||||
cfg = config.my.profiles.homepage;
|
cfg = config.my.profiles.homepage;
|
||||||
dashboardPort = 8082;
|
dashboardPort = 8082;
|
||||||
dashboardHost = config.networking.hostName;
|
dashboardHost = config.networking.domain;
|
||||||
dashboardUrl = "http://${dashboardHost}:${toString dashboardPort}";
|
dashboardUrl = "http://${dashboardHost}:${toString dashboardPort}";
|
||||||
manualServices = import ./manual-services.nix;
|
manualServices = import ./manual-services.nix;
|
||||||
manualWidgets = import ./manual-widgets.nix;
|
manualWidgets = import ./manual-widgets.nix;
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ in
|
|||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = [ pkgs.libva-utils ];
|
||||||
|
|
||||||
my.homepage.services = [
|
my.homepage.services = [
|
||||||
{
|
{
|
||||||
group = "Media";
|
group = "Media";
|
||||||
@@ -34,6 +36,10 @@ in
|
|||||||
|
|
||||||
systemd.services.jellyfin = {
|
systemd.services.jellyfin = {
|
||||||
after = [ "network-online.target" ];
|
after = [ "network-online.target" ];
|
||||||
|
serviceConfig.SupplementaryGroups = [
|
||||||
|
"video"
|
||||||
|
"render"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,4 +24,4 @@ in
|
|||||||
numix-icon-theme
|
numix-icon-theme
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user