added manual secrets
This commit is contained in:
1 parent
672657c111
commit
d9cacefa0f
34 files changed
+1428
-10
No files matched your search
@@ -0,0 +1,51 @@
|
||||
# modules/nixos/desktop/
|
||||
|
||||
Everything that turns a host into a workstation. The whole tree is gated by the master
|
||||
switch `skyg.nixos.desktop.enable`; individual desktop environments, tilers, and extras
|
||||
have their own sub-options so a host enables only the stack it actually uses.
|
||||
|
||||
## Files
|
||||
|
||||
```
|
||||
desktop/
|
||||
├── default.nix # skyg.nixos.desktop.enable — display manager, dbus, libinput, pipewire, xdg portals
|
||||
├── wayland.nix # Wayland session vars (NIXOS_OZONE_WL) + clipboard/utils
|
||||
├── x11/ # X11 server + libinput-gestures (skyg.nixos.desktop.x11.*)
|
||||
├── tiler/ # Tiling WMs (niri / hyprland) + DankMaterialShell + swww
|
||||
├── stylix/ # System-wide theming via Stylix (gruvbox-dark-hard)
|
||||
├── packages.nix # Desktop apps: chromium, flatpak, vlc, ghostty, clipboard tools
|
||||
├── crypto.nix # skyg.nixos.desktop.crypto — hardware wallet apps + udev rules
|
||||
├── printers.nix # CUPS printing + drivers (always on when desktop enabled)
|
||||
├── gnome.nix # skyg.nixos.desktop.gnome — GNOME + pop-shell
|
||||
├── kde.nix # skyg.nixos.desktop.kde — Plasma 6
|
||||
└── cosmic.nix # skyg.nixos.desktop.cosmic — COSMIC DE
|
||||
```
|
||||
|
||||
## How it composes
|
||||
|
||||
- `default.nix` (`skyg.nixos.desktop.enable`) provides the shared desktop substrate: display
|
||||
manager, dbus, libinput, PipeWire (pulse/jack), upower, avahi, and the full xdg portal set.
|
||||
- The DE/WM modules (`gnome`, `kde`, `cosmic`, `tiler`) are independent enables — pick the
|
||||
one(s) a host should offer.
|
||||
- `packages.nix`, `wayland.nix`, and `printers.nix` activate automatically with the master
|
||||
desktop enable; `crypto` is a separate opt-in.
|
||||
|
||||
## Option Namespace
|
||||
|
||||
```
|
||||
skyg.nixos.desktop.enable → default.nix (master switch)
|
||||
skyg.nixos.desktop.gnome.enable → gnome.nix
|
||||
skyg.nixos.desktop.kde.enable → kde.nix
|
||||
skyg.nixos.desktop.cosmic.enable → cosmic.nix
|
||||
skyg.nixos.desktop.tiler.* → tiler/
|
||||
skyg.nixos.desktop.stylix.enable → stylix/ (default true)
|
||||
skyg.nixos.desktop.crypto.enable → crypto.nix
|
||||
skyg.nixos.desktop.x11.* → x11/
|
||||
```
|
||||
|
||||
## Conventions
|
||||
|
||||
- Nothing in this tree should activate unless `skyg.nixos.desktop.enable` is set — gate new
|
||||
modules accordingly (most check `config.skyg.nixos.desktop.enable`).
|
||||
- Greeter/login is handled by DankMaterialShell on tiler hosts; do not configure
|
||||
`services.greetd` manually (see the repo-root `GUIDELINES.md`).
|
||||
@@ -0,0 +1,59 @@
|
||||
# Guidelines — modules/nixos/desktop/
|
||||
|
||||
Conventions for the desktop/workstation tree. Read alongside the repo-root `GUIDELINES.md`.
|
||||
|
||||
---
|
||||
|
||||
## Everything hangs off the master switch
|
||||
|
||||
`skyg.nixos.desktop.enable` is the gate for the whole tree. New desktop modules must not
|
||||
activate unless it (or their own sub-option) is set:
|
||||
|
||||
```nix
|
||||
let cfg = config.skyg.nixos.desktop; in {
|
||||
config = lib.mkIf cfg.enable { ... };
|
||||
}
|
||||
```
|
||||
|
||||
Sub-features (a DE, a tiler, crypto wallets, gestures) get their **own** `enable` option so a
|
||||
host opts into exactly the stack it wants.
|
||||
|
||||
## Greeter / login — do not hand-roll
|
||||
|
||||
Desktop/tiler hosts use **DankMaterialShell (DMS)** for the greeter, configured via
|
||||
`programs.dank-material-shell` (see `tiler/default.nix` and the repo-root `GUIDELINES.md`).
|
||||
|
||||
- Do **not** configure `services.greetd` manually on these hosts.
|
||||
- The keyring (`gnome-keyring`) provides the SSH agent on tiler hosts, so
|
||||
`programs.ssh.startAgent` stays **off**. Don't re-enable it.
|
||||
|
||||
## Tilers
|
||||
|
||||
- Enable a compositor (`skyg.nixos.desktop.tiler.niri` or `…tiler.hyprland`), which flips the
|
||||
shared `tiler.enable` for you. Don't set `tiler.enable` directly.
|
||||
- Shared Wayland tooling, keyring, and polkit live in `tiler/default.nix` — add anything
|
||||
common to *all* tilers there, not in the individual compositor files.
|
||||
|
||||
## Theming
|
||||
|
||||
- Global theming is **Stylix** (`stylix/`), enabled by default and gated on `desktop.enable`.
|
||||
- Change the look in `stylix/default.nix` (base16 scheme + fonts). Avoid scattering per-app
|
||||
color overrides elsewhere; let Stylix drive it.
|
||||
|
||||
## Desktop environments are independent
|
||||
|
||||
`gnome.nix`, `kde.nix`, and `cosmic.nix` are mutually independent opt-ins. A host can enable
|
||||
more than one, but typically picks a single primary DE/WM. Each excludes the upstream apps it
|
||||
doesn't want (terminals, text editors, etc.) — keep that list curated rather than installing
|
||||
everything.
|
||||
|
||||
## Config symlinks
|
||||
|
||||
Some modules symlink files from the repo's `configs/` directory into `~/.config` via
|
||||
activation scripts (e.g. `x11/lib-gesture.nix` → `libinput-gestures.conf`). Edit the file in
|
||||
`configs/`, not the module, when changing that behaviour.
|
||||
|
||||
## Validation
|
||||
|
||||
Do **not** build or switch. `nix-instantiate --parse` is the only safe local check; the user
|
||||
validates on real hardware.
|
||||
@@ -0,0 +1,29 @@
|
||||
# modules/nixos/desktop/stylix/
|
||||
|
||||
System-wide theming through [Stylix](https://github.com/danth/stylix). Applies a single
|
||||
base16 scheme and font set across the desktop (GTK, Qt, terminals, etc.) automatically.
|
||||
|
||||
## Files
|
||||
|
||||
```
|
||||
stylix/
|
||||
└── default.nix # skyg.nixos.desktop.stylix.enable (default true)
|
||||
```
|
||||
|
||||
## Behaviour
|
||||
|
||||
- Defaults to **enabled**, but only takes effect when `skyg.nixos.desktop.enable` is also set.
|
||||
- Scheme: `gruvbox-dark-hard`, dark polarity, `autoEnable = true`.
|
||||
- Fonts: DejaVu (serif/sans/mono) + Noto Color Emoji.
|
||||
|
||||
## Option Namespace
|
||||
|
||||
```
|
||||
skyg.nixos.desktop.stylix.enable # default true; gated on desktop.enable
|
||||
```
|
||||
|
||||
## Conventions
|
||||
|
||||
- To change the global theme, edit the `base16Scheme`/`fonts` here rather than overriding
|
||||
per-app theming downstream.
|
||||
- Disable via `skyg.nixos.desktop.stylix.enable = false` on hosts that want manual theming.
|
||||
@@ -0,0 +1,40 @@
|
||||
# modules/nixos/desktop/tiler/
|
||||
|
||||
Tiling Wayland compositors and their shared plumbing. The shared `tiler.enable` switch
|
||||
brings in DankMaterialShell (DMS), the gnome-keyring/secrets stack, polkit, and a common set
|
||||
of Wayland control/capture tools. Each compositor module turns this on automatically.
|
||||
|
||||
## Files
|
||||
|
||||
```
|
||||
tiler/
|
||||
├── default.nix # skyg.nixos.desktop.tiler.enable — DMS, keyring, polkit, shared packages
|
||||
├── niri.nix # skyg.nixos.desktop.tiler.niri — niri compositor (sets tiler.enable)
|
||||
├── hyprland.nix # skyg.nixos.desktop.tiler.hyprland — Hyprland (sets tiler.enable)
|
||||
└── swww.nix # skyg.nixos.desktop.tiler.background — swww/waypaper wallpaper tools
|
||||
```
|
||||
|
||||
## Behaviour
|
||||
|
||||
- Enabling either `niri` or `hyprland` sets `skyg.nixos.desktop.tiler.enable = true`, which
|
||||
pulls in the shared substrate. You normally enable only the compositor option.
|
||||
- The shared substrate configures **gnome-keyring as the SSH agent** (so
|
||||
`programs.ssh.startAgent = false`), enables polkit, and installs control tools
|
||||
(pavucontrol, playerctl, brightnessctl, blueman) and screen-capture tools
|
||||
(slurp, satty, wf-recorder).
|
||||
- `background` is an independent opt-in for swww + waypaper wallpaper management.
|
||||
|
||||
## Option Namespace
|
||||
|
||||
```
|
||||
skyg.nixos.desktop.tiler.enable → default.nix (usually set indirectly)
|
||||
skyg.nixos.desktop.tiler.niri.enable
|
||||
skyg.nixos.desktop.tiler.hyprland.enable
|
||||
skyg.nixos.desktop.tiler.background.enable
|
||||
```
|
||||
|
||||
## Conventions
|
||||
|
||||
- Don't set `tiler.enable` directly — enable a compositor and let it flip the shared switch.
|
||||
- Greeter is DMS-managed (`programs.dank-material-shell`); never hand-roll `services.greetd`.
|
||||
- Keyring provides the SSH agent here — keep `programs.ssh.startAgent` off.
|
||||
@@ -0,0 +1,30 @@
|
||||
# modules/nixos/desktop/x11/
|
||||
|
||||
X11 server setup and touchpad gesture support for desktop hosts.
|
||||
|
||||
## Files
|
||||
|
||||
```
|
||||
x11/
|
||||
├── default.nix # Enables services.xserver (us layout) when desktop.enable is set
|
||||
└── lib-gesture.nix # skyg.nixos.desktop.x11.enableLibGestures — libinput-gestures + tools
|
||||
```
|
||||
|
||||
## Behaviour
|
||||
|
||||
- `default.nix` enables `services.xserver` with a US keyboard layout whenever
|
||||
`skyg.nixos.desktop.enable` is on (X is kept available even on Wayland-first hosts).
|
||||
- `lib-gesture.nix` is an independent opt-in that installs `libinput-gestures`, `wmctrl`,
|
||||
`xdotool`, adds the user to the `input` group, and symlinks
|
||||
`configs/libinput-gestures.conf` into the user's `~/.config`.
|
||||
|
||||
## Option Namespace
|
||||
|
||||
```
|
||||
skyg.nixos.desktop.x11.enableLibGestures # default false
|
||||
```
|
||||
|
||||
## Conventions
|
||||
|
||||
- Gesture config is sourced from `configs/libinput-gestures.conf` via an activation symlink —
|
||||
edit the config there, not in the module.
|
||||
Reference in new issue
Block a user