Compare commits

..

37 Commits

Author SHA1 Message Date
Olivier 6b8fa60540 docs: update README with feature overview and module structure 2026-07-22 18:02:21 -03:00
Olivier 86dc80eb3c feat(wisdom): enhance vscode module with java support and writable settings
Add Java extension support and configure multiple JDK runtimes.
Introduce a wrapped VS Code package that includes JDK 25 in the PATH
to support the Red Hat Java language server.

Switch from using `programs.vscode.userSettings` to a manually managed
`settings.json` file via `home.file`. This allows the settings file to
be writable by external tools like `kilo-code` at runtime while
preserving them across Nix configuration switches by using `force = false`.
2026-07-19 18:13:30 -03:00
Olivier f1bd5146a3 refactor(hosts): simplify streaming display configuration
Refactor the streaming display logic for the 14900k host to use the
`streamingDisplay` configuration object directly instead of separate
variables. This simplifies the monitor layout logic for both Niri and
Hyprland.

Additionally, remove the fragile `sunshineOutputIndex` option in favor
of using the stable connector name for Sunshine's `output_name`. This
prevents issues where numeric monitor indices drift after hotplugging.
The change also includes an explicit encoder list for Sunshine to avoid
probing for AV1 on hardware that does not support it.
2026-07-18 09:35:52 -03:00
Olivier 6f35d60aab refactor(system): simplify steamTinkerLaunch logic and package assignment
Refactor the steamExtraPkgs conditional logic into a single line and
introduce a launcherSet variable to reduce redundancy when assigning
packages to the system or specific users.
2026-07-17 17:37:38 -03:00
Olivier 3d2e74d115 feat(wisdom): add vscode editor module
Add a new module for Visual Studio Code configuration including
default extensions (nix-ide, markdown-all-in-one, prettier) and
nixd/nixfmt settings. Enable vscode on 14900k, t2mbp, and uConsole
hosts with additional extensions.

Also clean up unfree predicate logic in ideapad configuration.
2026-07-17 17:17:14 -03:00
Olivier 548a438f6a refactor(wisdom): rename wisdomSimpleSlice to wisdomSlice
Rename the helper function `wisdomSimpleSlice` to `wisdomSlice` across
the codebase and update documentation to reflect the new naming
convention. This change simplifies the API for creating trivial
single-package slices.
2026-07-17 11:44:56 -03:00
Olivier 0939766e3a refactor(wisdom): migrate app and browser modules to wisdomSimpleSlice
Replace manual Home Manager module definitions in `localsend`,
`pokeclicker`, and `flow-browser` with the `wisdomSimpleSlice`
helper. This reduces boilerplate by centralizing the option
declaration and configuration logic.
2026-07-17 11:31:35 -03:00
Olivier f424ab98c7 refactor(hosts): remove redundant host and system arguments
Remove explicit `host` and `system` definitions from `specialArgs` in
various host `default.nix` files. These values are redundant as they
can be derived from the flake context or are already provided by the
calling environment.
2026-07-17 11:30:34 -03:00
Olivier 15a4d8d5e8 feat(nfs): centralize nixdesk jellyfin nfs client module
Move the nixdesk jellyfin NFS client configuration from individual
host services to a centralized NixOS module in `modules/system/nfs/`.

This change:
- Creates `modules/system/nfs/default.nix` containing the `nixdeskJellyfin`
  flake module.
- Removes redundant NFS client definitions from `modules/hosts/nix-server/`
  and `modules/hosts/r5500/`.
- Updates `modules/hosts/r5500/configuration.nix` to use the new
  centralized module.
- Cleans up unused local disk configuration in `modules/hosts/14900k/`.
2026-07-17 11:11:21 -03:00
Olivier 5f7e9cada5 refactor(desktop): clean up options formatting and simplify slice logic
Refactor `modules/desktop/options.nix` to improve code readability by
expanding the `optPath` list definition and simplifying the
`wisdomSimpleSlice` configuration logic.

Also apply minor style fixes to `modules/wisdom/filebrowsers/nemo.nix`
to ensure consistent spacing within list definitions.
2026-07-16 20:55:53 -03:00
Olivier c4a0eb0a98 feat(chromium-hevc): enhance GPU configuration options and streamline desktop item creation 2026-07-16 19:51:06 -03:00
Olivier 103a485bf8 feat(wisdom): introduce wisdomSimpleSlice helper for package modules
Implement a `wisdomSimpleSlice` helper in `desktop/options.nix` to reduce
boilerplate for simple Home Manager modules that only manage packages.
This helper handles the `enable` option creation, platform-gating via
`availableOn`, and conditional inclusion in `home.packages`.

Refactor several existing wisdom modules to use this new helper:
- `wisdomBrowsersChrome`
- `wisdomBrowsersEdge`
- `wisdomEditorsKate`
- `wisdomEditorsObsidian`

Additionally, clean up `wisdom/default.nix` by removing the explicit
import of `wisdomShellBash` (which is now handled via auto-wiring) and
improving code formatting.
2026-07-16 19:46:23 -03:00
Olivier 13f35677be refactor(wisdom): decentralize module defaults and update conventions
Move Home Manager module defaults from a centralized `desktop-home-defaults.nix`
file into their respective `wisdom` slices. This change aligns with the
updated documentation regarding module ownership, where defaults live
with the option that owns them rather than in a shared defaults file.

Additionally, update `docs/conventions.md` to reflect this new pattern for
defining `mkEnableOption` defaults and move base git/encryption
configurations into the core `wisdom` module.

- Delete `modules/hosts/desktop-home-defaults.nix`
- Update `modules/wisdom/default.nix` to include shared git and package defaults
- Add `default = ...` to `mkEnableOption` in various `wisdom` modules
- Update `docs/conventions.md` with new HM slice guidelines
2026-07-16 13:51:48 -03:00
Olivier 579a120326 feat(14900k): update dms-defaults settings and plugin configurations
Add various UI and system configuration parameters to dms-defaults,
including matugen contrast, widget styling, hyprland layout overrides,
elevation settings, battery indicator options, and workspace color
customizations. Also update plugin settings to include a Home Assistant
refresh counter.
2026-07-16 13:45:31 -03:00
Olivier c90d368432 refactor(ssh): restructure inventory and modularize helper logic
Relocate SSH inventory and rbw socket wiring from `modules/lib/` to
dedicated `modules/ssh/` modules to improve logical grouping.

- Move `ssh-inventory.nix` to `modules/ssh/inventory.nix`.
- Move `rbw-ssh-socket.nix` to `modules/ssh/rbw.nix`.
- Relocate `users-merge.nix` logic into `modules/system/users.nix` to
  reduce dependency on generic library modules.
- Update `docs/conventions.md` to reflect new module paths.
- Refactor `modules/deploy/navi.nix` to use a local helper for
  generating Navi hive configurations.
- Add Pi5 specific Niri KDL configuration snippets.
2026-07-15 23:27:03 -03:00
Olivier a787840ce2 style(desktop): reformat nix code and simplify module logic
Refactor `modules/desktop/options.nix` to improve code readability through
consistent indentation and whitespace management. Simplified the
conditional logic for `home-manager.extraSpecialArgs` to remove
unnecessary complexity.

Clean up host configurations by removing commented-out code, removing
unnecessary whitespace, and flattening nested attribute sets into
single-line declarations where appropriate.
2026-07-15 22:20:07 -03:00
Olivier e2fd47aa58 feat(users): add declarative rbw configuration for olivier
Introduce rbw settings within olivier's home-manager module to
centralize the email and base_url configuration. This replaces
manual per-host configuration with a declarative approach.
2026-07-15 18:58:54 -03:00
Olivier 5d70868e4f feat(14900k): replace windsurf with devin-desktop in olivier's extra packages
Update the extra packages for user olivier in the private AI module
to include devin-desktop instead of windsurf.
2026-07-15 18:20:50 -03:00
Olivier db88a44435 refactor(ssh): centralize identity file logic and optimize host selection
Refactor the SSH configuration generation to reduce duplication and
improve efficiency.

- Extract `IdentityFile` line generation into a shared variable in
  `ssh-inventory.nix` to ensure consistency between per-host and
  gitea blocks.
- Optimize `selectedHosts` resolution in `home-manager/default.nix`
  by reusing `activeHosts` when the "all" wildcard is used.
- Tighten IPv4 regex matching in `ssh-inventory.nix` using anchors.
- Update `users-merge.nix` to propagate `extraIdentities` to the
  rbw outbound configuration.
- Set default `authorizedHosts` to "all" for inbound SSH users.
2026-07-15 18:20:40 -03:00
Olivier 524abb9ceb Flake lock update 2026-07-15 10:38:27 -03:00
Olivier 6291076494 chore(14900k): disable handbrake due to ffmpeg-full incompatibility
Comment out handbrake installation because the current ffmpeg-full-8.1.2
version in nixpkgs contains a broken A01-mov-read patch that prevents
successful builds. This is a temporary measure until nixpkgs is updated
or the system is switched to a stable channel.
2026-07-15 10:38:08 -03:00
Olivier f3d358ce12 feat(14900k): add MediaTek MT7927 WiFi and Bluetooth support
Add a private module to enable MediaTek MT7927 (Filogic 380) support.
This includes a firmware path fix for Bluetooth and a systemd service
to force-load patched out-of-tree kernel modules, bypassing in-tree
drivers that lack support for this hardware on nixos-unstable.
2026-07-15 10:37:43 -03:00
Olivier 645e1f0f31 Refactor ssh&users 2026-07-15 10:02:04 -03:00
Olivier e68321ac1e Add Virtual-1 display configuration to DMS settings
- Included a new display entry for "Virtual-1" in the DMS settings.json file, enhancing display management capabilities.
2026-07-13 12:39:05 -03:00
Olivier 5357ba307b Fix dms-plugins
- Transitioned to an auto-derived plugin registry from flake inputs, simplifying the addition of new plugins by requiring edits only in `flake.nix`.
- Implemented a camelCase transformation for plugin IDs to align with upstream conventions, with exceptions for specific plugins.
- Enhanced the `shipPlugin` function to route plugin sources correctly, ensuring compatibility with the DMS structure.
- Added assertions to validate Obsidian vault paths at build time, improving error handling and user guidance.
2026-07-13 12:39:05 -03:00
Olivier 9960e874c4 Refactor DMS IPC bindings for Niri and Hyprland
- Updated `binds.nix` files for both Niri and Hyprland to utilize a centralized `dmsIpcBinds` structure, improving maintainability and consistency across keybindings.
- Introduced `dmsIpcBinds` in `default.nix` for both modules to streamline the command definitions for DMS IPC calls.
- Enhanced `dms` module to define shared IPC commands, ensuring uniform command formatting for different compositors.
2026-07-13 12:39:05 -03:00
Olivier 2f28ec735d Add freebuff to t2mbp 2026-07-13 11:47:23 -03:00
Olivier 2cdfaa3ed7 Update desktop-home-defaults.nix to include feishin package 2026-07-12 23:49:22 -03:00
Olivier 32cb8955eb Add VM self-test configuration for NixOS 2026-07-12 23:48:56 -03:00
Olivier d9b82bbf2b Updated the nvidia.nix file to set hardware.nvidia-container-toolkit.enable to a default value of true, ensuring consistent behavior across configurations. 2026-07-12 21:07:57 -03:00
Olivier 6f0c6b9c31 Remove Tailscale configuration from t2mbp setup
- Deleted the Tailscale auth key configuration and related networking settings from `configuration.nix` to streamline the host setup.
- Maintained other networking configurations for continued functionality.
2026-07-12 21:03:54 -03:00
Olivier bab8bdecb7 Simplify modulesTree definition
- Streamlined the construction of modulesTree by consolidating filter logic into a single line for improved readability and maintainability.
2026-07-12 21:02:09 -03:00
Olivier 15fcf88da2 Add Cloudflare Turnstile integration to Gitea configuration
- Introduced `cloudflare-turnstile` secrets in `secrets.yaml` for enhanced CAPTCHA support.
- Updated Gitea service configuration to enable Turnstile CAPTCHA with the new secret and site keys.
- Modified last modified date and MAC in `secrets.yaml` for security compliance.
2026-07-10 17:54:04 -03:00
Olivier b70f9f4822 Update Cloudflare DynDNS configuration to replace domain "xn--1iu.cc" with "慧.cc" for improved domain management. 2026-07-10 17:44:55 -03:00
Olivier 87f839d16a Enhance flake configuration with new modules and updates
- Added `hermes` module to integrate the Hermes agent into the flake.
- Introduced new `ai.nix` module for Ollama service configuration, enabling AI capabilities.
- Updated `flake.lock` to include new dependencies and revisions for `hermes`, `npm-lockfile-fix`, and other related packages.
- Refactored existing flake structure to improve organization and maintainability.
- Enabled `nix-ld` in the host configuration for enhanced linking capabilities.
2026-07-10 17:44:40 -03:00
Olivier 25cf0167c1 Enhance 14900k configuration with streaming display support and virtual EDID generation
- Added a new `streaming-display.nix` module to configure a headless 4K virtual output for Sunshine and Moonlight.
- Introduced a Python script `generate-virtual-edid.py` to create a virtual display EDID with 4K capabilities.
- Updated `configuration.nix` to integrate the new streaming display module and enable related services.
- Modified `displays.nix` to accommodate the new streaming display settings and ensure compatibility with existing GPU passthrough configurations.
2026-07-10 17:32:37 -03:00
Olivier dc06c70c43 Refactor DMS configuration and introduce home-manager integration
- Simplified `default.nix` by removing legacy home-manager settings and delegating them to a new `_private/hm.nix` module for better organization.
- Added a new script `dms-restart-once.sh` to handle service restarts and cache management for DMS plugins.
- Updated the DMS configuration to streamline the integration of third-party plugins and improve overall modularity.
2026-06-22 13:14:08 -03:00
84 changed files with 2875 additions and 2011 deletions
+14 -4
View File
@@ -17,16 +17,26 @@ How to work on it: [conventions.md](./conventions.md).
Each machine: `modules/hosts/<name>/default.nix``nixosConfigurations.<name>`, real config in `*Configuration` + optional `_private/` and `_services/`. Each machine: `modules/hosts/<name>/default.nix``nixosConfigurations.<name>`, real config in `*Configuration` + optional `_private/` and `_services/`.
## Features at a glance
- **Users catalog** — one catalog in `modules/system/users.nix`, pick who exists on a host with `chiasson.users.enabled = [ "example" ]`, override per host. Home Manager wires itself from the same list.
- **SSH + Bitwarden (rbw) keys** — one ed25519 keypair per catalog user, private key in Bitwarden, public key in `modules/ssh/inventory.nix`. Outbound SSH uses a `.pub` filter against the rbw agent; inbound `authorized_keys` are generated from the same inventory. [Full wiring in conventions.md](./conventions.md#ssh-model).
- **Wisdom modules** — Home Manager slices in `modules/wisdom/` auto-catalog via `lib.wisdomCatalogExtraModules` (defined in `modules/desktop/options.nix`). The baseline `wisdom` module handles git identity + shared tools; all other `wisdom*` exports are pulled in once per user through `desktopHomeBase``chiasson.users.extraModules.olivier`. Hosts only flip `chiasson.home.<category>.<slice>.enable` — no manual imports in `home.nix`. Categories include `apps` (spotify, discord, localsend), `browsers` (chrome, edge, zen, …), `editors` (cursor, vscode, obsidian, …), `shells` (bash, fish, oh-my-posh, yazi), `desktop` (gtk-qt-theming, screenshot), and `terminals` (kitty). Trivial single-package slices can be written with the `lib.wisdomSlice` helper instead of repeating the `root`/`cfg` + `mkIf` boilerplate.
- **Wallpapers from a dedicated repo** — `modules/desktop/wallpapers.nix` pins `inputs.wallpapers` into the store and exposes it as `CHIASSON_NIX_WALLPAPERS` and `/etc/wallpapers`. Override `chiasson.desktop.wallpapers.source` if needed.
- **Private host data** — import-tree skips `_private/` globally, so machine-only files (firmware quirks, display configs, service tweaks) live next to the host module without leaking elsewhere.
## Deploy / rebuild ## Deploy / rebuild
Remote builds use the `builder` user (`systemDeployBuilder`, wired through `client-services` on desktops). Remote builds use the `builder` user (`systemDeployBuilder`, wired through `client-services` on desktops/laptops/tablets).
Fleet deploy is [Navi](https://github.com/cafkafk/navi) — config in `modules/deploy/navi.nix`, outputs `flake.navi` / `flake.naviHive`. Fleet deploy is [Navi](https://github.com/cafkafk/navi) — config in `modules/deploy/navi.nix`, outputs `flake.navi` / `flake.naviHive`.
```bash ```bash
nix develop # devShell has navi + hints nix develop # devShell has navi + just + hints
just # list local helpers like `sync-dms`
navi apply --on <host> navi apply --on <host>
navi apply-local --node 14900k --sudo # this machine, if hostname matches navi apply-local --node 14900k --sudo # this machine, if hostname matches
navi tui # interactive fleet dashboard
``` ```
Plain rebuild still works: `sudo nixos-rebuild switch --flake .#<host>`. Plain rebuild still works: `sudo nixos-rebuild switch --flake .#<host>`.
@@ -37,11 +47,11 @@ Plain rebuild still works: `sudo nixos-rebuild switch --flake .#<host>`.
modules/ modules/
hosts/<host>/ # per-machine composition hosts/<host>/ # per-machine composition
system/ # nixosModules.system aggregate system/ # nixosModules.system aggregate
desktop/ # GUI stack desktop/ # GUI stack (niri, hyprland, plasma, DMS)
wisdom/ # HM modules (exports still named wisdom*) wisdom/ # HM modules (exports still named wisdom*)
ssh/ # inbound NixOS + outbound HM ssh/ # inbound NixOS + outbound HM
deploy/ # navi hive deploy/ # navi hive
lib/ # pure helpers → flake.lib patches/ # one-off patches (yt-dlp, t2fanrd, …)
``` ```
Machine-only stuff lives in `hosts/<host>/_private/` — import-tree skips `_private/` globally, so those files only get pulled in where you import them. Machine-only stuff lives in `hosts/<host>/_private/` — import-tree skips `_private/` globally, so those files only get pulled in where you import them.
+73 -9
View File
@@ -47,7 +47,7 @@ Leave upstream `services.*`, `networking.*`, `home.*`, etc. alone.
Aggregates: `nixosModules.system` and `nixosModules.desktop` import their leaves. Host configs import those stacks and set options — they shouldn't reimplement whole subsystems. Aggregates: `nixosModules.system` and `nixosModules.desktop` import their leaves. Host configs import those stacks and set options — they shouldn't reimplement whole subsystems.
**Home** — files under `modules/wisdom/`. Baseline is `homeManagerModules.wisdom` (`chiasson.home.enable`, wired via `chiasson.desktop.homeManager.bundleWisdom`). Other `wisdom*` slices auto-wire once per user via `lib.wisdomCatalogExtraModules self` (`modules/lib/wisdom-catalog.nix`); hosts only set matching `chiasson.home.*.enable` toggles — no re-import in `home.nix`. **Home** — files under `modules/wisdom/`. Baseline is `homeManagerModules.wisdom` (`chiasson.home.enable`, wired via `chiasson.desktop.homeManager.bundleWisdom`). Other `wisdom*` slices auto-wire once per user via `lib.wisdomCatalogExtraModules self` (`modules/desktop/options.nix`); hosts only set matching `chiasson.home.*.enable` toggles — no re-import in `home.nix`.
User apps / dotfiles → wisdom. Daemons, firewall, kernel → NixOS. Sometimes both (LocalSend: HM installs, `systemLocalsend` opens the firewall). User apps / dotfiles → wisdom. Daemons, firewall, kernel → NixOS. Sometimes both (LocalSend: HM installs, `systemLocalsend` opens the firewall).
@@ -63,13 +63,75 @@ User apps / dotfiles → wisdom. Daemons, firewall, kernel → NixOS. Sometimes
- `desktopWallpapers` copies `inputs.wallpapers` into the store; override `chiasson.desktop.wallpapers.source` if needed. - `desktopWallpapers` copies `inputs.wallpapers` into the store; override `chiasson.desktop.wallpapers.source` if needed.
## Users ## Users & SSH
User definitions live in `usersCatalogDefaults` (`modules/system/users/catalog-default.nix`) — olivier, server, builder, etc. Pick who exists on a host with `chiasson.users.enabled`. User definitions live in the catalog defaults block inside `modules/system/users.nix` (was previously split across four files in `modules/system/users/`; **folded into one for cohesion**). olivier, server, builder, etc. Pick who exists on a host with `chiasson.users.enabled`.
### SSH model — read this once
SSH authentication has two independent sides:
| Side | Holds | Decides |
|------|-------|---------|
| **Client** (connecting from) | identity private keys | "Here's proof I own key K" |
| **Server** (connecting to) | `authorized_keys` | "Do I trust key K?" |
A key is just a cryptographic identity — it's not bound to a host or a machine account name. The model is **one key per user account**: each catalog account (`olivier`, `server`, `builder`) has its own keypair in `modules/ssh/inventory.nix`, regardless of which machine that account runs on. Concretely: when `olivier@14900k` sshes to `server@r5500`, OpenSSH routes via a `Match user server` block (generated from `chiasson.ssh.outbound.rbw.extraIdentities`) → `IdentityFile ~/.ssh/id_ed25519_server.pub` (written from `users.server.publicKey`) to ask the rbw agent for the `server` private key; r5500's `server` `authorized_keys` holds the matching server pubkey. olivier's catalog default sets `extraIdentities = [ "server" "builder" ]` so `ssh <account>@<host>` Just Works for every catalog role. We also support `from="ip,cidr"` constraints per account to scope which source IPs may authenticate as it.
This repo enforces "one key per user": every user has one ed25519 keypair, the private key in Bitwarden, the public key inline in `modules/ssh/inventory.nix`. On SSH connect:
1. `~/.ssh/config` (managed by home-manager) sets `IdentityAgent SSH_AUTH_SOCK` and `IdentityFile ~/.ssh/id_ed25519_<user>.pub` for every host block.
2. OpenSSH reads the `.pub` file as a **filter** against the agent (OpenSSH 7.3+ trick — `.pub` as IdentityFile tells the agent "give me the private key matching this pub"), so even with multiple keys loaded, only the matching one is tried. This is why the old "too many auth failures" symptom is gone by construction.
3. rbw holds the private key; HM-managed shells + the desktop session expose `SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/rbw/…` declaratively (no activation scripts).
### Bitwarden onboarding
For each new user (run on the user's primary machine):
```sh
# 1. Generate a keypair with rbw (creates a Bitwarden item + prints the pubkey).
rbw gen ssh-key olivier
# 2. Paste the printed `ssh-ed25519 AAAA… olivier` line into
# modules/lib/ssh-inventory.nix under users.olivier.publicKey.
# 3. Push the user to a host:
ssh root@nix-server nixos-rebuild switch --flake .#nix-server
# 4. Have the user ssh into the fleet from any client — their rbw key
# is the only thing offered, and every server already has it in
# authorized_keys.
```
### Adding a host
Edit `modules/ssh/inventory.nix` and add:
```nix
hosts."newhost" = {
hostName = "192.168.2.X"; # IP — required for navi to deploy here
aliases = [ "newhost" ]; # what you type at the ssh prompt
};
```
Then add `self.nixosModules.<host>Configuration` to `modules/deploy/navi.nix`.
### Adding a catalog user
1. Generate a keypair: `rbw gen ssh-key <name>`.
2. Add a `users.<name> = { publicKey = "ssh-ed25519 …"; };` line under `users` in `modules/ssh/inventory.nix`.
3. Add a `<name> = { isNormalUser = true; … ssh.inbound.enable = true; ssh.inbound.authorizedHosts = "all"; }` entry under `chiasson.users.catalog` in `modules/system/users.nix`.
4. Enable on every host that needs that user, e.g.:
```nix
chiasson.users.enabled = [ "olivier" "<name>" ];
```
### Passwords
Passwords aren't in the repo. They're in `secrets/secrets.yaml` (encrypted with sops). Each host that has `olivier` must declare that secret and set `neededForUsers = true`; sops-nix decrypts it at boot, and the catalog points `hashedPasswordFile` at that file. That's why the catalog is a proper module instead of a static list — it needs `config.sops.secrets.…` at eval time. Passwords aren't in the repo. They're in `secrets/secrets.yaml` (encrypted with sops). Each host that has `olivier` must declare that secret and set `neededForUsers = true`; sops-nix decrypts it at boot, and the catalog points `hashedPasswordFile` at that file. That's why the catalog is a proper module instead of a static list — it needs `config.sops.secrets.…` at eval time.
On a host: ### Host overrides
```nix ```nix
# configuration.nix — machine policy # configuration.nix — machine policy
@@ -77,6 +139,8 @@ chiasson.users.enabled = [ "olivier" ];
chiasson.users.hostOverrides.<name> = { /* optional */ }; chiasson.users.hostOverrides.<name> = { /* optional */ };
``` ```
### Home-manager per-host slices (desktop/laptop hosts)
Desktop hosts also have `home.nix` exporting `flake.nixosModules.<host>Home`, wired from `default.nix` alongside `*Configuration`: Desktop hosts also have `home.nix` exporting `flake.nixosModules.<host>Home`, wired from `default.nix` alongside `*Configuration`:
```nix ```nix
@@ -86,7 +150,7 @@ modules = [
self.nixosModules."14900kHome" self.nixosModules."14900kHome"
]; ];
# home.nix — flake fragment, per-host `chiasson.home.*` toggles # home.nix — flake fragment, per-host chiasson.home.* toggles
{ self, inputs, ... }: { { self, inputs, ... }: {
flake.nixosModules."14900kHome" = { self, pkgs, ... }: { flake.nixosModules."14900kHome" = { self, pkgs, ... }: {
imports = [ self.nixosModules.desktopHomeBase ]; imports = [ self.nixosModules.desktopHomeBase ];
@@ -102,15 +166,15 @@ modules = [
`flake.nixosModules.desktopHomeBase` expands `lib.wisdomCatalogExtraModules` plus shared desktop toggles. Host `*Home` modules append per-host `chiasson.home` overrides (and rare inline `home.packages` blocks). `chiasson.users.extraModules` concatenates lists from multiple modules (base + host), so both can set the same user key. `flake.nixosModules.desktopHomeBase` expands `lib.wisdomCatalogExtraModules` plus shared desktop toggles. Host `*Home` modules append per-host `chiasson.home` overrides (and rare inline `home.packages` blocks). `chiasson.users.extraModules` concatenates lists from multiple modules (base + host), so both can set the same user key.
`usersHomeIntegration` turns that into `users.users` + HM. Don't hand-roll catalog users unless you're changing the users module itself. The integration block at the bottom of `modules/system/users.nix` turns the catalog + overrides into `users.users` + HM + inbound SSH. Don't hand-roll catalog users unless you're changing this module.
SSH: `sshInbound` on NixOS, outbound/rbw under `modules/ssh/home-manager/`.
## Adding things ## Adding things
**New NixOS leaf:** export `flake.nixosModules.whatever`, wire from `system/default.nix` or `desktop/default.nix` if it's global, or only from a host `configuration.nix` if it's not. `nix flake check`. Git-add new paths if eval uses the git tree. **New NixOS leaf:** export `flake.nixosModules.whatever`, wire from `system/default.nix` or `desktop/default.nix` if it's global, or only from a host `configuration.nix` if it's not. `nix flake check`. Git-add new paths if eval uses the git tree.
**New HM slice:** add `modules/wisdom/.../foo.nix` exporting `flake.homeManagerModules.wisdomFoo` (import-tree picks it up; `wisdomCatalogExtraModules` includes every `wisdom*` export except `wisdom` / `wisdomShellBash`). Gate packages on `chiasson.home.*.enable`, set `mkDefault true` in `desktop-home-base.nix` if shared, or `enable = true` in a host `home.nix`. Upstream HM deps stay imported unconditionally — use `mkIf` on `cfg.enable` for config (never `config`-dependent `imports`; that recurses). **New HM slice:** add `modules/wisdom/.../foo.nix` exporting `flake.homeManagerModules.wisdomFoo` (import-tree picks it up; `wisdomCatalogExtraModules` includes every `wisdom*` export). Every `wisdom*` slice auto-catalogs — including the bash shell — so the root module no longer manually `imports` it. Gate packages on `chiasson.home.*.enable`, and set the slice's own `enable` default with `mkEnableOption "…" // { default = true/false }` in that same module — defaults live with the option that owns them, not in a shared defaults file. Hosts flip toggles in `home.nix`. Upstream HM deps stay imported unconditionally — use `mkIf` on `cfg.enable` for config (never `config`-dependent `imports`; that recurses).
**Trivial single-package slice:** use `self.lib.wisdomSlice { path = "a.b"; default = true/false; description = "…"; packages = pkgs: [ … ]; }` instead of the `root`/`cfg` + `mkIf (root.enable && cfg.enable)` boilerplate. `packages` is a `pkgs -> [ drv ]` function responsible for its own `availableOn`/platform gating. Several such slices may share one `simple.nix` in their category dir (each still exporting its own `wisdom*` module), rather than one file per slice.
**Derivations:** `let` inside a fragment, or `flake.packages` / `flake.lib` — not a bare `mkDerivation` file import-tree will try to load. **Derivations:** `let` inside a fragment, or `flake.packages` / `flake.lib` — not a bare `mkDerivation` file import-tree will try to load.
Generated
+398 -134
View File
@@ -38,11 +38,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1780452866, "lastModified": 1783991957,
"narHash": "sha256-Fq5cR/qGYcGwOOZf6sShtM+kljwecgntgcKXnIBrQDE=", "narHash": "sha256-QekvkvkOF0iWAV680BcTZYWyW/jiokq7jfIm1wIKIY4=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "344f4065e69455adbcdfb4db1cd8d07a73ae7140", "rev": "dff91dce874c9d517643331eac59bcd6ba29926e",
"revCount": 114, "revCount": 132,
"type": "git", "type": "git",
"url": "https://git.chiasson.cloud/Olivier/cursor-nixos-flake" "url": "https://git.chiasson.cloud/Olivier/cursor-nixos-flake"
}, },
@@ -79,11 +79,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1778679554, "lastModified": 1783265113,
"narHash": "sha256-zoPgnxIlDja91/4TmnCui+Fzc/xU/1jdJFu9bovtOk8=", "narHash": "sha256-Ra65IQsez9QqXcFLp0PJ2f2y4+4X4CAkzmH/x/OXkY8=",
"owner": "AvengeMedia", "owner": "AvengeMedia",
"repo": "dgop", "repo": "dgop",
"rev": "06574b54fa4878a93d8605962d50b13e9528a4ca", "rev": "15d96577fd8950a39bbb40ee9c3ac266be23f5c3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -117,17 +117,17 @@
}, },
"dms": { "dms": {
"inputs": { "inputs": {
"flake-compat": "flake-compat",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ]
"quickshell": "quickshell"
}, },
"locked": { "locked": {
"lastModified": 1777431599, "lastModified": 1783529634,
"narHash": "sha256-g6r/Gx8PTDzO3jCNzzySA+Ff1lmLF9nDlMCNyyoQjoE=", "narHash": "sha256-zdHsPGPE5MVi/y+uIt548XScTfZjQzdF21dME7ISEJM=",
"owner": "AvengeMedia", "owner": "AvengeMedia",
"repo": "DankMaterialShell", "repo": "DankMaterialShell",
"rev": "eb5afcdc40ea5446c27e18552ff4a19f9daf9484", "rev": "bdfd565b72cbb416441a9ab828efcac4fd516c70",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -140,11 +140,11 @@
"dms-plugin-ambient-sound": { "dms-plugin-ambient-sound": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1781888428, "lastModified": 1783948872,
"narHash": "sha256-uHPPeEYc5ix9EIBBsEHlle7QdGDZqv7aG/A/22Y+CSQ=", "narHash": "sha256-C9IBE5k1dQzOVgGRdVpLIP6pvjjVys18CXjymh8PzFc=",
"owner": "hthienloc", "owner": "hthienloc",
"repo": "dms-ambient-sound", "repo": "dms-ambient-sound",
"rev": "5ddf16c151450029d352eedb70d811439c1d51d2", "rev": "3d987f1a39e02e21d0bf9b33b42094367a69f771",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -172,11 +172,11 @@
"dms-plugin-calculator": { "dms-plugin-calculator": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1778511624, "lastModified": 1782146268,
"narHash": "sha256-hiqrO8WkzmWGVlUrzxmffUZBs4t1QM2mMTBUxZqCIyU=", "narHash": "sha256-j8C62+sevr6b+akzVSAqUVysIhb6Vbr8jnWcTXeOtE8=",
"owner": "rochacbruno", "owner": "rochacbruno",
"repo": "DankCalculator", "repo": "DankCalculator",
"rev": "73073d051d08254633f28f89d2609344c8289813", "rev": "1db5865419a40a33171a475855a59e0b8bf7187f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -236,11 +236,11 @@
"dms-plugin-emoji-launcher": { "dms-plugin-emoji-launcher": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1776309741, "lastModified": 1783139331,
"narHash": "sha256-NQ14YenDiNK2VqXQ3z7jAkatbSRtYJHhOhvv7AJlUD8=", "narHash": "sha256-fmIddCvACwO8wbAtLBMtDnEXXQJjb7+o2s4jW3f8VIU=",
"owner": "devnullvoid", "owner": "devnullvoid",
"repo": "dms-emoji-launcher", "repo": "dms-emoji-launcher",
"rev": "1c0a7d337a52b48f9499060076703a35e8dd4f4f", "rev": "8ff394e3ddfcb2fd755ed2e7b4c6f01f3e26e596",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -252,11 +252,11 @@
"dms-plugin-ephemera": { "dms-plugin-ephemera": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1777606672, "lastModified": 1783707727,
"narHash": "sha256-G6oanR4zHbNSV+A94mNcB4EHK+S2ieo4dY8bwUEkv2I=", "narHash": "sha256-+i7rbacYd7gfXcJtFuzV9GoIDSH8JFsf6H2FXPGMRpQ=",
"owner": "nicolasgarcia214", "owner": "nicolasgarcia214",
"repo": "Ephemera", "repo": "Ephemera",
"rev": "eaadf6d933a8449f36219935520a8e9f944b4aa0", "rev": "172783fccb37e99756f999daa737ced42aeefe4e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -268,11 +268,11 @@
"dms-plugin-home-assistant": { "dms-plugin-home-assistant": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1780998572, "lastModified": 1783907889,
"narHash": "sha256-YScGw1b4OHX3s7f+JUCoCuK+BcWGDLgpYxgSI+N3EPI=", "narHash": "sha256-woLXMu5/t/mADIG1svWNifuo3ypZMJ94ee44+kBCXK4=",
"owner": "xxyangyoulin", "owner": "xxyangyoulin",
"repo": "dms-plugin-hass", "repo": "dms-plugin-hass",
"rev": "0d3cd45f6a094582db5f9209b3dc1f72c1cfb067", "rev": "3cef9b5a66f2d2010ee5e2fe49456b0aed32c003",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -300,11 +300,11 @@
"dms-plugin-ocr-scanner": { "dms-plugin-ocr-scanner": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1781670158, "lastModified": 1782019482,
"narHash": "sha256-n0oe+K1zUqCfEMyvtz+CYiZ+lBQv/Piqb19J/Cwqua4=", "narHash": "sha256-9BNQl7oP5n3vJiBgdXaHsUewkJnJiiHCvSID1tWCeKk=",
"owner": "hthienloc", "owner": "hthienloc",
"repo": "dms-ocr-scanner", "repo": "dms-ocr-scanner",
"rev": "dd94a72c2fc11fcca10bd8edb59803734c2154f5", "rev": "268a7fca154edaf2f05ed12700fa968a0f8b75bc",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -316,11 +316,11 @@
"dms-plugin-official": { "dms-plugin-official": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1780332225, "lastModified": 1783532508,
"narHash": "sha256-QkQPqP7Wmo5DLRyKNSY5NuOau4LSaSfz3DYdHDLxluA=", "narHash": "sha256-17qZKvH0FDQEdX07HEfUjLLvOUEHGmXMVZ0zRtKoTZA=",
"owner": "AvengeMedia", "owner": "AvengeMedia",
"repo": "dms-plugins", "repo": "dms-plugins",
"rev": "f4583449f12920e0a2f16808b00a860c27f0173d", "rev": "5e4038806d8f4ca1fcfd1116c211cc9f1e36a074",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -364,11 +364,11 @@
"dms-plugin-wallpaper-carousel": { "dms-plugin-wallpaper-carousel": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1779087303, "lastModified": 1782824647,
"narHash": "sha256-/0t6ykbirNgSB2gY1wpq8jbntnuUgME+kLDfwjLhfRg=", "narHash": "sha256-t70CBhiEBYHa9HvPpCZnfA8eCOWhUlXc6SUa9VprFNE=",
"owner": "motor-dev", "owner": "motor-dev",
"repo": "wallpaperCarousel", "repo": "wallpaperCarousel",
"rev": "bca1f457763d51c8001f8edcc89df3e619420163", "rev": "c08fbb92c39d4d778bb08e520cfd96e395594440",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -380,11 +380,11 @@
"dms-plugin-web-search": { "dms-plugin-web-search": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1773893074, "lastModified": 1783139331,
"narHash": "sha256-c6mVBTlkJdfvMuMvPjXGeOEWBtb0mdmIcPNzgmMxGwE=", "narHash": "sha256-UqFgAjW2A75dtlvOZkq4Vv/v/DROoc/ouCXBaVlksPI=",
"owner": "devnullvoid", "owner": "devnullvoid",
"repo": "dms-web-search", "repo": "dms-web-search",
"rev": "52f9ec482dc86d9c5ff0110a5d57401112191a38", "rev": "821f5b437ea96739ce1cbc85ce324fb55e8884bb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -396,11 +396,11 @@
"dms-plugin-widget-group": { "dms-plugin-widget-group": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1781887621, "lastModified": 1782507283,
"narHash": "sha256-3uMtYcR4/drkAbjAopxWaNCeGv1PpwovPhq4OnU866s=", "narHash": "sha256-+ApvThHcyP5Ivd+5nDrkZpKyoq9N1Aet+AJNKBPWfmY=",
"owner": "rdannenbring", "owner": "rdannenbring",
"repo": "widget-group", "repo": "widget-group",
"rev": "a82424ffdaddda90fcfe8d571d902c22fb894bb2", "rev": "cd748fb105375629bf32378c7d05d10e50c51281",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -426,6 +426,22 @@
} }
}, },
"flake-compat": { "flake-compat": {
"flake": false,
"locked": {
"lastModified": 1767039857,
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
"owner": "NixOS",
"repo": "flake-compat",
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"locked": { "locked": {
"lastModified": 1733328505, "lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
@@ -439,7 +455,7 @@
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
} }
}, },
"flake-compat_2": { "flake-compat_3": {
"locked": { "locked": {
"lastModified": 1767039857, "lastModified": 1767039857,
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
@@ -459,11 +475,11 @@
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1778716662, "lastModified": 1782949081,
"narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=", "narHash": "sha256-vp6Y/Grm98ESt6ceOkWiHWyZRDV3J1RID4w+6NWK9yA=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb", "rev": "17c9d6cdfc60c64f4ee8d306f9bc0b4ccb51481e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -473,6 +489,27 @@
} }
}, },
"flake-parts_2": { "flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"hermes",
"nixpkgs"
]
},
"locked": {
"lastModified": 1772408722,
"narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_3": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib_2" "nixpkgs-lib": "nixpkgs-lib_2"
}, },
@@ -490,7 +527,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts_3": { "flake-parts_4": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"navi", "navi",
@@ -512,16 +549,20 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts_4": { "flake-parts_5": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib_3" "nixpkgs-lib": [
"navi",
"tofunix",
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1778716662, "lastModified": 1736143030,
"narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=", "narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb", "rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -530,7 +571,25 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts_5": { "flake-parts_6": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_3"
},
"locked": {
"lastModified": 1782949081,
"narHash": "sha256-vp6Y/Grm98ESt6ceOkWiHWyZRDV3J1RID4w+6NWK9yA=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "17c9d6cdfc60c64f4ee8d306f9bc0b4ccb51481e",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_7": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"nur", "nur",
@@ -553,7 +612,7 @@
}, },
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1731533236, "lastModified": 1731533236,
@@ -571,7 +630,7 @@
}, },
"flake-utils_2": { "flake-utils_2": {
"inputs": { "inputs": {
"systems": "systems_3" "systems": "systems_4"
}, },
"locked": { "locked": {
"lastModified": 1731533236, "lastModified": 1731533236,
@@ -587,6 +646,29 @@
"type": "github" "type": "github"
} }
}, },
"hermes": {
"inputs": {
"flake-parts": "flake-parts_2",
"nixpkgs": "nixpkgs",
"npm-lockfile-fix": "npm-lockfile-fix",
"pyproject-build-systems": "pyproject-build-systems",
"pyproject-nix": "pyproject-nix",
"uv2nix": "uv2nix"
},
"locked": {
"lastModified": 1783989509,
"narHash": "sha256-UwiWbdWHCoHyvsqAdOmKMOfvkMwDAcVqmH7zJGPcJ3g=",
"owner": "NousResearch",
"repo": "hermes-agent",
"rev": "b663d50a6a0101d5214112b24ffe20924af32beb",
"type": "github"
},
"original": {
"owner": "NousResearch",
"repo": "hermes-agent",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -594,11 +676,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1780679734, "lastModified": 1783963347,
"narHash": "sha256-KmRNvpNOb7QEORa06bVgjW9kITcx0VhsI7w0vhmZyD8=", "narHash": "sha256-r376E2XpakiXwModDHIxlvB6qLq4iFVEq730vxOO4JY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "b2b7db486e06e098711dc291bb25db82850e1d16", "rev": "a45a7c451455a51ae740ec3bce4024b312809c29",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -615,11 +697,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1780515920, "lastModified": 1782839684,
"narHash": "sha256-8KX2hEeOX6KP3hBBJJI8dGWVrzbOOf1rBPmg/GUG24U=", "narHash": "sha256-vzs4SBgPsK4aNzlJR2PpFwtARazXMOxZonQnDz0YHxk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "4c5c1e8ba14f1c7475fa31ff11bc1c19cd220974", "rev": "2a37d71bbe69e1522ddabf03a4cea0374958bdbe",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -643,14 +725,30 @@
"type": "github" "type": "github"
} }
}, },
"mediatek-mt7927-dkms": {
"flake": false,
"locked": {
"lastModified": 1783265495,
"narHash": "sha256-GXbwhZbvfWE+w9TgMReAsAFL/WkbCokzEiIChmX2d00=",
"owner": "jetm",
"repo": "mediatek-mt7927-dkms",
"rev": "ad1f3e4d19fe540aaa1f449ddba86c65db9bfc82",
"type": "github"
},
"original": {
"owner": "jetm",
"repo": "mediatek-mt7927-dkms",
"type": "github"
}
},
"mobile-nixos": { "mobile-nixos": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1772289954, "lastModified": 1783912271,
"narHash": "sha256-iDdtwk/dFb6AsXMtcOpZixxXl6C1HNUPe6cglxxHO7M=", "narHash": "sha256-CzwmiKxuh1u+H8hDnrVeUl/fL59PvsgLbr2l0FhqWK0=",
"owner": "mobile-nixos", "owner": "mobile-nixos",
"repo": "mobile-nixos", "repo": "mobile-nixos",
"rev": "1a9e0af79dc7b5e29ed772f1a8a76fcbd9d45fdf", "rev": "2c132754323fc1915e8d21dcfc0ef68ab084c6fb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -659,21 +757,41 @@
"type": "github" "type": "github"
} }
}, },
"mt7927": {
"inputs": {
"mediatek-mt7927-dkms": "mediatek-mt7927-dkms",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1784045889,
"narHash": "sha256-ObYysms1WamPJPdVgrIdCLW/+YXHSewjPlhYmmPJJtM=",
"owner": "cmspam",
"repo": "mt7927-nixos",
"rev": "90d453fe6ee8166a83e924131a5da9962e751c03",
"type": "github"
},
"original": {
"owner": "cmspam",
"repo": "mt7927-nixos",
"type": "github"
}
},
"navi": { "navi": {
"inputs": { "inputs": {
"crane": "crane", "crane": "crane",
"flake-parts": "flake-parts_2", "flake-parts": "flake-parts_3",
"nix-github-actions": "nix-github-actions", "nix-github-actions": "nix-github-actions",
"nixos-anywhere": "nixos-anywhere", "nixos-anywhere": "nixos-anywhere",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs_3",
"stable": "stable" "stable": "stable",
"tofunix": "tofunix"
}, },
"locked": { "locked": {
"lastModified": 1777283737, "lastModified": 1783089845,
"narHash": "sha256-sVwTOYwxzUUqAEr5kjOZooJ/v8H2hcuZ42f17MgCqX8=", "narHash": "sha256-KwjncG/BgYouGBDyTSaIKc5Qs/81y6aCOb/uS6nWemw=",
"owner": "cafkafk", "owner": "cafkafk",
"repo": "navi", "repo": "navi",
"rev": "b060683e4ca2bd37a1c3bcb4e04abd2296190e9d", "rev": "120d278511ea610b4e29c62a3e72673f90702d18",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -743,19 +861,19 @@
}, },
"nixcord": { "nixcord": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat_2",
"flake-parts": "flake-parts_4", "flake-parts": "flake-parts_6",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"nixpkgs-nixcord": "nixpkgs-nixcord" "nixpkgs-nixcord": "nixpkgs-nixcord"
}, },
"locked": { "locked": {
"lastModified": 1780751320, "lastModified": 1783966657,
"narHash": "sha256-3PlWrZkSwElqYHMnWi4d0A+GxlvCXk0JaMsTGghmQGE=", "narHash": "sha256-3UpTBZgZa/GhBALXqk5hfVsVhcFGERqjb3W2BuaD4sc=",
"owner": "KaylorBen", "owner": "KaylorBen",
"repo": "nixcord", "repo": "nixcord",
"rev": "2b70dbed679d2705696deb36f0778c9ef9f1ded2", "rev": "0fd2e5db348f04e65447a773ddf55eb5b4e0b64d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -767,7 +885,7 @@
"nixos-anywhere": { "nixos-anywhere": {
"inputs": { "inputs": {
"disko": "disko", "disko": "disko",
"flake-parts": "flake-parts_3", "flake-parts": "flake-parts_4",
"nix-vm-test": "nix-vm-test", "nix-vm-test": "nix-vm-test",
"nixos-images": "nixos-images", "nixos-images": "nixos-images",
"nixos-stable": "nixos-stable", "nixos-stable": "nixos-stable",
@@ -848,18 +966,18 @@
"nixos-raspberrypi": { "nixos-raspberrypi": {
"inputs": { "inputs": {
"argononed": "argononed", "argononed": "argononed",
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_3",
"nixos-images": "nixos-images_2", "nixos-images": "nixos-images_2",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1779023229, "lastModified": 1783459375,
"narHash": "sha256-MInilg7B/06c34SwOuGSBho4l0H1EZcmvxTkSWCs5pE=", "narHash": "sha256-S2pb+Mtv0qTeRr+6J5ESgelNjG2YKl4WqKjdPrJx5rM=",
"owner": "nvmd", "owner": "nvmd",
"repo": "nixos-raspberrypi", "repo": "nixos-raspberrypi",
"rev": "06c6e3513e1ee64b651913193fc6ac38aa4963f5", "rev": "c845922f260b306d4529a4535bbb6e7f8cfe2887",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -887,11 +1005,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1750134718, "lastModified": 1775036866,
"narHash": "sha256-v263g4GbxXv87hMXMCpjkIxd/viIF7p3JpJrwgKdNiI=", "narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9e83b64f727c88a7711a2c463a7b16eedb69a84c", "rev": "6201e203d09599479a3b3450ed24fa81537ebc4e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -903,11 +1021,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": {
@@ -933,11 +1051,11 @@
}, },
"nixpkgs-lib_3": { "nixpkgs-lib_3": {
"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": {
@@ -948,11 +1066,11 @@
}, },
"nixpkgs-nixcord": { "nixpkgs-nixcord": {
"locked": { "locked": {
"lastModified": 1780453794, "lastModified": 1782999065,
"narHash": "sha256-bXMRa9VTsHSPXL4Cw8R6JJLQeY3Y/IP4+YJCYVmQ7FY=", "narHash": "sha256-5Dgj5+pIQYZKrXUGaLCk7CKfN3MmpwIhO94++WVxvng=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6b316287bae2ee04c9b93c8c858d930fd07d7338", "rev": "80d591ed473cfc46329932c2aadac9b435342c7c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -964,11 +1082,43 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1780243769, "lastModified": 1784007870,
"narHash": "sha256-x5UQuRsH3MqI0U9afaXSNqzTPSeZlRLvFAav2Ux1pNw=", "narHash": "sha256-djcLt/JJphyNt4eDY9XTly+/WbCK5lqWq9lSgCmJkkQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "18b9261cb3294b6d2a06d03f96872827b8fe2698",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1750134718,
"narHash": "sha256-v263g4GbxXv87hMXMCpjkIxd/viIF7p3JpJrwgKdNiI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9e83b64f727c88a7711a2c463a7b16eedb69a84c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1784007870,
"narHash": "sha256-djcLt/JJphyNt4eDY9XTly+/WbCK5lqWq9lSgCmJkkQ=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "331800de5053fcebacf6813adb5db9c9dca22a0c", "rev": "18b9261cb3294b6d2a06d03f96872827b8fe2698",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -978,7 +1128,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_3": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1780336545, "lastModified": 1780336545,
"narHash": "sha256-vhVhuXzFrIOfcssC/9hDHx7MHzDKjF3keHuREOQqQiQ=", "narHash": "sha256-vhVhuXzFrIOfcssC/9hDHx7MHzDKjF3keHuREOQqQiQ=",
@@ -1013,19 +1163,40 @@
"url": "https://flakehub.com/f/AshleyYakeley/NixVirt/%2A.tar.gz" "url": "https://flakehub.com/f/AshleyYakeley/NixVirt/%2A.tar.gz"
} }
}, },
"npm-lockfile-fix": {
"inputs": {
"nixpkgs": [
"hermes",
"nixpkgs"
]
},
"locked": {
"lastModified": 1775903712,
"narHash": "sha256-2GV79U6iVH4gKAPWYrxUReB0S41ty/Y3dBLquU8AlaA=",
"owner": "jeslie0",
"repo": "npm-lockfile-fix",
"rev": "c6093acb0c0548e0f9b8b3d82918823721930fe8",
"type": "github"
},
"original": {
"owner": "jeslie0",
"repo": "npm-lockfile-fix",
"type": "github"
}
},
"nur": { "nur": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_5", "flake-parts": "flake-parts_7",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1780771425, "lastModified": 1783991529,
"narHash": "sha256-qxX2a/MnwrIkMUZ7nLafJkDvaDaLLsPRC0NK2VXW+sc=", "narHash": "sha256-fHexrPkcBAX/4uFGF31MSBLglZqVFZkPXOn9M/ywoZ8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "a144829f0faf14576d4faa88a42cd62bebb7428b", "rev": "cc8dbe7122d71b860dc7e9e303d98dae5895e424",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1066,11 +1237,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1779906441, "lastModified": 1780803198,
"narHash": "sha256-py8KJJMi4awjZHi5FWBPYfbRPvk3Rg9SeFkPJydsG2E=", "narHash": "sha256-H7wxhe9HJKUvPSDuBKHh/COx+YTZDaQlb6g8b+ZGtE8=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "339a9ba1ef79dc9976af77f1fea0302de8a696d0", "rev": "46fe1e10e650e078799d0a35ffc05a5bba0733ed",
"revCount": 16, "revCount": 17,
"type": "git", "type": "git",
"url": "https://git.chiasson.cloud/Olivier/Personal-Website" "url": "https://git.chiasson.cloud/Olivier/Personal-Website"
}, },
@@ -1079,26 +1250,54 @@
"url": "https://git.chiasson.cloud/Olivier/Personal-Website" "url": "https://git.chiasson.cloud/Olivier/Personal-Website"
} }
}, },
"quickshell": { "pyproject-build-systems": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"dms", "hermes",
"nixpkgs"
],
"pyproject-nix": [
"hermes",
"pyproject-nix"
],
"uv2nix": [
"hermes",
"uv2nix"
]
},
"locked": {
"lastModified": 1772555609,
"narHash": "sha256-3BA3HnUvJSbHJAlJj6XSy0Jmu7RyP2gyB/0fL7XuEDo=",
"owner": "pyproject-nix",
"repo": "build-system-pkgs",
"rev": "c37f66a953535c394244888598947679af231863",
"type": "github"
},
"original": {
"owner": "pyproject-nix",
"repo": "build-system-pkgs",
"type": "github"
}
},
"pyproject-nix": {
"inputs": {
"nixpkgs": [
"hermes",
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1776854048, "lastModified": 1772865871,
"narHash": "sha256-lLbV66V3RMNp1l8/UelmR4YzoJ5ONtgvEtiUMJATH/o=", "narHash": "sha256-/ZTSg97aouL0SlPHaokA4r3iuH9QzHVuWPACD2CUCFY=",
"ref": "refs/heads/master", "owner": "pyproject-nix",
"rev": "783c953987dc56ff0601abe6845ed96f1d00495a", "repo": "pyproject.nix",
"revCount": 806, "rev": "e537db02e72d553cea470976b9733581bcf5b3ed",
"type": "git", "type": "github"
"url": "https://git.outfoxxed.me/quickshell/quickshell"
}, },
"original": { "original": {
"rev": "783c953987dc56ff0601abe6845ed96f1d00495a", "owner": "pyproject-nix",
"type": "git", "repo": "pyproject.nix",
"url": "https://git.outfoxxed.me/quickshell/quickshell" "type": "github"
} }
}, },
"root": { "root": {
@@ -1126,14 +1325,16 @@
"dms-plugin-widget-group": "dms-plugin-widget-group", "dms-plugin-widget-group": "dms-plugin-widget-group",
"dms-plugin-wvkbd-toggle": "dms-plugin-wvkbd-toggle", "dms-plugin-wvkbd-toggle": "dms-plugin-wvkbd-toggle",
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"hermes": "hermes",
"home-manager": "home-manager", "home-manager": "home-manager",
"import-tree": "import-tree", "import-tree": "import-tree",
"mobile-nixos": "mobile-nixos", "mobile-nixos": "mobile-nixos",
"mt7927": "mt7927",
"navi": "navi", "navi": "navi",
"nix-monitor": "nix-monitor", "nix-monitor": "nix-monitor",
"nixcord": "nixcord", "nixcord": "nixcord",
"nixos-raspberrypi": "nixos-raspberrypi", "nixos-raspberrypi": "nixos-raspberrypi",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_4",
"nixvirt": "nixvirt", "nixvirt": "nixvirt",
"nur": "nur", "nur": "nur",
"oom-hardware": "oom-hardware", "oom-hardware": "oom-hardware",
@@ -1155,11 +1356,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1780547341, "lastModified": 1783174389,
"narHash": "sha256-Gq8KNx5A7hBB3uGJaj6eQfLDIz5YdLu92gqBcvHvoUo=", "narHash": "sha256-aCWC8ngycU7OdJrU2+Je3qf+1a2ykuBvpPhZT/9tXMc=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "9ed65852b6257fbeae4355bc24ecfea307ca759a", "rev": "f1406619a3884cd5c47992a70b8b35c9c0fcb4c9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1173,14 +1374,14 @@
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"systems": "systems_2" "systems": "systems_3"
}, },
"locked": { "locked": {
"lastModified": 1780422259, "lastModified": 1783838433,
"narHash": "sha256-dWGk4SEdI189kQW5cE4Uo1Mc+P+kQEdgMcyMgTtmQOA=", "narHash": "sha256-Zb8+v76qSPYDlUea1y30YzgdEoDjA97vRmeqfPAqwZs=",
"owner": "Gerg-L", "owner": "Gerg-L",
"repo": "spicetify-nix", "repo": "spicetify-nix",
"rev": "8414bbf2fcc7bc0a22c675e498e3c7365c1aec0a", "rev": "c6ab7371e40abd405313af9bddafd5f37cc94f83",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1271,6 +1472,21 @@
"type": "github" "type": "github"
} }
}, },
"systems_4": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"t2fanrd": { "t2fanrd": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -1294,11 +1510,11 @@
"t2linux-patches": { "t2linux-patches": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1779914035, "lastModified": 1783622056,
"narHash": "sha256-VsHuI2CbQ8gFplW+51gUJvCqo1Ts10Ueks9aTtkAOiw=", "narHash": "sha256-Sx0ZzYLDPs1DswThy8rWfNcS05ilHcP0DXz8nO6+FOc=",
"owner": "t2linux", "owner": "t2linux",
"repo": "linux-t2-patches", "repo": "linux-t2-patches",
"rev": "7ee7d19c38e5df31a386b2a0c35ca8f064003960", "rev": "b3fac289b2e46797c6e403078df1567214920324",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1307,6 +1523,29 @@
"type": "github" "type": "github"
} }
}, },
"tofunix": {
"inputs": {
"flake-parts": "flake-parts_5",
"nixpkgs": [
"navi",
"nixpkgs"
],
"systems": "systems"
},
"locked": {
"lastModified": 1769620829,
"narHash": "sha256-OGZn7OKNm3wuLvtynXAk5C1GUd0jKHyfirhkbdbMIgo=",
"owner": "cafkafk",
"repo": "tofunix",
"rev": "472fe73ec92e3c21c470361d7531c67c4ced2861",
"type": "github"
},
"original": {
"owner": "cafkafk",
"repo": "tofunix",
"type": "github"
}
},
"treefmt-nix": { "treefmt-nix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -1329,6 +1568,31 @@
"type": "github" "type": "github"
} }
}, },
"uv2nix": {
"inputs": {
"nixpkgs": [
"hermes",
"nixpkgs"
],
"pyproject-nix": [
"hermes",
"pyproject-nix"
]
},
"locked": {
"lastModified": 1773039484,
"narHash": "sha256-+boo33KYkJDw9KItpeEXXv8+65f7hHv/earxpcyzQ0I=",
"owner": "pyproject-nix",
"repo": "uv2nix",
"rev": "b68be7cfeacbed9a3fa38a2b5adc0cfb81d9bb1f",
"type": "github"
},
"original": {
"owner": "pyproject-nix",
"repo": "uv2nix",
"type": "github"
}
},
"wallpapers": { "wallpapers": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -1347,14 +1611,14 @@
}, },
"wrapper-modules": { "wrapper-modules": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_5"
}, },
"locked": { "locked": {
"lastModified": 1780661205, "lastModified": 1782135443,
"narHash": "sha256-3F5DixT3Gk91lBI9E+TGMm0ko5HrRbDiL23di16TJGA=", "narHash": "sha256-vAmbArdCyjqpVW+37aCy/PMBOLIqukUXLQuEKLwUhA4=",
"owner": "BirdeeHub", "owner": "BirdeeHub",
"repo": "nix-wrapper-modules", "repo": "nix-wrapper-modules",
"rev": "8dd304c3582ddd339217e1cc5fb53f50acb63c2d", "rev": "6e7f66fa2cdf4d63162580b438f7fcf87c28a46f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1371,11 +1635,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1780567926, "lastModified": 1783982026,
"narHash": "sha256-LVaiAnBwgr2YotaIlrcwCgmbwHsE2ccegRztLjur/d4=", "narHash": "sha256-tFP35Y/BDWkDwFVoCab0gN00yKjGJU/IWpVxl68tGEI=",
"owner": "0xc000022070", "owner": "0xc000022070",
"repo": "zen-browser-flake", "repo": "zen-browser-flake",
"rev": "eea9ae34eb9011aee9b8ce8ee2bc2dd111ee8285", "rev": "8cbde27feab69507f13a41a01ee45c2b632a8f43",
"type": "github" "type": "github"
}, },
"original": { "original": {
+9 -10
View File
@@ -200,6 +200,12 @@
url = "https://flakehub.com/f/AshleyYakeley/NixVirt/*.tar.gz"; url = "https://flakehub.com/f/AshleyYakeley/NixVirt/*.tar.gz";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
hermes = {
url = "github:NousResearch/hermes-agent";
};
mt7927 = {
url = "github:cmspam/mt7927-nixos";
};
}; };
outputs = inputs: outputs = inputs:
@@ -207,18 +213,11 @@
lib = inputs.nixpkgs.lib; lib = inputs.nixpkgs.lib;
# import-tree default: only .nix, skip paths with /_/ (see # import-tree default: only .nix, skip paths with /_/ (see
# https://import-tree.oeiuwq.com/guides/filtering/ ). filterNot composes AND with that. # https://import-tree.oeiuwq.com/guides/filtering/ ). filterNot composes AND with that.
# Skip /package/, /packages/, and dms/home-manager/ (callPackage + DMS HM colocation). # Skip /package/ and /packages/ (callPackage colocation).
# Avoid a global "/home-manager/" filter — it would drop modules/ssh/home-manager/. # Avoid a global "/home-manager/" filter — it would drop modules/ssh/home-manager/.
modulesTree = modulesTree = lib.pipe inputs.import-tree [
lib.pipe inputs.import-tree [
(it: it.withLib lib) (it: it.withLib lib)
(it: (it: it.filterNot (p: lib.hasInfix "/package/" p || lib.hasInfix "/packages/" p))
it.filterNot (
p:
lib.hasInfix "/package/" p
|| lib.hasInfix "/packages/" p
|| lib.hasInfix "dms/home-manager/" p
))
(it: it ./modules) (it: it ./modules)
]; ];
in in
+33 -2
View File
@@ -93,14 +93,45 @@ let
// lib.optionalAttrs (name == "nix-server") { // lib.optionalAttrs (name == "nix-server") {
targetPort = 22; targetPort = 22;
} }
) ssh.activeHosts; ) ssh.activeHosts /* nix-deploy target list IPs only */;
metaNixpkgs = import inputs.nixpkgs { metaNixpkgs = import inputs.nixpkgs {
system = "x86_64-linux"; system = "x86_64-linux";
}; };
# Build a raw Navi hive attrset from host specs + deployment targets.
# `inputs.navi.lib.makeHive` turns the result into `flake.naviHive`.
mkNaviHiveConfig =
{
metaNixpkgs,
hostSpecs,
deployments,
}:
let
deployNodes = lib.filterAttrs (name: _: deployments ? ${name}) hostSpecs;
in in
{ {
flake.navi = self.lib.mkNaviHiveConfig { meta = {
nixpkgs = metaNixpkgs;
nodeNixpkgs = lib.mapAttrs (
name: spec:
import inputs.nixpkgs {
system = spec.system;
}
) deployNodes;
nodeSpecialArgs = lib.mapAttrs (_: spec: spec.specialArgs) deployNodes;
allowApplyAll = false;
};
}
// lib.mapAttrs (
name: spec:
{
imports = spec.modules or [ spec.configuration ];
deployment = deployments.${name};
}
) deployNodes;
in
{
flake.navi = mkNaviHiveConfig {
inherit metaNixpkgs hostSpecs deployments; inherit metaNixpkgs hostSpecs deployments;
}; };
+10 -12
View File
@@ -1,6 +1,6 @@
{ ... }: { { ... }: {
flake.lib.hyprlandBinds = flake.lib.hyprlandBinds =
{ lib, dmsEnabled ? false }: { lib, dmsEnabled ? false, dmsIpcBinds }:
let let
workspaceBinds = workspaceBinds =
(builtins.map (i: "Super, ${toString i}, workspace, ${toString i}") (builtins.genList (n: n + 1) 9)) (builtins.map (i: "Super, ${toString i}, workspace, ${toString i}") (builtins.genList (n: n + 1) 9))
@@ -28,17 +28,15 @@
"Super, Equal, splitratio, 0.1" "Super, Equal, splitratio, 0.1"
"AltSuper, Space, togglefloating" "AltSuper, Space, togglefloating"
"Super, P, pin" "Super, P, pin"
] ] ++ lib.optionals dmsEnabled [
++ lib.optionals dmsEnabled [ "Super, Space, exec, ${dmsIpcBinds.spotlight}"
"Super, Space, exec, dms ipc call spotlight toggle" "Super, I, exec, ${dmsIpcBinds.settingsFocus}"
"Super, I, exec, dms ipc call settings focusOrToggle" "Super, N, exec, ${dmsIpcBinds.notepad}"
"Super, N, exec, dms ipc call notepad toggle" "ShiftSuper, N, exec, ${dmsIpcBinds.notifications}"
"ShiftSuper, N, exec, dms ipc call notifications toggle" "Super, M, exec, ${dmsIpcBinds.processlistFocus}"
"Super, M, exec, dms ipc call processlist focusOrToggle" "Super, L, exec, ${dmsIpcBinds.lock}"
"Super, L, exec, dms ipc call lock lock" "ShiftSuper, V, exec, ${dmsIpcBinds.clipboard}"
"ShiftSuper, V, exec, dms ipc call clipboard toggle" ] ++ [
]
++ [
"Super, Tab, cyclenext" "Super, Tab, cyclenext"
"Super, Tab, bringactivetotop" "Super, Tab, bringactivetotop"
"Super, left, movefocus, l" "Super, left, movefocus, l"
+4 -1
View File
@@ -101,7 +101,10 @@
"sleep 1 && hyprctl reload" "sleep 1 && hyprctl reload"
]; ];
} }
(self.lib.hyprlandBinds { inherit lib dmsEnabled; }) (self.lib.hyprlandBinds {
inherit lib dmsEnabled;
dmsIpcBinds = self.lib.dmsIpcBinds;
})
{ {
decoration = { decoration = {
rounding = 10; rounding = 10;
+11 -11
View File
@@ -1,6 +1,6 @@
{ ... }: { { ... }: {
flake.lib.niriBinds = flake.lib.niriBinds =
{ pkgs, dmsEnabled ? false }: { pkgs, dmsEnabled ? false, dmsIpcBinds }:
let let
lib = pkgs.lib; lib = pkgs.lib;
in in
@@ -12,16 +12,16 @@
"Mod+E"."spawn-sh" = "nemo"; "Mod+E"."spawn-sh" = "nemo";
} }
// lib.optionalAttrs dmsEnabled { // lib.optionalAttrs dmsEnabled {
"Mod+Space"."spawn-sh" = "dms ipc call spotlight toggle"; "Mod+Space"."spawn-sh" = dmsIpcBinds.spotlight;
"Mod+V"."spawn-sh" = "dms ipc call clipboard toggle"; "Mod+V"."spawn-sh" = dmsIpcBinds.clipboard;
"Mod+N"."spawn-sh" = "dms ipc call notepad toggle"; "Mod+N"."spawn-sh" = dmsIpcBinds.notepad;
"Mod+Shift+N"."spawn-sh" = "dms ipc call notifications toggle"; "Mod+Shift+N"."spawn-sh" = dmsIpcBinds.notifications;
"Mod+M"."spawn-sh" = "dms ipc call processlist toggle"; "Mod+M"."spawn-sh" = dmsIpcBinds.processlist;
"Mod+B"."spawn-sh" = ''dms ipc call bar toggle name "Main Bar"; dms ipc call bar toggle name "Bar 2"''; "Mod+B"."spawn-sh" = dmsIpcBinds.barToggle;
"Mod+Shift+B"."spawn-sh" = ''dms ipc call bar toggle name "Bar 2"''; "Mod+Shift+B"."spawn-sh" = dmsIpcBinds.barToggleBar2;
"Mod+A"."spawn-sh" = "dms ipc call ephemera toggle"; "Mod+A"."spawn-sh" = dmsIpcBinds.ephemera;
"Mod+numbersign"."spawn-sh" = "dms ipc call wallpaperCarousel toggle"; "Mod+numbersign"."spawn-sh" = dmsIpcBinds.wallpaperCarousel;
"Mod+L"."spawn-sh" = "dms ipc call lock lock"; "Mod+L"."spawn-sh" = dmsIpcBinds.lock;
} }
// { // {
"Mod+Q"."close-window" = _: { }; "Mod+Q"."close-window" = _: { };
+4 -1
View File
@@ -21,7 +21,10 @@
niriBaseSettings = niriBaseSettings =
pkgs: dmsEnabled: pkgs: dmsEnabled:
self.lib.niriBaseSettings pkgs // { self.lib.niriBaseSettings pkgs // {
binds = self.lib.niriBinds { inherit pkgs dmsEnabled; }; binds = self.lib.niriBinds {
inherit pkgs dmsEnabled;
dmsIpcBinds = self.lib.dmsIpcBinds;
};
}; };
mergeNiriSettings = mergeNiriSettings =
+53 -12
View File
@@ -1,4 +1,38 @@
{ ... }: { { lib, ... }:
{
flake.lib.wisdomCatalogExtraModules =
self:
let
names = lib.sort builtins.lessThan (
lib.filter (n: lib.hasPrefix "wisdom" n && n != "wisdom") (
builtins.attrNames self.homeManagerModules
)
);
in
map (name: self.homeManagerModules.${name}) names;
flake.lib.wisdomSlice =
{ path, default, description, packages }:
{ config, lib, pkgs, ... }:
let
segs = lib.splitString "." path;
optPath = [
"chiasson"
"home"
]
++ segs
++ [ "enable" ];
root = config.chiasson.home;
cfg = lib.getAttrFromPath segs root;
enabled = lib.getAttrFromPath optPath config;
in
{
options = lib.setAttrByPath optPath (lib.mkEnableOption description // { inherit default; });
config = lib.mkIf (root.enable && enabled) {
home.packages = lib.filter (lib.meta.availableOn pkgs.stdenv.hostPlatform) (packages pkgs);
};
};
flake.nixosModules.desktopOptions = flake.nixosModules.desktopOptions =
{ config, options, lib, pkgs, self, inputs, ... }: { config, options, lib, pkgs, self, inputs, ... }:
let let
@@ -34,11 +68,13 @@
{ {
options.chiasson.desktop = { options.chiasson.desktop = {
defaultSession = lib.mkOption { defaultSession = lib.mkOption {
type = lib.types.nullOr (lib.types.enum [ type = lib.types.nullOr (
lib.types.enum [
"hyprland" "hyprland"
"niri" "niri"
"plasma" "plasma"
]); ]
);
default = null; default = null;
example = "niri"; example = "niri";
description = '' description = ''
@@ -56,10 +92,12 @@
displayManager = { displayManager = {
variant = lib.mkOption { variant = lib.mkOption {
type = lib.types.nullOr (lib.types.enum [ type = lib.types.nullOr (
lib.types.enum [
"sddm" "sddm"
"dankgreeter" "dankgreeter"
]); ]
);
default = null; default = null;
description = '' description = ''
SDDM vs DankGreeter (greetd + DMS [docs](https://danklinux.com/docs/dankgreeter/nixos-flake)). SDDM vs DankGreeter (greetd + DMS [docs](https://danklinux.com/docs/dankgreeter/nixos-flake)).
@@ -80,9 +118,11 @@
}; };
displayManager.sddm = { displayManager.sddm = {
wayland.enable = lib.mkEnableOption '' wayland.enable =
lib.mkEnableOption ''
SDDM greeter on Wayland (nicer on HiDPI; turn off if the greeter glitches on your GPU). SDDM greeter on Wayland (nicer on HiDPI; turn off if the greeter glitches on your GPU).
'' // { ''
// {
default = true; default = true;
}; };
@@ -159,10 +199,12 @@
}; };
keyring = { keyring = {
enable = lib.mkEnableOption '' enable =
lib.mkEnableOption ''
gnome-keyring + pam (login + sddm or greetd) + HM user service + `gcr` + `services.xserver.updateDbusEnvironment`. gnome-keyring + pam (login + sddm or greetd) + HM user service + `gcr` + `services.xserver.updateDbusEnvironment`.
niri/hyprland: `dbus-update-activation-environment` at compositor start so libsecret/Electron see `WAYLAND_DISPLAY`. niri/hyprland: `dbus-update-activation-environment` at compositor start so libsecret/Electron see `WAYLAND_DISPLAY`.
'' // { ''
// {
default = true; default = true;
}; };
}; };
@@ -184,8 +226,7 @@
message = "chiasson.desktop.defaultSession = \"plasma\" requires chiasson.desktop.plasma.enable = true."; message = "chiasson.desktop.defaultSession = \"plasma\" requires chiasson.desktop.plasma.enable = true.";
} }
{ {
assertion = assertion = cfg.displayManager.variant != "dankgreeter" || cfg.hyprland.enable || cfg.niri.enable;
cfg.displayManager.variant != "dankgreeter" || cfg.hyprland.enable || cfg.niri.enable;
message = "chiasson.desktop.displayManager.variant = \"dankgreeter\" requires chiasson.desktop.hyprland or chiasson.desktop.niri."; message = "chiasson.desktop.displayManager.variant = \"dankgreeter\" requires chiasson.desktop.hyprland or chiasson.desktop.niri.";
} }
{ {
@@ -210,7 +251,7 @@
(lib.mkIf (dmsEnabled && hmAvailable) { (lib.mkIf (dmsEnabled && hmAvailable) {
"home-manager".sharedModules = [ self.homeManagerModules.desktopShellDms ]; "home-manager".sharedModules = [ self.homeManagerModules.desktopShellDms ];
}) })
(lib.mkIf (hmAvailable && (dmsEnabled || cfg.niri.enable)) { (lib.mkIf hmAvailable {
"home-manager".extraSpecialArgs = { inherit inputs; }; "home-manager".extraSpecialArgs = { inherit inputs; };
}) })
]; ];
+276
View File
@@ -0,0 +1,276 @@
# Home Manager wiring for DMS (imported by default.nix; lives under _private/ for import-tree).
{
inputs,
config,
pkgs,
lib,
osConfig ? { },
...
}:
let
home = config.home.homeDirectory;
dmsEnabled = lib.attrByPath [ "chiasson" "desktop" "shell" ] null osConfig == "dms";
dmsOs = lib.attrByPath [ "chiasson" "desktop" "shells" "dms" ] { } osConfig;
hostName = lib.attrByPath [ "networking" "hostName" ] "nixos" osConfig;
rebuildCommand =
if (dmsOs.rebuildCommand or null) != null then
dmsOs.rebuildCommand
else
[ "sudo" "nixos-rebuild" "switch" "--flake" ".#${hostName}" ];
gpuTempEnabled = dmsOs.enableGpuTemp or true;
hyprlandEnabled = lib.attrByPath [ "chiasson" "desktop" "hyprland" "enable" ] false osConfig;
discordEnabled = lib.attrByPath [ "chiasson" "home" "apps" "discord" "enable" ] false config;
ohMyPoshEnabled = config.programs.oh-my-posh.enable or false;
obsidianSnippetDirs = map (v: v + "/snippets") (dmsOs.obsidianVaults or [ ]);
matugenOutputDirs =
lib.optionals hyprlandEnabled [ "${home}/.config/hypr" ]
++ lib.optionals ohMyPoshEnabled [ "${home}/.config/oh-my-posh" ]
++ lib.optionals discordEnabled [ "${home}/.config/vesktop/themes" ]
++ [
"${home}/.config/qt6ct/colors"
"${home}/.config/qt5ct/colors"
];
ensureMatugenBody =
lib.concatStringsSep "\n" (map (dir: "mkdir -p ${lib.escapeShellArg dir}") matugenOutputDirs)
+ lib.concatStringsSep "\n" (map (dir: ''
snippetDir=${lib.escapeShellArg dir}
parentDir="$(dirname "$snippetDir")"
if [ -d "$snippetDir" ]; then
:
elif [ ! -d "$parentDir" ] || [ ! -w "$parentDir" ]; then
echo "dms: skipping Obsidian snippet dir '$snippetDir' (parent missing or not writable)" >&2
else
mkdir -p "$snippetDir"
fi
'') obsidianSnippetDirs)
+ lib.optionalString ohMyPoshEnabled ''
dest="$HOME/.config/oh-my-posh/theme.omp.json"
template="$HOME/.config/matugen/templates/ohmyposh-theme.omp.json"
if [ -L "$dest" ] || { [ -e "$dest" ] && ! [ -f "$dest" ]; }; then
rm -f "$dest"
fi
if [ ! -f "$dest" ]; then
cp -L "$template" "$dest"
fi
'';
ensureMatugenOutputDirsScript = pkgs.writeShellScript "dms-ensure-matugen-output-dirs" ''
set -euo pipefail
${ensureMatugenBody}
'';
dmsRestartOnceScript = pkgs.writeShellScript "dms-plugin-restart-once" (
builtins.replaceStrings
[ "@FLOCK@" "@SYSTEMCTL@" ]
[
"${pkgs.util-linux}/bin/flock"
"${pkgs.systemd}/bin/systemctl"
]
(builtins.readFile ../scripts/dms-restart-once.sh)
);
jsonFormat = pkgs.formats.json { };
dmsConfigDir = "${config.xdg.configHome}/DankMaterialShell";
defaultSeedDir = dmsOs.defaultSeedDir or null;
dmsSeedSources =
if defaultSeedDir != null then
{
"settings.json" = defaultSeedDir + "/settings.json";
}
// lib.optionalAttrs (builtins.pathExists (defaultSeedDir + "/plugin_settings.json")) {
"plugin_settings.json" = defaultSeedDir + "/plugin_settings.json";
}
else
{
"settings.json" = jsonFormat.generate "dms-settings-seed.json" (
import ./default-settings.nix {
inherit lib gpuTempEnabled;
extraRightBarWidgets = dmsOs.extraRightBarWidgets or [ ];
}
);
};
dmsSeedBody = lib.concatMapStringsSep "\n" (
fileName:
let
dest = "${dmsConfigDir}/${fileName}";
src = dmsSeedSources.${fileName};
in
''
dest=${lib.escapeShellArg dest}
mkdir -p "$(dirname "$dest")"
if [ -L "$dest" ]; then
${pkgs.coreutils}/bin/cp --remove-destination -L "$dest" "$dest"
fi
if [ ! -e "$dest" ]; then
${pkgs.coreutils}/bin/cp ${lib.escapeShellArg src} "$dest"
chmod u+w "$dest"
fi
''
) (lib.attrNames dmsSeedSources);
dmsSeedConfigScript = pkgs.writeShellScript "dms-seed-config" ''
set -euo pipefail
${dmsSeedBody}
'';
matugenConfigText = import ./matugen-config.nix {
inherit
lib
home
hyprlandEnabled
ohMyPoshEnabled
discordEnabled
obsidianSnippetDirs
;
};
# Plugin registry auto-derived from flake inputs matching `dms-plugin-*`.
# Adding a plugin now requires editing only `flake.nix`. The on-disk
# plugin id (= path under ~/.config/DankMaterialShell/plugins/) is camelCase
# per upstream convention; the kebab→camel transform matches it. The
# `idExceptions` map carries the one plugin whose manifest id does not
# follow the default rule.
pluginInputs = lib.filterAttrs (n: _: lib.hasPrefix "dms-plugin-" n) inputs;
# `dank-vault` → `dankVault`. `lib.splitString` yields ≥ 1 element so
# `head parts` is safe; `map` runs over the tail only (no-op for
# single-word names like `calculator`). `builtins.substring 1 (-1) p`
# returns the rest of `p` from index 1, dropping the first char
# (Nix treats a negative `len` as "rest of string from `start`").
toCamel = s:
let parts = lib.splitString "-" s; in
builtins.head parts
+ lib.concatStrings (map (
p: if p == "" then ""
else lib.toUpper (builtins.substring 0 1 p)
+ builtins.substring 1 (-1) p
) (builtins.tail parts));
# The `home-assistant` plugin ships its manifest under id
# `homeAssistantMonitor` (not the default kebab→camel result).
idExceptions = { "home-assistant" = "homeAssistantMonitor"; };
# NB: don't rewrite as `idExceptions.${stripped} or toCamel stripped`.
# Nix grammar: `or` binds tighter than function application, so the
# `toCamel` and its arg parse as separate postfix args to the select.
# When the lookup succeeds the resolved string is then applied as a
# function, producing `attempt to call something which is not a function
# but a string: "homeAssistantMonitor"`. Explicit `if/hasAttr` sidesteps
# the parse entirely.
camelMap = lib.mapAttrs' (n: src:
let stripped = lib.removePrefix "dms-plugin-" n; in
lib.nameValuePair
(if builtins.hasAttr stripped idExceptions
then idExceptions.${stripped}
else toCamel stripped)
src
) pluginInputs;
# The official plugin pack bundles multiple QML apps. Ship only the
# DankDesktopWeather subdir (verified by its manifest) to slim closure
# and avoid overlapping with future dedicated `dms-plugin-*` flakes.
thirdPartyPlugins =
builtins.removeAttrs camelMap [ "official" ] // {
dankDesktopWeather = inputs.dms-plugin-official + "/DankDesktopWeather";
};
# DMS reads plugins from ~/.config/DankMaterialShell/plugins/<id>/, so
# we route each plugin source there via HM's `xdg.configFile.target`.
# The attrset name is scoped under `dms-plugin-${id}` (not the bare
# camelCase id) so unrelated HM modules can ship a same-named file
# (e.g. `xdg.configFile.calculator`) without colliding with us.
shipPlugin = id: src: {
source = src;
target = "DankMaterialShell/plugins/${id}";
onChange = "${dmsRestartOnceScript}";
};
in
{
imports = [
inputs.dms.homeModules.dank-material-shell
inputs.nix-monitor.homeManagerModules.default
];
config = lib.mkIf dmsEnabled (lib.mkMerge [
(lib.mkIf (dmsOs.bundleThirdPartyPlugins or true) {
xdg.configFile = lib.mapAttrs' (id: src: lib.nameValuePair
"dms-plugin-${id}" (shipPlugin id src)) thirdPartyPlugins;
})
{
programs.nix-monitor = {
enable = true;
inherit rebuildCommand;
generationsCommand = [
"bash"
"-c"
"readlink /nix/var/nix/profiles/system | cut -d- -f2"
];
};
home.packages = with pkgs; [
kdePackages.qtdeclarative
kdePackages.kirigami.unwrapped
kdePackages.qtmultimedia
kdePackages.sonnet
tesseract
mpv
socat
wl-clipboard
jq
cava
curl
libsecret
];
programs.dank-material-shell = {
enable = true;
package = inputs.dms.packages.${pkgs.stdenv.hostPlatform.system}.dms-shell.override {
extraQtPackages = with pkgs.kdePackages; [ qtwebsockets ];
};
systemd = {
enable = true;
restartIfChanged = true;
};
enableSystemMonitoring = true;
dgop.package = inputs.dgop.packages.${pkgs.stdenv.hostPlatform.system}.default;
enableVPN = true;
enableDynamicTheming = true;
enableAudioWavelength = true;
enableCalendarEvents = false;
# Empty on purpose: DMS owns ~/.config/DankMaterialShell/{settings,session}.json
# at runtime (seeded by `home.activation.dmsSeedConfig`). Setting these
# to non-empty here would clobber the runtime seed on every activation.
settings = { };
session = { };
};
# Surface bad obsidianVaults paths at build time instead of at first matugen run.
# Each entry must point at the `<vault>/.obsidian` dir (matugen writes
# `<vault>/.obsidian/snippets/matugen.css` from there).
assertions = lib.mkIf ((dmsOs.obsidianVaults or [ ]) != [ ]) [
{
assertion = builtins.all (v: lib.hasSuffix "/.obsidian" v) (dmsOs.obsidianVaults or [ ]);
message = "chiasson.desktop.shells.dms.obsidianVaults entries must end in '/.obsidian' (matugen writes <vault>/.obsidian/snippets/matugen.css). Example: /home/olivier/Documents/HomeLab/.obsidian";
}
];
home.activation.dmsSeedConfig = lib.hm.dag.entryAfter [ "writeBoundary" ] "${dmsSeedConfigScript}";
systemd.user.services.dms.serviceConfig.ExecStartPre =
lib.mkOrder 100 "${ensureMatugenOutputDirsScript}";
xdg.configFile."matugen/config.toml".text = matugenConfigText;
xdg.configFile."matugen/templates/dank-discord.css".source = ../templates/dank-discord.css;
xdg.configFile."matugen/templates/hyprland-colors.conf".source = ../templates/hyprland-colors.conf;
xdg.configFile."matugen/templates/ohmyposh-theme.omp.json".source = ../templates/ohmyposh-theme.omp.json;
xdg.configFile."matugen/templates/obsidian-minimal-matugen-colors.css".source =
../templates/obsidian-minimal-matugen-colors.css;
}
(lib.mkIf ohMyPoshEnabled {
programs.oh-my-posh = {
useTheme = lib.mkForce null;
configFile = lib.mkForce "${config.xdg.configHome}/oh-my-posh/theme.omp.json";
};
})
]);
}
+21 -24
View File
@@ -1,4 +1,4 @@
{ inputs, ... }: { { ... }: {
flake.nixosModules.desktopShellDmsOptions = { lib, ... }: { flake.nixosModules.desktopShellDmsOptions = { lib, ... }: {
options.chiasson.desktop.shells.dms = { options.chiasson.desktop.shells.dms = {
enableGpuTemp = lib.mkOption { enableGpuTemp = lib.mkOption {
@@ -45,29 +45,26 @@
}; };
}; };
flake.homeManagerModules.desktopShellDms = { flake.homeManagerModules.desktopShellDms = import ./_private/hm.nix;
lib,
osConfig ? { },
...
}:
let
cfg = lib.attrByPath [ "chiasson" "desktop" "shells" "dms" ] { } osConfig;
selectedShell = lib.attrByPath [ "chiasson" "desktop" "shell" ] null osConfig;
dmsEnabled = selectedShell == "dms";
hostName = lib.attrByPath [ "networking" "hostName" ] "nixos" osConfig;
rebuildCommand =
if (cfg.rebuildCommand or null) != null then
cfg.rebuildCommand
else
[ "sudo" "nixos-rebuild" "switch" "--flake" ".#${hostName}" ];
in
{
imports = [
./home-manager/default.nix
];
config = lib.mkIf dmsEnabled { # DMS IPC commands shared between Niri and Hyprland keybind tables.
programs.nix-monitor.rebuildCommand = rebuildCommand; # Defines flake.lib.dmsIpcBinds so each compositor formats the same
}; # command string in its native shape — Niri attrs vs Hyprland string-list.
# Adding a new DMS keybind requires editing this file plus the
# per-compositor bind layout, not the command string.
flake.lib.dmsIpcBinds = {
spotlight = "dms ipc call spotlight toggle";
clipboard = "dms ipc call clipboard toggle";
notepad = "dms ipc call notepad toggle";
notifications = "dms ipc call notifications toggle";
processlist = "dms ipc call processlist toggle";
# Hyprland prefers focusOrToggle (window-aware); niri subscribes to toggle.
processlistFocus = "dms ipc call processlist focusOrToggle";
settingsFocus = "dms ipc call settings focusOrToggle";
barToggle = ''dms ipc call bar toggle name "Main Bar"; dms ipc call bar toggle name "Bar 2"'';
barToggleBar2 = ''dms ipc call bar toggle name "Bar 2"'';
ephemera = "dms ipc call ephemera toggle";
wallpaperCarousel = "dms ipc call wallpaperCarousel toggle";
lock = "dms ipc call lock lock";
}; };
} }
@@ -1,245 +0,0 @@
{
inputs,
config,
pkgs,
lib,
osConfig ? { },
...
}: let
home = config.home.homeDirectory;
dmsEnabled = lib.attrByPath [ "chiasson" "desktop" "shell" ] null osConfig == "dms";
dmsOs = lib.attrByPath [ "chiasson" "desktop" "shells" "dms" ] { } osConfig;
gpuTempEnabled = dmsOs.enableGpuTemp or true;
hyprlandEnabled = lib.attrByPath [ "chiasson" "desktop" "hyprland" "enable" ] false osConfig;
discordEnabled = lib.attrByPath [ "chiasson" "home" "apps" "discord" "enable" ] false config;
ohMyPoshEnabled = config.programs.oh-my-posh.enable or false;
obsidianSnippetDirs = map (v: v + "/snippets") (dmsOs.obsidianVaults or [ ]);
matugenOutputDirs =
lib.optionals hyprlandEnabled [ "${home}/.config/hypr" ]
++ lib.optionals ohMyPoshEnabled [ "${home}/.config/oh-my-posh" ]
++ lib.optionals discordEnabled [ "${home}/.config/vesktop/themes" ]
++ [
"${home}/.config/qt6ct/colors"
"${home}/.config/qt5ct/colors"
];
ensureMatugenBody =
lib.concatStringsSep "\n" (map (dir: "mkdir -p ${lib.escapeShellArg dir}") matugenOutputDirs)
+ lib.concatStringsSep "\n" (map (dir: ''
snippetDir=${lib.escapeShellArg dir}
parentDir="$(dirname "$snippetDir")"
if [ -d "$snippetDir" ]; then
:
elif [ ! -d "$parentDir" ] || [ ! -w "$parentDir" ]; then
echo "dms: skipping Obsidian snippet dir '$snippetDir' (parent missing or not writable)" >&2
else
mkdir -p "$snippetDir"
fi
'') obsidianSnippetDirs)
+ lib.optionalString ohMyPoshEnabled ''
dest="$HOME/.config/oh-my-posh/theme.omp.json"
template="$HOME/.config/matugen/templates/ohmyposh-theme.omp.json"
if [ -L "$dest" ] || { [ -e "$dest" ] && ! [ -f "$dest" ]; }; then
rm -f "$dest"
fi
if [ ! -f "$dest" ]; then
cp -L "$template" "$dest"
fi
'';
ensureMatugenOutputDirsScript = pkgs.writeShellScript "dms-ensure-matugen-output-dirs" ''
set -euo pipefail
${ensureMatugenBody}
'';
dmsRestartOnceScript = pkgs.writeShellScript "dms-plugin-restart-once" (
builtins.replaceStrings
[ "@FLOCK@" "@SYSTEMCTL@" ]
[
"${pkgs.util-linux}/bin/flock"
"${pkgs.systemd}/bin/systemctl"
]
(builtins.readFile ./scripts/dms-restart-once.sh)
);
jsonFormat = pkgs.formats.json { };
dmsConfigDir = "${config.xdg.configHome}/DankMaterialShell";
defaultSeedDir = lib.attrByPath [ "chiasson" "desktop" "shells" "dms" "defaultSeedDir" ] null osConfig;
dmsSeedSources =
if defaultSeedDir != null then
{
"settings.json" = defaultSeedDir + "/settings.json";
}
// lib.optionalAttrs (builtins.pathExists (defaultSeedDir + "/plugin_settings.json")) {
"plugin_settings.json" = defaultSeedDir + "/plugin_settings.json";
}
else
{
"settings.json" = jsonFormat.generate "dms-settings-seed.json" (
import ../_private/default-settings.nix {
inherit lib gpuTempEnabled;
extraRightBarWidgets = dmsOs.extraRightBarWidgets or [ ];
}
);
};
dmsSeedBody = lib.concatMapStringsSep "\n" (
fileName:
let
dest = "${dmsConfigDir}/${fileName}";
src = dmsSeedSources.${fileName};
in
''
dest=${lib.escapeShellArg dest}
mkdir -p "$(dirname "$dest")"
if [ -L "$dest" ]; then
${pkgs.coreutils}/bin/cp --remove-destination -L "$dest" "$dest"
fi
if [ ! -e "$dest" ]; then
${pkgs.coreutils}/bin/cp ${lib.escapeShellArg src} "$dest"
chmod u+w "$dest"
fi
''
) (lib.attrNames dmsSeedSources);
dmsSeedConfigScript = pkgs.writeShellScript "dms-seed-config" ''
set -euo pipefail
${dmsSeedBody}
'';
matugenConfigText = import ../_private/matugen-config.nix {
inherit
lib
home
hyprlandEnabled
ohMyPoshEnabled
discordEnabled
obsidianSnippetDirs
;
};
# Directory name must match each plugin's `id` in plugin.json.
thirdPartyPlugins = {
dankVault = inputs.dms-plugin-dank-vault;
calculator = inputs.dms-plugin-calculator;
homeAssistantMonitor = inputs.dms-plugin-home-assistant;
dropdownMenu = inputs.dms-plugin-dropdown-menu;
ocrScanner = inputs.dms-plugin-ocr-scanner;
unifiedTaskbar = inputs.dms-plugin-unified-taskbar;
widgetGroup = inputs.dms-plugin-widget-group;
nixPackageRunner = inputs.dms-plugin-nix-package-runner;
ambientSound = inputs.dms-plugin-ambient-sound;
cavaVisualizer = inputs.dms-plugin-cava-visualizer;
emojiLauncher = inputs.dms-plugin-emoji-launcher;
dankDesktopWeather = inputs.dms-plugin-official + "/DankDesktopWeather";
webSearch = inputs.dms-plugin-web-search;
wallpaperCarousel = inputs.dms-plugin-wallpaper-carousel;
ephemera = inputs.dms-plugin-ephemera;
appShortcut = inputs.dms-plugin-app-shortcut;
wvkbdToggle = inputs.dms-plugin-wvkbd-toggle;
rbwLockToggle = inputs.dms-plugin-rbw-lock-toggle;
};
shipThirdPartyPlugin =
id: src:
{
source = src;
onChange = "${dmsRestartOnceScript}";
};
in {
imports = [
inputs.dms.homeModules.dank-material-shell
inputs.nix-monitor.homeManagerModules.default
];
config = lib.mkIf dmsEnabled (lib.mkMerge [
(lib.mkIf (dmsOs.bundleThirdPartyPlugins or true) {
xdg.configFile =
lib.mapAttrs (id: src: shipThirdPartyPlugin id src) thirdPartyPlugins;
})
{
# Nix rebuild widget used by DankMaterialShell (via nix-monitor).
# Per-host `rebuildCommand` is set in `modules/hosts/<host>/configuration.nix` (`chiasson.desktop.shells.dms`).
programs.nix-monitor = {
enable = true;
generationsCommand = [
"bash"
"-c"
"readlink /nix/var/nix/profiles/system | cut -d- -f2"
];
};
home.packages = with pkgs; [
kdePackages.qtdeclarative
kdePackages.kirigami.unwrapped
kdePackages.qtmultimedia
kdePackages.sonnet
# ocrScanner DMS plugin — eng/fra/vie and 120+ langs ship in nixpkgs tessdata.
tesseract
# ambientSound DMS plugin — mpv playback + socat IPC to mpv socket.
mpv
socat
# dankVault / emojiLauncher / ephemera — Wayland clipboard.
wl-clipboard
# nixPackageRunner DMS plugin.
jq
# cavaVisualizer DMS plugin.
cava
# ephemera DMS plugin — API requests + optional keyring storage.
curl
libsecret
];
programs.dank-material-shell = {
enable = true;
# homeAssistantMonitor plugin (QtWebSockets) needs QML on DMS's import path, not just home.packages.
package = inputs.dms.packages.${pkgs.stdenv.hostPlatform.system}.dms-shell.override {
extraQtPackages = with pkgs.kdePackages; [ qtwebsockets ];
};
systemd = {
enable = true; # Systemd service for auto-start
restartIfChanged = true; # Auto-restart dms.service when dankMaterialShell changes
};
# Core features
enableSystemMonitoring = true; # System monitoring widgets (dgop)
dgop.package = inputs.dgop.packages.${pkgs.stdenv.hostPlatform.system}.default;
enableVPN = true; # VPN management widget
enableDynamicTheming = true; # Wallpaper-based theming (matugen)
enableAudioWavelength = true; # Audio visualizer (cava)
enableCalendarEvents = false; # Disable calendar integration (khal/ikhal)
# Leave `session` at {} — non-empty makes HM rewrite session.json every switch and nukes wallpaper/session state.
# Leave `settings` at {} — UI-owned settings.json is seeded once on first run (see home.activation below).
settings = { };
session = { };
};
# Detach store symlinks so UI edits survive rebuilds; seed defaults only on a fresh profile.
home.activation.dmsSeedConfig = lib.hm.dag.entryAfter [ "writeBoundary" ] "${dmsSeedConfigScript}";
# matugen won't create missing output_path parents; run before DMS theme generation.
systemd.user.services.dms.serviceConfig.ExecStartPre =
lib.mkOrder 100 "${ensureMatugenOutputDirsScript}";
# DMS / matugen custom templates.
#
# DMS docs (custom templates): https://danklinux.com/docs/dankmaterialshell/application-themes#custom-matugen-templates
xdg.configFile."matugen/config.toml".text = matugenConfigText;
xdg.configFile."matugen/templates/dank-discord.css".source = ../templates/dank-discord.css;
xdg.configFile."matugen/templates/hyprland-colors.conf".source = ../templates/hyprland-colors.conf;
xdg.configFile."matugen/templates/ohmyposh-theme.omp.json".source = ../templates/ohmyposh-theme.omp.json;
xdg.configFile."matugen/templates/obsidian-minimal-matugen-colors.css".source =
../templates/obsidian-minimal-matugen-colors.css;
}
(lib.mkIf ohMyPoshEnabled {
# Same path as matugen `[templates.ohmyposh]`; seeded as a real file by `ensureMatugenOutputDirsScript`.
programs.oh-my-posh = {
useTheme = lib.mkForce null;
configFile = lib.mkForce "${config.xdg.configHome}/oh-my-posh/theme.omp.json";
};
})
]);
}
+11
View File
@@ -0,0 +1,11 @@
{config, inputs, pkgs, ...}: {
imports = [
inputs.hermes.nixosModules.default
];
services.ollama = {
enable = true;
# Replace the old acceleration line with this:
package = pkgs.ollama-cuda;
};
chiasson.users.extraModules.olivier = [{chiasson.home.extraPackages = with pkgs; [ zed-editor devin-desktop];}];
}
+24 -38
View File
@@ -1,16 +1,17 @@
# Monitor layout for 14900k. # Monitor layout for 14900k.
# NVIDIA (default): DP-2 ultrawide, HDMI-A-3 + DP-4 side/top stack. # NVIDIA (default): DP-3 ultrawide, HDMI-A-3 + DP-4 stack; DP-2 virtual 4K when streamingDisplay is on.
# Intel iGPU (gpu passthru): DP-1 ultrawide, HDMI-A-2 Samsung to the left. # Intel iGPU (gpu passthru): DP-1 ultrawide, HDMI-A-2 to the left.
# Niri: `extraSettings` (KDL via `extraConfig`, other wrapper-modules keys) + `extraBinds` (merged keybinds). # Niri uses `extraSettings.extraConfig`; Hyprland uses `chiasson.desktop.hyprland.settings`.
# Hyprland: `chiasson.desktop.hyprland.settings` (merged in HM when `chiasson.desktop.hyprland.enable`).
#TODO[epic=Moderate] Clean this up, move to host's configuration.nix. #TODO[epic=Moderate] Clean this up, move to host's configuration.nix.
{ config, lib, ... }: { config, lib, ... }:
let let
streamingDisplay = config.chiasson.system.streamingDisplay;
gpuPassthru = config.chiasson.system.gpuPassthru.enable; gpuPassthru = config.chiasson.system.gpuPassthru.enable;
# Niri outputs: a static block per GPU layout, plus the optional virtual 4K panel.
niriOutputs = niriOutputs =
if gpuPassthru then (if gpuPassthru then
'' ''
output "DP-1" { output "DP-1" {
mode "2560x1080@144" mode "2560x1080@144"
@@ -42,43 +43,31 @@ let
scale 1.0 scale 1.0
position x=0 y=-1080 position x=0 y=-1080
} }
'')
+ lib.optionalString streamingDisplay.enable ''
output "${streamingDisplay.connector}" {
mode "${streamingDisplay.mode}"
scale ${toString streamingDisplay.niriScale}
position ${streamingDisplay.niriPosition}
}
''; '';
# Hyprland monitor strings, with the virtual panel appended when enabled.
hyprlandMonitors = hyprlandMonitors =
if gpuPassthru then (if gpuPassthru then
[ [ "DP-1, 2560x1080@144, 0x0, 1" "HDMI-A-2, 1920x1080@60, -1920x0, 1" ]
"DP-1, 2560x1080@144, 0x0, 1"
"HDMI-A-2, 1920x1080@60, -1920x0, 1"
]
else else
[ [ "DP-3, 2560x1080@144, 0x0, 1" "DP-4, 1920x1080@144, 0x-1080, 1" "HDMI-A-3, 1920x1080@60, -1920x0, 1" ])
"DP-3, 2560x1080@144, 0x0, 1" ++ lib.optional streamingDisplay.enable "${streamingDisplay.connector}, ${streamingDisplay.mode}, 7680x0, ${toString streamingDisplay.niriScale}";
"DP-4, 1920x1080@144, 0x-1080, 1"
"HDMI-A-3, 1920x1080@60, -1920x0, 1"
];
hyprlandWorkspaces = hyprlandWorkspaces =
if gpuPassthru then if gpuPassthru then
[ [ "1, monitor:DP-1, default:true" "2, monitor:DP-1" "3, monitor:DP-1"
"1, monitor:DP-1, default:true" "4, monitor:HDMI-A-2, default:true" "5, monitor:HDMI-A-2" "6, monitor:HDMI-A-2" ]
"2, monitor:DP-1"
"3, monitor:DP-1"
"4, monitor:HDMI-A-2, default:true"
"5, monitor:HDMI-A-2"
"6, monitor:HDMI-A-2"
]
else else
[ [ "1, monitor:DP-3, default:true" "2, monitor:DP-3" "3, monitor:DP-3"
"1, monitor:DP-3, default:true" "4, monitor:HDMI-A-3, default:true" "5, monitor:HDMI-A-3" "6, monitor:HDMI-A-3"
"2, monitor:DP-3" "7, monitor:DP-4" "8, monitor:DP-4" "9, monitor:DP-4" ];
"3, monitor:DP-3"
"4, monitor:HDMI-A-3, default:true"
"5, monitor:HDMI-A-3"
"6, monitor:HDMI-A-3"
"7, monitor:DP-4"
"8, monitor:DP-4"
"9, monitor:DP-4"
];
in in
{ {
chiasson.desktop.niri.extraSettings = { chiasson.desktop.niri.extraSettings = {
@@ -86,10 +75,7 @@ in
}; };
chiasson.desktop.niri.extraBinds."XF86Tools".spawn = [ chiasson.desktop.niri.extraBinds."XF86Tools".spawn = [
"wpctl" "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"
"set-mute"
"@DEFAULT_AUDIO_SOURCE@"
"toggle"
]; ];
chiasson.desktop.hyprland.settings = lib.mkIf config.chiasson.desktop.hyprland.enable { chiasson.desktop.hyprland.settings = lib.mkIf config.chiasson.desktop.hyprland.enable {
@@ -39,7 +39,8 @@
"hassUrl": "https://home.chiasson.cloud/", "hassUrl": "https://home.chiasson.cloud/",
"hassTokenPath": "/run/secrets/home-assistant/auth-token", "hassTokenPath": "/run/secrets/home-assistant/auth-token",
"showButtonsOnStatusBar": true, "showButtonsOnStatusBar": true,
"showAttributes": false "showAttributes": false,
"haRefreshCounter": 1
}, },
"unifiedTaskbar": { "unifiedTaskbar": {
"enabled": true, "enabled": true,
@@ -4,11 +4,14 @@
"customThemeFile": "", "customThemeFile": "",
"registryThemeVariants": {}, "registryThemeVariants": {},
"matugenScheme": "scheme-tonal-spot", "matugenScheme": "scheme-tonal-spot",
"matugenContrast": 0,
"runUserMatugenTemplates": true, "runUserMatugenTemplates": true,
"matugenTargetMonitor": "", "matugenTargetMonitor": "",
"popupTransparency": 1, "popupTransparency": 1,
"dockTransparency": 1, "dockTransparency": 1,
"widgetBackgroundColor": "sch", "widgetBackgroundColor": "sch",
"widgetBackgroundCustomColor": "#6750A4",
"widgetBackgroundCustomStrength": 0.5,
"widgetColorMode": "default", "widgetColorMode": "default",
"controlCenterTileColorMode": "primary", "controlCenterTileColorMode": "primary",
"buttonColorMode": "primary", "buttonColorMode": "primary",
@@ -17,11 +20,18 @@
"niriLayoutRadiusOverride": -1, "niriLayoutRadiusOverride": -1,
"niriLayoutBorderSize": -1, "niriLayoutBorderSize": -1,
"hyprlandLayoutGapsOverride": -1, "hyprlandLayoutGapsOverride": -1,
"hyprlandLayoutGapsOutOverride": -1,
"hyprlandLayoutRadiusOverride": -1, "hyprlandLayoutRadiusOverride": -1,
"hyprlandLayoutBorderSize": -1, "hyprlandLayoutBorderSize": -1,
"hyprlandResizeOnBorder": false,
"mangoLayoutGapsOverride": -1, "mangoLayoutGapsOverride": -1,
"mangoLayoutGapsOutOverride": -1,
"mangoLayoutRadiusOverride": -1, "mangoLayoutRadiusOverride": -1,
"mangoLayoutBorderSize": -1, "mangoLayoutBorderSize": -1,
"mangoTrackpadNaturalScrolling": true,
"firstDayOfWeek": -1,
"showWeekNumber": false,
"calendarBackend": "auto",
"use24HourClock": false, "use24HourClock": false,
"showSeconds": true, "showSeconds": true,
"padHours12Hour": false, "padHours12Hour": false,
@@ -36,6 +46,17 @@
"modalAnimationSpeed": 1, "modalAnimationSpeed": 1,
"modalCustomAnimationDuration": 150, "modalCustomAnimationDuration": 150,
"enableRippleEffects": true, "enableRippleEffects": true,
"animationVariant": 0,
"motionEffect": 0,
"m3ElevationEnabled": true,
"m3ElevationIntensity": 12,
"m3ElevationOpacity": 30,
"m3ElevationColorMode": "default",
"m3ElevationLightDirection": "top",
"m3ElevationCustomColor": "#000000",
"modalElevationEnabled": true,
"popoutElevationEnabled": true,
"barElevationEnabled": false,
"blurEnabled": false, "blurEnabled": false,
"blurForegroundLayers": true, "blurForegroundLayers": true,
"blurLayerOutlineOpacity": 0.12, "blurLayerOutlineOpacity": 0.12,
@@ -45,6 +66,8 @@
"wallpaperFillMode": "Fill", "wallpaperFillMode": "Fill",
"blurredWallpaperLayer": false, "blurredWallpaperLayer": false,
"blurWallpaperOnOverview": false, "blurWallpaperOnOverview": false,
"wallpaperBackgroundColorMode": "black",
"wallpaperBackgroundCustomColor": "#000000",
"showLauncherButton": true, "showLauncherButton": true,
"showWorkspaceSwitcher": true, "showWorkspaceSwitcher": true,
"showFocusedWindow": true, "showFocusedWindow": true,
@@ -64,6 +87,12 @@
"showClock": true, "showClock": true,
"showNotificationButton": true, "showNotificationButton": true,
"showBattery": true, "showBattery": true,
"showBatteryPercent": true,
"showBatteryPercentOnlyOnBattery": false,
"showBatteryTime": false,
"showBatteryTimeOnlyOnBattery": false,
"batteryPillStyle": false,
"batteryPillPercentSign": false,
"showControlCenterButton": true, "showControlCenterButton": true,
"showCapsLockIndicator": true, "showCapsLockIndicator": true,
"controlCenterShowNetworkIcon": true, "controlCenterShowNetworkIcon": true,
@@ -78,6 +107,8 @@
"controlCenterShowBatteryIcon": false, "controlCenterShowBatteryIcon": false,
"controlCenterShowPrinterIcon": false, "controlCenterShowPrinterIcon": false,
"controlCenterShowScreenSharingIcon": true, "controlCenterShowScreenSharingIcon": true,
"controlCenterShowIdleInhibitorIcon": false,
"controlCenterShowDoNotDisturbIcon": false,
"showPrivacyButton": true, "showPrivacyButton": true,
"privacyShowMicIcon": false, "privacyShowMicIcon": false,
"privacyShowCameraIcon": false, "privacyShowCameraIcon": false,
@@ -133,29 +164,57 @@
"maxWorkspaceIcons": 9, "maxWorkspaceIcons": 9,
"workspaceAppIconSizeOffset": 1, "workspaceAppIconSizeOffset": 1,
"groupWorkspaceApps": true, "groupWorkspaceApps": true,
"groupActiveWorkspaceApps": false,
"workspaceFollowFocus": false, "workspaceFollowFocus": false,
"showOccupiedWorkspacesOnly": true, "showOccupiedWorkspacesOnly": true,
"reverseScrolling": false, "reverseScrolling": false,
"dwlShowAllTags": false, "dwlShowAllTags": false,
"workspaceActiveAppHighlightEnabled": false,
"workspaceColorMode": "default", "workspaceColorMode": "default",
"workspaceFocusedCustomColor": "#6750A4",
"workspaceOccupiedColorMode": "none", "workspaceOccupiedColorMode": "none",
"workspaceOccupiedCustomColor": "#625B71",
"workspaceUnfocusedColorMode": "default", "workspaceUnfocusedColorMode": "default",
"workspaceUnfocusedCustomColor": "#49454E",
"workspaceUrgentColorMode": "default", "workspaceUrgentColorMode": "default",
"workspaceUrgentCustomColor": "#B3261E",
"workspaceFocusedBorderEnabled": false, "workspaceFocusedBorderEnabled": false,
"workspaceFocusedBorderColor": "primary", "workspaceFocusedBorderColor": "primary",
"workspaceFocusedBorderCustomColor": "#6750A4",
"workspaceFocusedBorderThickness": 2, "workspaceFocusedBorderThickness": 2,
"workspaceUnfocusedMonitorSeparateAppearance": false,
"workspaceUnfocusedMonitorColorMode": "default",
"workspaceUnfocusedMonitorFocusedCustomColor": "#6750A4",
"workspaceUnfocusedMonitorOccupiedColorMode": "none",
"workspaceUnfocusedMonitorOccupiedCustomColor": "#625B71",
"workspaceUnfocusedMonitorUnfocusedColorMode": "default",
"workspaceUnfocusedMonitorUnfocusedCustomColor": "#49454E",
"workspaceUnfocusedMonitorUrgentColorMode": "default",
"workspaceUnfocusedMonitorUrgentCustomColor": "#B3261E",
"workspaceUnfocusedMonitorBorderEnabled": false,
"workspaceUnfocusedMonitorBorderColor": "primary",
"workspaceUnfocusedMonitorBorderCustomColor": "#6750A4",
"workspaceUnfocusedMonitorBorderThickness": 2,
"workspaceNameIcons": {}, "workspaceNameIcons": {},
"waveProgressEnabled": true, "waveProgressEnabled": true,
"scrollTitleEnabled": true, "scrollTitleEnabled": true,
"mediaAdaptiveWidthEnabled": true,
"audioVisualizerEnabled": true, "audioVisualizerEnabled": true,
"audioScrollMode": "volume", "audioScrollMode": "volume",
"audioWheelScrollAmount": 5, "audioWheelScrollAmount": 5,
"audioDeviceScrollVolumeEnabled": false,
"mediaExcludePlayers": [],
"clockCompactMode": false, "clockCompactMode": false,
"focusedWindowCompactMode": false, "focusedWindowCompactMode": false,
"focusedWindowSize": 1,
"focusedWindowShowIcon": true,
"runningAppsCompactMode": true, "runningAppsCompactMode": true,
"barMaxVisibleApps": 0, "barMaxVisibleApps": 0,
"barMaxVisibleRunningApps": 0, "barMaxVisibleRunningApps": 0,
"barShowOverflowBadge": true, "barShowOverflowBadge": true,
"trayAutoOverflow": true,
"trayPopupSingleLine": true,
"trayMaxVisibleItems": 0,
"appsDockHideIndicators": false, "appsDockHideIndicators": false,
"appsDockColorizeActive": false, "appsDockColorizeActive": false,
"appsDockActiveColorMode": "primary", "appsDockActiveColorMode": "primary",
@@ -163,6 +222,7 @@
"appsDockEnlargePercentage": 125, "appsDockEnlargePercentage": 125,
"appsDockIconSizePercentage": 100, "appsDockIconSizePercentage": 100,
"keyboardLayoutNameCompactMode": false, "keyboardLayoutNameCompactMode": false,
"keyboardLayoutNameShowIcon": false,
"runningAppsCurrentWorkspace": true, "runningAppsCurrentWorkspace": true,
"runningAppsGroupByApp": false, "runningAppsGroupByApp": false,
"runningAppsCurrentMonitor": false, "runningAppsCurrentMonitor": false,
@@ -198,9 +258,18 @@
"lockDateFormat": "dddd, MMMM d", "lockDateFormat": "dddd, MMMM d",
"greeterRememberLastSession": true, "greeterRememberLastSession": true,
"greeterRememberLastUser": true, "greeterRememberLastUser": true,
"greeterAutoLogin": false,
"greeterEnableFprint": false, "greeterEnableFprint": false,
"greeterEnableU2f": false, "greeterEnableU2f": false,
"greeterWallpaperPath": "", "greeterWallpaperPath": "",
"greeterUse24HourClock": true,
"greeterShowSeconds": false,
"greeterPadHours12Hour": false,
"greeterLockDateFormat": "",
"greeterFontFamily": "",
"greeterWallpaperFillMode": "",
"greeterSyncPending": false,
"greeterSyncBaseline": {},
"mediaSize": 1, "mediaSize": 1,
"appLauncherViewMode": "list", "appLauncherViewMode": "list",
"spotlightModalViewMode": "list", "spotlightModalViewMode": "list",
@@ -211,19 +280,53 @@
"sortAppsAlphabetically": false, "sortAppsAlphabetically": false,
"appLauncherGridColumns": 4, "appLauncherGridColumns": 4,
"spotlightCloseNiriOverview": true, "spotlightCloseNiriOverview": true,
"rememberLastQuery": false,
"rememberLastMode": true,
"spotlightSectionViewModes": {}, "spotlightSectionViewModes": {},
"appDrawerSectionViewModes": {}, "appDrawerSectionViewModes": {},
"niriOverviewOverlayEnabled": true, "niriOverviewOverlayEnabled": true,
"dankLauncherV2Size": "compact", "dankLauncherV2Size": "medium",
"dankLauncherV2ShowSourceBadges": true,
"dankLauncherV2BorderEnabled": false, "dankLauncherV2BorderEnabled": false,
"dankLauncherV2BorderThickness": 2, "dankLauncherV2BorderThickness": 2,
"dankLauncherV2BorderColor": "primary", "dankLauncherV2BorderColor": "primary",
"dankLauncherV2ShowFooter": true, "dankLauncherV2ShowFooter": true,
"dankLauncherV2UnloadOnClose": false, "dankLauncherV2UnloadOnClose": true,
"dankLauncherV2IncludeFilesInAll": false,
"dankLauncherV2IncludeFoldersInAll": false,
"launcherUseOverlayLayer": false,
"launcherStyle": "spotlight",
"spotlightBarShowModeChips": true,
"keybindsFloatingWindow": false,
"useAutoLocation": false, "useAutoLocation": false,
"weatherEnabled": true, "weatherEnabled": true,
"networkPreference": "auto", "dashTabs": [
"iconTheme": "WhiteSur-dark", {
"id": "overview",
"enabled": true
},
{
"id": "media",
"enabled": true
},
{
"id": "wallpaper",
"enabled": true
},
{
"id": "weather",
"enabled": true
},
{
"id": "settings",
"enabled": true
}
],
"networkPreference": "ethernet",
"iconThemeDark": "System Default",
"iconThemeLight": "System Default",
"iconThemePerMode": false,
"lastAppliedIconTheme": "",
"cursorSettings": { "cursorSettings": {
"theme": "System Default", "theme": "System Default",
"size": 24, "size": 24,
@@ -240,9 +343,9 @@
"cursorHideTimeout": 0 "cursorHideTimeout": 0
} }
}, },
"launcherLogoMode": "apps", "launcherLogoMode": "os",
"launcherLogoCustomPath": "", "launcherLogoCustomPath": "",
"launcherLogoColorOverride": "", "launcherLogoColorOverride": "primary",
"launcherLogoColorInvertOnMode": false, "launcherLogoColorInvertOnMode": false,
"launcherLogoBrightness": 0.5, "launcherLogoBrightness": 0.5,
"launcherLogoContrast": 1, "launcherLogoContrast": 1,
@@ -251,28 +354,50 @@
"monoFontFamily": "Fira Code", "monoFontFamily": "Fira Code",
"fontWeight": 400, "fontWeight": 400,
"fontScale": 1, "fontScale": 1,
"textRenderType": 0,
"textRenderQuality": 0,
"notepadUseMonospace": true, "notepadUseMonospace": true,
"notepadFontFamily": "", "notepadFontFamily": "",
"notepadFontSize": 14, "notepadFontSize": 14,
"notificationSummaryFontSize": 0,
"notificationBodyFontSize": 0,
"notepadShowLineNumbers": false, "notepadShowLineNumbers": false,
"notepadAutoSave": false,
"notepadSlideoutSide": "right",
"notepadDefaultMode": "slideout",
"notepadTransparencyOverride": -1, "notepadTransparencyOverride": -1,
"notepadLastCustomTransparency": 0.7, "notepadLastCustomTransparency": 0.7,
"notepadUseCompositorGap": false,
"notepadEdgeGap": 0,
"soundsEnabled": true, "soundsEnabled": true,
"useSystemSoundTheme": false, "useSystemSoundTheme": false,
"soundLogin": false,
"soundNewNotification": true, "soundNewNotification": true,
"soundVolumeChanged": true, "soundVolumeChanged": true,
"soundPluggedIn": true, "soundPluggedIn": true,
"muteSoundsWhenMediaPlaying": true,
"acMonitorTimeout": 0, "acMonitorTimeout": 0,
"acLockTimeout": 0, "acLockTimeout": 0,
"acSuspendTimeout": 0, "acSuspendTimeout": 0,
"acSuspendBehavior": 0, "acSuspendBehavior": 0,
"acProfileName": "", "acProfileName": "",
"acPostLockMonitorTimeout": 0,
"batteryMonitorTimeout": 0, "batteryMonitorTimeout": 0,
"batteryLockTimeout": 0, "batteryLockTimeout": 0,
"batterySuspendTimeout": 0, "batterySuspendTimeout": 0,
"batterySuspendBehavior": 0, "batterySuspendBehavior": 0,
"batteryProfileName": "", "batteryProfileName": "",
"batteryPostLockMonitorTimeout": 0,
"batteryChargeLimit": 100, "batteryChargeLimit": 100,
"batteryNotifyChargeLimit": false,
"batteryCriticalThreshold": 10,
"batteryNotifyCritical": true,
"batteryLowThreshold": 20,
"batteryNotifyLow": false,
"batteryChargeLimitNotificationType": 0,
"batteryLowNotificationType": 0,
"batteryCriticalNotificationType": 1,
"batteryAutoPowerSaver": false,
"lockBeforeSuspend": false, "lockBeforeSuspend": false,
"loginctlLockIntegration": true, "loginctlLockIntegration": true,
"fadeToLockEnabled": true, "fadeToLockEnabled": true,
@@ -304,6 +429,7 @@
"matugenTemplatePywalfox": true, "matugenTemplatePywalfox": true,
"matugenTemplateZenBrowser": true, "matugenTemplateZenBrowser": true,
"matugenTemplateVesktop": false, "matugenTemplateVesktop": false,
"matugenTemplateVencord": true,
"matugenTemplateEquibop": true, "matugenTemplateEquibop": true,
"matugenTemplateGhostty": true, "matugenTemplateGhostty": true,
"matugenTemplateKitty": true, "matugenTemplateKitty": true,
@@ -316,10 +442,23 @@
"matugenTemplateVscode": true, "matugenTemplateVscode": true,
"matugenTemplateEmacs": true, "matugenTemplateEmacs": true,
"matugenTemplateZed": true, "matugenTemplateZed": true,
"matugenTemplateNeovimSettings": {
"dark": {
"baseTheme": "github_dark",
"harmony": 0.5
},
"light": {
"baseTheme": "github_light",
"harmony": 0.5
}
},
"matugenTemplateNeovimSetBackground": true,
"showDock": false, "showDock": false,
"dockAutoHide": false, "dockAutoHide": false,
"dockSmartAutoHide": false, "dockSmartAutoHide": false,
"dockUseOverlayLayer": false,
"dockGroupByApp": false, "dockGroupByApp": false,
"dockRestoreSpecialWorkspaceOnClick": false,
"dockOpenOnOverview": false, "dockOpenOnOverview": false,
"dockPosition": 1, "dockPosition": 1,
"dockSpacing": 4, "dockSpacing": 4,
@@ -342,6 +481,9 @@
"dockMaxVisibleApps": 0, "dockMaxVisibleApps": 0,
"dockMaxVisibleRunningApps": 0, "dockMaxVisibleRunningApps": 0,
"dockShowOverflowBadge": true, "dockShowOverflowBadge": true,
"dockShowTrash": false,
"dockTrashFileManager": "default",
"dockTrashCustomCommand": "",
"notificationOverlayEnabled": false, "notificationOverlayEnabled": false,
"notificationPopupShadowEnabled": true, "notificationPopupShadowEnabled": true,
"notificationPopupPrivacyMode": false, "notificationPopupPrivacyMode": false,
@@ -359,14 +501,21 @@
"maxFprintTries": 15, "maxFprintTries": 15,
"enableU2f": false, "enableU2f": false,
"u2fMode": "or", "u2fMode": "or",
"lockScreenActiveMonitor": "all",
"lockScreenInactiveColor": "#000000", "lockScreenInactiveColor": "#000000",
"lockScreenNotificationMode": 0, "lockScreenNotificationMode": 0,
"lockScreenVideoEnabled": false,
"lockScreenVideoPath": "",
"lockScreenVideoCycling": false,
"lockScreenWallpaperPath": "",
"lockScreenWallpaperFillMode": "",
"lockScreenFontFamily": "",
"hideBrightnessSlider": false, "hideBrightnessSlider": false,
"notificationTimeoutLow": 5000, "notificationTimeoutLow": 5000,
"notificationTimeoutNormal": 5000, "notificationTimeoutNormal": 5000,
"notificationTimeoutCritical": 0, "notificationTimeoutCritical": 0,
"notificationCompactMode": false, "notificationCompactMode": false,
"notificationShowTimeoutBar": false,
"notificationDedupeEnabled": true,
"notificationPopupPosition": 0, "notificationPopupPosition": 0,
"notificationAnimationSpeed": 1, "notificationAnimationSpeed": 1,
"notificationCustomAnimationDuration": 400, "notificationCustomAnimationDuration": 400,
@@ -377,6 +526,7 @@
"notificationHistorySaveNormal": true, "notificationHistorySaveNormal": true,
"notificationHistorySaveCritical": true, "notificationHistorySaveCritical": true,
"notificationRules": [], "notificationRules": [],
"notificationFocusedMonitor": false,
"osdAlwaysShowValue": false, "osdAlwaysShowValue": false,
"osdPosition": 5, "osdPosition": 5,
"osdVolumeEnabled": true, "osdVolumeEnabled": true,
@@ -407,9 +557,13 @@
"customPowerActionReboot": "", "customPowerActionReboot": "",
"customPowerActionPowerOff": "", "customPowerActionPowerOff": "",
"updaterHideWidget": false, "updaterHideWidget": false,
"updaterCheckOnStart": false,
"updaterUseCustomCommand": false, "updaterUseCustomCommand": false,
"updaterCustomCommand": "", "updaterCustomCommand": "",
"updaterTerminalAdditionalParams": "", "updaterTerminalAdditionalParams": "",
"updaterIntervalSeconds": 1800,
"updaterIncludeFlatpak": true,
"updaterAllowAUR": true,
"displayNameMode": "system", "displayNameMode": "system",
"screenPreferences": {}, "screenPreferences": {},
"showOnLastDisplay": {}, "showOnLastDisplay": {},
@@ -420,6 +574,7 @@
"displayProfileAutoSelect": false, "displayProfileAutoSelect": false,
"displayShowDisconnected": false, "displayShowDisconnected": false,
"displaySnapToEdge": true, "displaySnapToEdge": true,
"connectedFrameBarStyleBackups": {},
"barConfigs": [ "barConfigs": [
{ {
"bottomGap": 0, "bottomGap": 0,
@@ -513,7 +668,7 @@
"id": "gpuTemp", "id": "gpuTemp",
"enabled": true, "enabled": true,
"selectedGpuIndex": 0, "selectedGpuIndex": 0,
"pciId": "", "pciId": "10de:1f07",
"minimumWidth": true "minimumWidth": true
}, },
{ {
@@ -681,6 +836,14 @@
"desktopWidgetPositions": {}, "desktopWidgetPositions": {},
"desktopWidgetGridSettings": { "desktopWidgetGridSettings": {
"DP-3": { "DP-3": {
"enabled": true,
"size": 40
},
"HDMI-A-3": {
"enabled": true,
"size": 50
},
"DP-4": {
"enabled": true, "enabled": true,
"size": 50 "size": 50
} }
@@ -692,7 +855,7 @@
"name": "Desktop Clock", "name": "Desktop Clock",
"enabled": true, "enabled": true,
"config": { "config": {
"style": "analog", "style": "digital",
"transparency": 0.8, "transparency": 0.8,
"colorMode": "primary", "colorMode": "primary",
"customColor": "#ffffff", "customColor": "#ffffff",
@@ -700,347 +863,48 @@
"showAnalogNumbers": false, "showAnalogNumbers": false,
"showAnalogSeconds": true, "showAnalogSeconds": true,
"displayPreferences": [ "displayPreferences": [
"all" {
] "name": "DP-2",
}, "model": "SUN-4K"
"positions": {
"DP-3": {
"width": 300,
"height": 300,
"x": 1550,
"y": 50
},
"DP-4": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"HDMI-A-3": {
"width": 200,
"height": 200,
"x": 1708.3671875,
"y": 4.84765625
}
}
}, },
{ {
"id": "dw_1782021988600_vdg97np4g", "name": "DP-3",
"widgetType": "systemMonitor", "model": "34GL750"
"name": "System Monitor", },
"enabled": true, {
"config": { "name": "DP-4",
"showHeader": true, "model": "ZOWIE XL LCD"
"transparency": 0.8, }
"colorMode": "primary", ],
"customColor": "#ffffff", "showDigitalSeconds": false,
"showCpu": true, "showOnOverlay": false,
"showCpuGraph": true, "showOnOverviewOnly": false,
"showCpuTemp": true, "showOnOverview": false
"showGpuTemp": false,
"gpuPciId": "",
"showMemory": true,
"showMemoryGraph": true,
"showNetwork": true,
"showNetworkGraph": true,
"showDisk": true,
"showTopProcesses": false,
"topProcessCount": 3,
"topProcessSortBy": "cpu",
"layoutMode": "auto",
"graphInterval": 60,
"displayPreferences": [
"all"
]
}, },
"positions": { "positions": {
"DP-3": { "DP-3": {
"width": 500, "width": 240,
"height": 240,
"x": 2240,
"y": 40
},
"DP-4": {
"width": 240.484375,
"height": 240.484375,
"x": 1350,
"y": 50
},
"HDMI-A-3": {
"width": 250,
"height": 250, "height": 250,
"x": 2000, "x": 1650,
"y": 50 "y": 50
}, },
"DP-4": { "DP-2": {
"width": 320,
"height": 480,
"x": 800,
"y": 300
},
"HDMI-A-3": {
"width": 320,
"height": 480,
"x": 1595.0546875,
"y": 556.515625
}
}
},
{
"id": "dw_1782022081429_08ufxr98h",
"widgetType": "appShortcut",
"name": "Application Shortcut: Obsidian",
"enabled": true,
"config": {
"displayPreferences": [
"all"
],
"showOnOverlay": false,
"showOnOverview": false,
"showOnOverviewOnly": false,
"clickThrough": false,
"shortcutApp": "obsidian",
"followTheme": false,
"drawOutlines": false,
"syncPositionAcrossScreens": true
},
"positions": {
"DP-3": {
"width": 100,
"height": 100,
"x": 150,
"y": 200
},
"DP-4": {
"width": 200, "width": 200,
"height": 200, "height": 200,
"x": 860, "x": 412,
"y": 440 "y": 284
},
"HDMI-A-3": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"_synced": {
"x": 0.05859375,
"y": 0.18518518518518517,
"width": 100,
"height": 100
}
}
},
{
"id": "dw_1782022155947_1a4381zan",
"widgetType": "appShortcut",
"name": "Application Shortcut: Steam",
"enabled": true,
"config": {
"displayPreferences": [
"all"
],
"showOnOverlay": false,
"showOnOverview": false,
"showOnOverviewOnly": false,
"clickThrough": false,
"shortcutApp": "steam",
"followTheme": false,
"drawOutlines": false,
"syncPositionAcrossScreens": true
},
"positions": {
"DP-3": {
"width": 100,
"height": 100,
"x": 50,
"y": 900
},
"DP-4": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"HDMI-A-3": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"_synced": {
"x": 0.01953125,
"y": 0.8333333333333334,
"width": 100,
"height": 100
}
}
},
{
"id": "dw_1782022159047_a0w7xwkkz",
"widgetType": "appShortcut",
"name": "Application Shortcut: Vesktop",
"enabled": true,
"config": {
"displayPreferences": [
"all"
],
"showOnOverlay": false,
"showOnOverview": false,
"showOnOverviewOnly": false,
"clickThrough": false,
"shortcutApp": "vesktop",
"followTheme": false,
"drawOutlines": false,
"syncPositionAcrossScreens": true
},
"positions": {
"DP-3": {
"width": 100,
"height": 100,
"x": 50,
"y": 200
},
"DP-4": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"HDMI-A-3": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"_synced": {
"x": 0.01953125,
"y": 0.18518518518518517,
"width": 100,
"height": 100
}
}
},
{
"id": "dw_1782022160265_i4vr22k1v",
"widgetType": "appShortcut",
"name": "Application Shortcut: PrismLauncher",
"enabled": true,
"config": {
"displayPreferences": [
"all"
],
"showOnOverlay": false,
"showOnOverview": false,
"showOnOverviewOnly": false,
"clickThrough": false,
"shortcutApp": "org.prismlauncher.PrismLauncher",
"followTheme": false,
"drawOutlines": false,
"syncPositionAcrossScreens": true
},
"positions": {
"DP-3": {
"width": 100,
"height": 100,
"x": 250,
"y": 900
},
"DP-4": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"HDMI-A-3": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"_synced": {
"x": 0.09765625,
"y": 0.8333333333333334,
"width": 100,
"height": 100
}
}
},
{
"id": "dw_1782022161442_3vfjq50gk",
"widgetType": "appShortcut",
"name": "Application Shortcut: Pokeclicker",
"enabled": true,
"config": {
"displayPreferences": [
"all"
],
"showOnOverlay": false,
"showOnOverview": false,
"showOnOverviewOnly": false,
"clickThrough": false,
"shortcutApp": "pokeclicker-desktop-with-scripts",
"followTheme": false,
"drawOutlines": false,
"syncPositionAcrossScreens": true
},
"positions": {
"DP-3": {
"width": 100,
"height": 100,
"x": 150,
"y": 900
},
"DP-4": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"HDMI-A-3": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"_synced": {
"x": 0.05859375,
"y": 0.8333333333333334,
"width": 100,
"height": 100
}
}
},
{
"id": "dw_1782022229421_fuo32iz2s",
"widgetType": "appShortcut",
"name": "Application Shortcut: Edge",
"enabled": true,
"config": {
"displayPreferences": [
"all"
],
"showOnOverlay": false,
"showOnOverview": false,
"showOnOverviewOnly": false,
"clickThrough": false,
"shortcutApp": "microsoft-edge",
"followTheme": false,
"drawOutlines": false,
"syncPositionAcrossScreens": true
},
"positions": {
"DP-3": {
"width": 150,
"height": 150,
"x": 50,
"y": 50
},
"DP-4": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"HDMI-A-3": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"_synced": {
"x": 0.01953125,
"y": 0.046296296296296294,
"width": 150,
"height": 150
} }
} }
}, },
@@ -1048,7 +912,7 @@
"id": "dw_1782022922490_aiumfxf49", "id": "dw_1782022922490_aiumfxf49",
"widgetType": "cavaVisualizer", "widgetType": "cavaVisualizer",
"name": "Cava Visualizer", "name": "Cava Visualizer",
"enabled": true, "enabled": false,
"config": { "config": {
"displayPreferences": [ "displayPreferences": [
"all" "all"
@@ -1083,8 +947,8 @@
"y": 440 "y": 440
}, },
"_synced": { "_synced": {
"x": 0.2734375, "x": 0.27313639322916666,
"y": 0.5092592592592593, "y": 0.5089156539351852,
"width": 1100, "width": 1100,
"height": 500 "height": 500
} }
@@ -1097,16 +961,19 @@
"enabled": true, "enabled": true,
"config": { "config": {
"displayPreferences": [ "displayPreferences": [
"all" {
"name": "DP-4",
"model": "ZOWIE XL LCD"
}
], ],
"syncPositionAcrossScreens": true, "syncPositionAcrossScreens": true,
"viewMode": "detailed", "viewMode": "compact",
"colorMode": "primary", "colorMode": "primary",
"backgroundOpacity": 80, "backgroundOpacity": 80,
"showPressure": true, "showPressure": true,
"forecastDays": 7, "forecastDays": 7,
"showHourlyForecast": true, "showHourlyForecast": false,
"hourlyCount": 6, "hourlyCount": 12,
"showLocation": false, "showLocation": false,
"showCondition": true, "showCondition": true,
"showFeelsLike": true "showFeelsLike": true
@@ -1131,17 +998,95 @@
"y": 440 "y": 440
}, },
"_synced": { "_synced": {
"x": 0.78125, "x": 0.859375,
"y": 0.32407407407407407, "y": 0.046296296296296294,
"width": 500, "width": 250,
"height": 650 "height": 250
}
}
},
{
"id": "dw_1782021988600_vdg97np4g",
"widgetType": "systemMonitor",
"name": "System Monitor",
"enabled": true,
"config": {
"showHeader": true,
"transparency": 0.8,
"colorMode": "primary",
"customColor": "#ffffff",
"showCpu": true,
"showCpuGraph": true,
"showCpuTemp": true,
"showGpuTemp": false,
"gpuPciId": "",
"showMemory": true,
"showMemoryGraph": true,
"showNetwork": true,
"showNetworkGraph": true,
"showDisk": true,
"showTopProcesses": false,
"topProcessCount": 3,
"topProcessSortBy": "cpu",
"layoutMode": "auto",
"graphInterval": 300,
"displayPreferences": [
{
"name": "DP-2",
"model": "SUN-4K"
},
{
"name": "DP-4",
"model": "ZOWIE XL LCD"
}
]
},
"positions": {
"DP-3": {
"width": 800,
"height": 350,
"x": 1650,
"y": 650
},
"DP-4": {
"width": 800,
"height": 350,
"x": 1100,
"y": 650
},
"HDMI-A-3": {
"width": 700,
"height": 350,
"x": 1200,
"y": 650
},
"DP-2": {
"width": 320,
"height": 480,
"x": 352,
"y": 144
} }
} }
} }
], ],
"desktopWidgetGroups": [], "desktopWidgetGroups": [],
"builtInPluginSettings": {}, "builtInPluginSettings": {
"dms_settings_search": {
"trigger": "?"
},
"dms_clipboard_search": {
"trigger": "cb"
}
},
"clipboardClickToPaste": false,
"clipboardEnterToPaste": false, "clipboardEnterToPaste": false,
"clipboardRememberTypeFilter": false,
"clipboardTypeFilter": "all",
"clipboardVisibleEntryActions": [
"pin",
"edit",
"delete"
],
"launcherPluginVisibility": { "launcherPluginVisibility": {
"obsidianSearch": { "obsidianSearch": {
"allowWithoutTrigger": false "allowWithoutTrigger": false
@@ -1151,5 +1096,24 @@
} }
}, },
"launcherPluginOrder": [], "launcherPluginOrder": [],
"configVersion": 5 "frameEnabled": false,
"frameThickness": 100,
"frameRounding": 100,
"frameColor": "surface",
"frameOpacity": 0.69,
"frameScreenPreferences": [
"all"
],
"frameBarSize": 100,
"frameShowOnOverview": false,
"frameBlurEnabled": true,
"frameCloseGaps": false,
"frameLauncherEmergeSide": "bottom",
"frameLauncherArcExtender": true,
"frameLauncherEdgeHover": true,
"frameMode": "connected",
"barInsetPaddingShared": -1,
"barInsetPaddingSyncAll": false,
"frameBarInsetPadding": 26,
"configVersion": 12
} }
@@ -0,0 +1,191 @@
#!/usr/bin/env python3
"""Generate a virtual-display EDID with 4K CTA VICs (trimmed from EnriqueWood POC)."""
import math
import sys
def cvt_rb(w, h, refresh):
hblank, hfront, hsync = 160, 48, 32
htotal = w + hblank
vfront, vsync = 3, 8
rb_min_vblank = 460e-6
vblank = math.ceil(rb_min_vblank * refresh * h / (1.0 - rb_min_vblank * refresh))
vblank = max(vblank, vfront + vsync + 6)
vtotal = h + vblank
pixclk_khz = int(round(htotal * vtotal * refresh / 10000.0)) * 10
return dict(
w=w,
h=h,
refresh=refresh,
htotal=htotal,
vtotal=vtotal,
hblank=hblank,
hfront=hfront,
hsync=hsync,
vblank=vblank,
vfront=vfront,
vsync=vsync,
pixclk_khz=pixclk_khz,
)
def make_dtd(t, hmm=600, vmm=340):
w, h = t["w"], t["h"]
hblank, vblank = t["hblank"], t["vblank"]
hfront, hsync = t["hfront"], t["hsync"]
vfront, vsync = t["vfront"], t["vsync"]
pc = t["pixclk_khz"] // 10
d = bytearray(18)
d[0] = pc & 0xFF
d[1] = (pc >> 8) & 0xFF
d[2] = w & 0xFF
d[3] = hblank & 0xFF
d[4] = ((w >> 4) & 0xF0) | ((hblank >> 8) & 0x0F)
d[5] = h & 0xFF
d[6] = vblank & 0xFF
d[7] = ((h >> 4) & 0xF0) | ((vblank >> 8) & 0x0F)
d[8] = hfront & 0xFF
d[9] = hsync & 0xFF
d[10] = ((vfront & 0x0F) << 4) | (vsync & 0x0F)
d[11] = (
(((hfront >> 8) & 3) << 6)
| (((hsync >> 8) & 3) << 4)
| (((vfront >> 4) & 3) << 2)
| ((vsync >> 4) & 3)
)
d[12] = hmm & 0xFF
d[13] = vmm & 0xFF
d[14] = ((hmm >> 4) & 0xF0) | ((vmm >> 8) & 0x0F)
d[17] = 0x1E
return bytes(d)
def make_name(name):
d = bytearray(18)
d[3] = 0xFC
nb = name.encode("ascii")[:13]
d[5 : 5 + len(nb)] = nb
pos = 5 + len(nb)
if pos < 18:
d[pos] = 0x0A
pos += 1
for i in range(pos, 18):
d[i] = 0x20
return bytes(d)
def make_range(min_v, max_v, min_h, max_h, max_pixclk_mhz):
d = bytearray(18)
d[3] = 0xFD
flags = 0
mv, mh = max_v, max_h
if mh > 255:
flags |= 0x08
mh -= 255
if mv > 255:
flags |= 0x02
mv -= 255
d[4] = flags
d[5] = min_v
d[6] = mv
d[7] = min_h
d[8] = mh
d[9] = max_pixclk_mhz // 10
d[10] = 0x01
for i in range(11, 18):
d[i] = 0x0A if i == 11 else 0x20
return bytes(d)
def checksum(block):
return (256 - (sum(block[:-1]) % 256)) % 256
VICS = [97, 118, 96, 95, 63, 16, 4]
def build_base(base_dtds, name, max_pixclk_mhz):
b = bytearray(128)
b[0:8] = b"\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00"
b[8:10] = b"\x50\x74"
b[10:12] = b"\x70\x02"
b[16] = 22
b[17] = 34
b[18] = 1
b[19] = 4
b[20] = 0xA5
b[21] = 60
b[22] = 34
b[23] = 120
b[24] = 0x2E
b[25:35] = bytes([0x35, 0x85, 0xA6, 0x56, 0x48, 0x9A, 0x24, 0x12, 0x50, 0x54])
for i in range(8):
b[38 + i * 2] = 0x01
b[39 + i * 2] = 0x01
b[54:72] = make_dtd(base_dtds[0])
b[72:90] = make_dtd(base_dtds[1])
b[90:108] = make_range(24, 240, 30, 510, max_pixclk_mhz)
b[108:126] = make_name(name)
b[126] = 1
b[127] = checksum(b)
return b
def build_cta_primary(dtds):
b = bytearray(128)
b[0] = 0x02
b[1] = 0x03
pos = 4
b[pos] = (2 << 5) | len(VICS)
for i, v in enumerate(VICS):
b[pos + 1 + i] = v
pos += 1 + len(VICS)
b[pos] = (1 << 5) | 3
b[pos + 1], b[pos + 2], b[pos + 3] = 0x17, 0x7F, 0x07
pos += 4
b[pos] = (4 << 5) | 3
b[pos + 1] = 0x4F
pos += 4
b[2] = pos
b[3] = 0x40
used, p = [], pos
for t in dtds:
if p + 18 > 127:
break
b[p : p + 18] = make_dtd(t)
used.append(t)
p += 18
b[127] = checksum(b)
return b, used
def build(custom, name, max_pixclk_mhz=1200):
if len(custom) < 2:
custom = custom + custom[:1] * (2 - len(custom))
base = build_base(custom[0:2], name, max_pixclk_mhz)
rest = custom[2:]
cta1, _used = build_cta_primary(rest)
base[126] = 1
base[127] = checksum(base)
return bytes(base + cta1)
def main():
output = sys.argv[1]
custom = [
cvt_rb(3840, 2160, 60),
cvt_rb(2560, 1440, 60),
cvt_rb(1920, 1080, 60),
]
edid = build(custom, "SUN-4K")
with open(output, "wb") as f:
f.write(edid)
assert len(edid) % 128 == 0
for i in range(len(edid) // 128):
block = edid[i * 128 : (i + 1) * 128]
assert sum(block) % 256 == 0
if __name__ == "__main__":
main()
@@ -1,9 +1,5 @@
# Extra local disks. Declared here, not in hardware.nix (hardware.nix is generated). # Extra local disks. Declared here, not in hardware.nix (hardware.nix is generated).
{ config, lib, ... }: { config, lib, ... }:
let
# Stable UID so NTFS `uid=` matches `users.users.olivier` (override if your account is not 1000).
olivierUid = config.users.users.olivier.uid or 1000;
in
{ {
users.users.olivier.uid = lib.mkDefault 1000; users.users.olivier.uid = lib.mkDefault 1000;
# LABEL="MediaLibrary" (btrfs on sda1 by UUID). No subvol=@ — this disk has no @ subvolume. # LABEL="MediaLibrary" (btrfs on sda1 by UUID). No subvol=@ — this disk has no @ subvolume.
@@ -33,15 +29,4 @@ in
# LABEL="Deep Storage Unit". Owner olivier, group nfsmedia (990) so: # LABEL="Deep Storage Unit". Owner olivier, group nfsmedia (990) so:
# - local logins write as user 1000 (owner rwx); # - local logins write as user 1000 (owner rwx);
# - NFS (all_squash → uid/gid 990) matches group 990 → rwx (see jellyfin-nfs-export). # - NFS (all_squash → uid/gid 990) matches group 990 → rwx (see jellyfin-nfs-export).
#fileSystems."/mnt/test" = {
# device = "/dev/disk/by-uuid/BC12E55E12E51DE0";
# fsType = "ntfs-3g";
# options = [
# "rw"
# "force"
# "uid=${toString olivierUid}"
# "gid=990"
# "umask=0002"
# ];
#};
} }
@@ -0,0 +1,107 @@
{ pkgs, inputs, ... }:
# All MediaTek MT7927 / MT6639 (Filogic 380) WiFi 7 + Bluetooth support for this
# host in one place: the upstream flake module, the hardware enablement, and the
# workarounds needed to actually make it function on nixos-unstable.
#
# Workaround background: on current nixos-unstable, `boot.extraModulePackages`
# modules placed in `extra/` are NOT indexed by `depmod` (modules.dep /
# modules.alias contain zero `extra/` entries). As a result `modprobe`/udev
# resolve mt7925e / btusb to the stock in-tree drivers, which do not support the
# MediaTek MT7927 (14c3:7927). We therefore force the patched out-of-tree modules
# to load by explicit path, blacklist the in-tree collisions so udev cannot bind
# them first, and fix the BT firmware path the driver expects.
let
# The upstream mt7927 flake installs the BT firmware under
# `mediatek/mt6639/`, but the patched btmtk driver requests it from
# `mediatek/mt7927/`. Provide it at the expected path.
mt7927BtFirmwareFix = pkgs.runCommand "mt7927-bt-firmware-fix" { } ''
src="${inputs.mt7927.packages.${pkgs.system}.firmware}/lib/firmware/mediatek/mt6639/BT_RAM_CODE_MT6639_2_1_hdr.bin"
install -Dm644 "$src" \
"$out/lib/firmware/mediatek/mt7927/BT_RAM_CODE_MT6639_2_1_hdr.bin"
'';
in
{
imports = [
inputs.mt7927.nixosModules.default
];
hardware.mediatek-mt7927 = {
enable = true;
enableWifi = true;
enableBluetooth = true;
disableAspm = true; # Highly recommended to fix upload speeds
};
hardware.firmware = [ mt7927BtFirmwareFix ];
boot.blacklistedKernelModules = [
# Whole mt76 stack (patched extra/ copy replaces it entirely).
"mt76"
"mt76_connac_lib"
"mt792x_lib"
"mt7921_common"
"mt7921e"
"mt7925_common"
"mt7925e"
# Patched bluetooth.
"btusb"
"btmtk"
];
systemd.services.mt7927-force = {
description = "Force-load patched MediaTek MT7927 (Filogic 380) kernel modules";
wantedBy = [ "multi-user.target" ];
before = [ "network.target" "NetworkManager.service" ];
path = [ pkgs.kmod ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
};
script = ''
KVER="$(uname -r)"
EXTRA="/run/booted-system/kernel-modules/lib/modules/$KVER/extra"
# Load in-tree core dependencies (these ARE indexed, so modprobe works).
modprobe mac80211 cfg80211 rfkill led-class bluetooth || true
# Defensive: drop any in-tree mt76 modules that may have been pulled in
# (e.g. via boot.kernelModules) so the patched copies can bind instead.
rmmod mt7925e mt7921e mt7925_common mt7921_common mt792x_lib mt76_connac_lib mt76 2>/dev/null || true
insmod_x() {
local mod="$1"
local name
name="''${mod##*/}"; name="''${name%.ko}"
if lsmod | grep -q "^$name "; then
echo "mt7927-force: $name already loaded, skipping"
else
echo "mt7927-force: insmod $mod"
insmod "$mod" || echo "mt7927-force: FAILED to insmod $mod"
fi
}
# Patched mt76 stack (full replacement, dependency order).
insmod_x "$EXTRA/mt76/mt76.ko"
insmod_x "$EXTRA/mt76/mt76-connac-lib.ko"
insmod_x "$EXTRA/mt76/mt792x-lib.ko"
insmod_x "$EXTRA/mt76/mt7921/mt7921-common.ko"
insmod_x "$EXTRA/mt76/mt7925/mt7925-common.ko"
insmod_x "$EXTRA/mt76/mt7921/mt7921e.ko"
insmod_x "$EXTRA/mt76/mt7925/mt7925e.ko"
# Patched bluetooth. The patched btmtk/btusb need symbols from the
# in-tree bluetooth core (bluetooth.ko) and the btrtl/btintel/btbcm
# helpers, so load those first (they are indexed and modprobe-able).
for m in bluetooth btrtl btintel btbcm rfkill ecdh_generic ecc crc16; do
if modprobe "$m" 2>/dev/null; then
echo "mt7927-force: modprobe $m ok"
else
echo "mt7927-force: modprobe $m FAILED (continuing)"
fi
done
insmod_x "$EXTRA/bluetooth/btmtk.ko"
insmod_x "$EXTRA/bluetooth/btusb.ko"
'';
};
}
+1 -1
View File
@@ -15,5 +15,5 @@ lib.mkIf (!config.chiasson.system.gpuPassthru.enable) {
package = config.boot.kernelPackages.nvidiaPackages.latest; package = config.boot.kernelPackages.nvidiaPackages.latest;
}; };
hardware.nvidia-container-toolkit.enable = true; hardware.nvidia-container-toolkit.enable = lib.mkDefault true;
} }
@@ -0,0 +1,115 @@
# Headless 4K virtual output for Sunshine → Moonlight on a client TV.
#
# NVIDIA: force-enable a spare DRM connector with a custom EDID via kernel params:
# video=<connector>:e force-enables the connector
# drm.edid_firmware=<connector>:… loads modes from the EDID blob
#
# Capture is pinned to the connector by name (Sunshine `output_name`), which is
# stable across reboots/hotplug — unlike a numeric monitor index.
# Reboot after changing connector or EDID. 4K@60 is realistic on RTX 2070.
{ config, lib, pkgs, ... }:
let
cfg = config.chiasson.system.streamingDisplay;
edidFirmware = pkgs.runCommand "sunshine-virtual-4k-edid" {
nativeBuildInputs = [ pkgs.python3 ];
} ''
mkdir -p $out/lib/firmware/edid
${pkgs.python3}/bin/python3 ${./generate-virtual-edid.py} $out/lib/firmware/edid/${cfg.edidFileName}
'';
# On stream start: scale + focus the virtual 4K output so streamed windows
# land there. Capture is pinned to the connector via Sunshine `output_name`,
# so no fragile numeric-index detection is needed.
streamDisplayUp = pkgs.writeShellScriptBin "stream-display-up" ''
${pkgs.niri}/bin/niri msg output ${cfg.connector} scale ${toString cfg.niriScale}
${pkgs.niri}/bin/niri msg action focus-monitor ${cfg.connector}
${pkgs.niri}/bin/niri msg action move-window-to-monitor ${cfg.connector} || true
'';
streamDisplayDown = pkgs.writeShellScriptBin "stream-display-down" ''
${pkgs.niri}/bin/niri msg action focus-monitor ${cfg.focusMonitorOnEnd}
'';
in
{
options.chiasson.system.streamingDisplay = {
enable = lib.mkEnableOption ''
Force-enable a spare NVIDIA DRM connector with a 4K EDID for Sunshine/Moonlight.
Requires reboot. Pair with `chiasson.desktop.niri` output config in `displays.nix`.
'';
connector = lib.mkOption {
type = lib.types.str;
default = "DP-2";
example = "HDMI-A-1";
description = ''
DRM connector name (e.g. `DP-2`, `HDMI-A-1`). Must be unused on the host
14900k desk uses DP-3, DP-4, and HDMI-A-3 by default.
'';
};
edidFileName = lib.mkOption {
type = lib.types.str;
default = "virtual-4k.bin";
description = "Filename under `/lib/firmware/edid/` referenced by `drm.edid_firmware`.";
};
mode = lib.mkOption {
type = lib.types.str;
default = "3840x2160@60";
description = "Mode Niri should use on the virtual output (must match EDID).";
};
niriPosition = lib.mkOption {
type = lib.types.str;
default = "x=7680 y=0";
description = ''
Niri `position` for the virtual panel keep it clear of desk monitors
so streamed windows do not overlap your ultrawide layout.
'';
};
niriScale = lib.mkOption {
type = lib.types.float;
default = 1.5;
example = 1.5;
description = ''
Niri `scale` on the virtual panel. Values above 1.0 enlarge UI and text
on the 4K framebuffer (helpful when viewing on a TV from the couch).
'';
};
focusMonitorOnEnd = lib.mkOption {
type = lib.types.str;
default = "DP-3";
description = "Niri monitor to refocus when a Moonlight session ends.";
};
};
config = lib.mkIf cfg.enable (lib.mkMerge [
{
hardware.firmware = [ edidFirmware ];
boot.kernelParams = [
"video=${cfg.connector}:e"
"drm.edid_firmware=${cfg.connector}:edid/${cfg.edidFileName}"
];
environment.systemPackages = [
streamDisplayUp
streamDisplayDown
];
}
(lib.mkIf config.chiasson.system.gaming.sunshine.enable {
services.sunshine.settings = {
capture = "wlr";
# Pin capture to the virtual display by connector name (stable across
# reboots/hotplug). A numeric index drifted to the ultrawide before.
output_name = cfg.connector;
# RTX 2070 has no AV1 NVENC; avoid probing av1_nvenc.
encoder = "hevc_nvenc,h264_nvenc";
global_prep_cmd = "[{\"do\":\"${streamDisplayUp}/bin/stream-display-up\",\"undo\":\"${streamDisplayDown}/bin/stream-display-down\"}]";
};
})
]);
}
+44
View File
@@ -0,0 +1,44 @@
# VM self-test overrides — used with nixos-rebuild build-vm to try the system
# in a VM without rebuilding/rebooting the host.
{ config, lib, pkgs, ... }:
{
virtualisation.vmVariant = {
config = {
hardware.nvidia-container-toolkit.enable = lib.mkForce false;
hardware.nvidia.package = lib.mkForce null;
services.xserver.videoDrivers = lib.mkForce [ "modesetting" ];
virtualisation = {
memorySize = 4096;
cores = 3;
graphics = true;
qemu.options = [
"-device virtio-vga-gl"
"-display gtk,gl=on"
];
};
users.users.olivier = {
initialPassword = lib.mkForce "";
hashedPasswordFile = lib.mkForce null; # Disable the secret file dependency
};
# Force greetd's `initial_session` directly. We can't rely on
# `services.displayManager.autoLogin` because DankGreeter's flake module
# (inputs.dms.nixosModules.greeter) aggressively overwrites
# `services.greetd.settings`, clobbering whatever the displayManager
# module injects for auto-login. mkForce on `initial_session` alone wins
# against DMS without touching `default_session` (DankGreeter), so a
# manual logout in the VM still shows DankGreeter. VM-only — host build
# is unaffected because this whole block lives under vmVariant.
services.greetd.settings.initial_session = lib.mkForce {
command = "${pkgs.niri}/bin/niri-session";
user = "olivier";
};
environment.systemPackages = [ pkgs.grc ];
};
};
}
+12 -2
View File
@@ -15,16 +15,21 @@
self.nixosModules."client-services" self.nixosModules."client-services"
./_private/platform.nix ./_private/platform.nix
./_private/nvidia.nix ./_private/nvidia.nix
./_private/vm-self.nix
./_private/gpu-passthru.nix ./_private/gpu-passthru.nix
./_private/peripherals.nix ./_private/peripherals.nix
# ./_private/printing-epson.nix # ./_private/printing-epson.nix
./_private/displays.nix ./_private/displays.nix
./_private/streaming-display.nix
./_private/ai.nix
./_private/media-disk.nix ./_private/media-disk.nix
./_private/mediatek-mt7927.nix
./_private/jellyfin-nfs-export.nix ./_private/jellyfin-nfs-export.nix
./_private/moonfin-flatpak.nix ./_private/moonfin-flatpak.nix
]; ];
services.cloudflare-warp.enable = true; services.cloudflare-warp.enable = true;
programs.nix-ld.enable = true;
boot.kernel.sysctl."fs.inotify.max_user_watches" = 1048576; boot.kernel.sysctl."fs.inotify.max_user_watches" = 1048576;
boot.kernel.sysctl."fs.inotify.max_user_instances" = 2048; boot.kernel.sysctl."fs.inotify.max_user_instances" = 2048;
@@ -40,7 +45,6 @@
libvdpau-va-gl libvdpau-va-gl
]; ];
}; };
environment.sessionVariables = { environment.sessionVariables = {
LIBVA_DRIVER_NAME = "iHD"; LIBVA_DRIVER_NAME = "iHD";
# Force VA-API to use the Intel iGPU render node (otherwise libva may pick NVIDIA and iHD fails). # Force VA-API to use the Intel iGPU render node (otherwise libva may pick NVIDIA and iHD fails).
@@ -76,6 +80,10 @@
gaming.sunshine.enable = true; gaming.sunshine.enable = true;
gaming.sunshine.cudaSupport = true; gaming.sunshine.cudaSupport = true;
streamingDisplay.enable = true;
# Spare NVIDIA port — verify with: grep -H . /sys/class/drm/card*-*/status
streamingDisplay.connector = "DP-2";
monitorInput.enable = true; monitorInput.enable = true;
flatpak.enable = true; flatpak.enable = true;
@@ -92,7 +100,9 @@
yt-dlp yt-dlp
# Native install (avoid flatpak sandbox issues for QSV/VAAPI). # Native install (avoid flatpak sandbox issues for QSV/VAAPI).
handbrake # handbrake # TEMP removed 2026-07-13 — depends on broken ffmpeg-full-8.1.2
# # (A01-mov-read patch fails against 8.1.2 source). Re-enable
# # when nixpkgs regenerates the patch or when switching to stable.
qbittorrent qbittorrent
-2
View File
@@ -4,8 +4,6 @@
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { specialArgs = {
inherit self inputs; inherit self inputs;
host = "14900k";
system = "x86_64-linux";
}; };
modules = [ modules = [
self.nixosModules."14900kConfiguration" self.nixosModules."14900kConfiguration"
+7
View File
@@ -23,6 +23,13 @@
pokeclicker.enable = true; pokeclicker.enable = true;
}; };
editors.vscode = {
enable = true;
extensions = with pkgs.vscode-extensions; [
alefragnani.project-manager
johnpapa.vscode-peacock
];
};
}; };
} }
]; ];
+1 -5
View File
@@ -17,10 +17,6 @@
userCli.enable = true; userCli.enable = true;
}; };
chiasson.users.extraModules.olivier = chiasson.users.extraModules.olivier = self.lib.wisdomCatalogExtraModules self;
self.lib.wisdomCatalogExtraModules self
++ [
self.homeManagerModules.desktopHomeDefaults
];
}; };
} }
-77
View File
@@ -1,77 +0,0 @@
# Shared HM defaults for desktop hosts (git identity, wisdom catalog toggles).
{ ... }: {
flake.homeManagerModules.desktopHomeDefaults =
{ lib, pkgs, ... }:
let
aarch64 = pkgs.stdenv.hostPlatform.isAarch64;
in
{
programs.git = {
enable = lib.mkDefault true;
settings.user = {
name = "OlivierChiasson";
email = "olivierchiasson@hotmail.fr";
};
};
#TODO[epic=Moderate] Check if git-crypt should belong in desktop-home-base.
home.packages = [ pkgs.git-crypt ];
chiasson.home = {
shell = {
fish.enable = lib.mkDefault true;
ohMyPosh.enable = lib.mkDefault true;
yazi.enable = lib.mkDefault true;
};
terminals.kitty.enable = lib.mkDefault true;
filebrowsers.nemo.enable = lib.mkDefault true;
browsers = {
chrome.enable = lib.mkDefault false;
chromiumHevc = {
enable = lib.mkDefault true;
packages = lib.mkDefault (
if aarch64 then
[ "chromium" ]
else
[ "google-chrome" ]
);
} // lib.optionalAttrs (!aarch64) {
vaapi.gpu = lib.mkDefault "intel";
};
edge.enable = lib.mkDefault false;
flow.enable = lib.mkDefault false;
orion.enable = lib.mkDefault false;
zen.enable = lib.mkDefault false;
};
editors = {
cursor.enable = lib.mkDefault true;
kate.enable = lib.mkDefault false;
obsidian.enable = lib.mkDefault true;
};
apps = {
discord.enable = lib.mkDefault false;
localsend.enable = lib.mkDefault true;
pokeclicker.enable = lib.mkDefault false;
spotify = {
enable = lib.mkDefault false;
openDiscoveryFirewall = lib.mkDefault false;
};
};
desktop = {
screenshot = {
enable = lib.mkDefault true;
swiftshareApiKeyFile = "/run/secrets/swiftshare/API_KEY"; #TODO[epic=sops] redo this by passing sops file output directly
};
theming.enable = lib.mkDefault true;
};
hardware.uconsoleGamepad.enable = lib.mkDefault false;
};
};
}
+1 -6
View File
@@ -42,12 +42,7 @@
# rebuilds Mobile NixOS' script-loader against the patched mruby. # rebuilds Mobile NixOS' script-loader against the patched mruby.
chiasson.system.ideapadMrubyOverlay.enable = true; chiasson.system.ideapadMrubyOverlay.enable = true;
# Wi-Fi modem (qcom-wcn3990) + Bluetooth (QCA crnv32) need binary blobs. # Wi-Fi modem (qcom-wcn3990) + Bluetooth (QCA crnv32) need binary blobs
nixpkgs.config.allowUnfreePredicate =
pkg: builtins.elem (lib.getName pkg) [
"chromeos-sc7180-unredistributable-firmware"
"chromeos-sc7180-unredistributable-firmware-zstd"
];
hardware.firmware = [ pkgs.chromeos-sc7180-unredistributable-firmware ]; hardware.firmware = [ pkgs.chromeos-sc7180-unredistributable-firmware ];
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;
-2
View File
@@ -4,8 +4,6 @@
system = "aarch64-linux"; system = "aarch64-linux";
specialArgs = { specialArgs = {
inherit self inputs; inherit self inputs;
host = "ideapad";
system = "aarch64-linux";
}; };
modules = [ modules = [
self.nixosModules.ideapadConfiguration self.nixosModules.ideapadConfiguration
-13
View File
@@ -4,18 +4,5 @@
{ self, ... }: { self, ... }:
{ {
imports = [ self.nixosModules.desktopHomeBase ]; imports = [ self.nixosModules.desktopHomeBase ];
# Host-only HM overrides (tablet apps, toggles off from desktop-home-base, …).
chiasson.users.extraModules.olivier = [
# {
# chiasson.home = {
# # editors.kate.enable = true;
# };
# }
# (
# { pkgs, ... }:
# { home.packages = with pkgs; [ ]; }
# )
];
}; };
} }
@@ -16,7 +16,7 @@ in
"blackfry.day" "blackfry.day"
"yestur.day" "yestur.day"
"rp-own.life" "rp-own.life"
"xn--1iu.cc" ".cc"
]; ];
proxied = true; proxied = true;
ipv4 = true; ipv4 = true;
+19 -2
View File
@@ -1,5 +1,13 @@
{ lib, ... }: { lib, config, ... }:
let
secretFilePath = ../secrets.yaml;
in
{ {
sops.secrets."cloudflare-turnstile/secret-key".sopsFile = secretFilePath;
sops.secrets."cloudflare-turnstile/site-key".sopsFile = secretFilePath;
services.gitea = { services.gitea = {
enable = true; enable = true;
@@ -22,7 +30,16 @@
SSH_LISTEN_PORT = 222; SSH_LISTEN_PORT = 222;
}; };
service.DISABLE_REGISTRATION = false; service = {
DISABLE_REGISTRATION = false;
ENABLE_CAPTCHA = true;
CAPTCHA_TYPE = "cfturnstile";
CF_TURNSTILE_SECRET = config.sops.secrets."cloudflare-turnstile/secret-key".path;
CF_TURNSTILE_SITEKEY = config.sops.secrets."cloudflare-turnstile/site-key".path;
REGISTER_EMAIL_CONFIRM = false;
ENABLE_NOTIFY_MAIL = false;
};
}; };
}; };
@@ -1,35 +0,0 @@
# NFS mounts of nixdesk (14900k) bulk storage for nix-server. Exports live in
# modules/hosts/14900k/_private/jellyfin-nfs-export.nix
#
# Jellyfin library paths (see also services/jellyfin.nix):
# Movies → /mnt/nixdesk-jellyfin/movies
# Shows → /mnt/nixdesk-jellyfin/tv
#
# If you see "Stale file handle" under /mnt after changing exports or fsid on nixdesk, drop the
# old client mount and let automount reattach, e.g.:
# sudo umount -l /mnt/nixdesk-jellyfin
# ls /mnt/nixdesk-jellyfin
# (or reboot nix-server.)
{ ... }:
let
nfsExportHost = "192.168.2.25";
# nfsvers+tcp: predictable Linux↔Linux; lookupcache=none: fewer stale dentries after export changes.
nfsClientOpts = [
"rw"
"noatime"
"nofail"
"_netdev"
"nfsvers=3"
"tcp"
"lookupcache=none"
"x-systemd.automount"
"x-systemd.idle-timeout=3600"
];
in
{
fileSystems."/mnt/nixdesk-jellyfin" = {
device = "${nfsExportHost}:/mnt/deep/jellyfin";
fsType = "nfs";
options = nfsClientOpts;
};
}
-2
View File
@@ -3,8 +3,6 @@
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { specialArgs = {
inherit self inputs; inherit self inputs;
host = "nix-server";
system = "x86_64-linux";
}; };
modules = [ modules = [
self.nixosModules.nix-serverConfiguration self.nixosModules.nix-serverConfiguration
+5 -2
View File
@@ -17,6 +17,9 @@ personal-website:
oauth-discord-client-secret: ENC[AES256_GCM,data:YegPgoSRKNcDaID9LPWxHDz4T7VnhFfuWMyALfFhpg8=,iv:VSLWA1HG1+Y70tKnRoFulBZSKdoJTYmIDzCXIZeFYCc=,tag:yNR8rrm/7Mrj/RIVNLFfsg==,type:str] oauth-discord-client-secret: ENC[AES256_GCM,data:YegPgoSRKNcDaID9LPWxHDz4T7VnhFfuWMyALfFhpg8=,iv:VSLWA1HG1+Y70tKnRoFulBZSKdoJTYmIDzCXIZeFYCc=,tag:yNR8rrm/7Mrj/RIVNLFfsg==,type:str]
cloudflare-ddns: cloudflare-ddns:
api-token: ENC[AES256_GCM,data:wFKbclETO0YQTcfNUdKyr6mxQODeiaYn3gLeC1mWeRda97rOvlum+Q==,iv:IuT4exNhh0z+9DbY3WNnVqEy4398DTm7aluhOv9XFss=,tag:GGPoSJLBScTmXyQ7Vab6EA==,type:str] api-token: ENC[AES256_GCM,data:wFKbclETO0YQTcfNUdKyr6mxQODeiaYn3gLeC1mWeRda97rOvlum+Q==,iv:IuT4exNhh0z+9DbY3WNnVqEy4398DTm7aluhOv9XFss=,tag:GGPoSJLBScTmXyQ7Vab6EA==,type:str]
cloudflare-turnstile:
secret-key: ENC[AES256_GCM,data:fSsH5HRLvzwyovBezNQnil7due6+FCE2yW/S91aOwqb4yow=,iv:7hTu9YyACvOys42n8XFBmVykKJ0op8btb3xQ6tGpqP4=,tag:Z4FvKKPsb1rAQuWY4v5frg==,type:str]
site-key: ENC[AES256_GCM,data:qKmx5EY3Yl5A3zsofFfskN3DrZI+yrHJ,iv:ZGnhkm12VG/O0TNQsKOIb53BlxXPqhBmSPh6rlLGpN4=,tag:C0vQsXRil72z6SRoLiifcA==,type:str]
sops: sops:
age: age:
- enc: | - enc: |
@@ -46,7 +49,7 @@ sops:
Nf0uOoSWPTJ/2SRNkSu7FMumATH4ldQ6TFSwKda3mBfBwhnFzLq10Q== Nf0uOoSWPTJ/2SRNkSu7FMumATH4ldQ6TFSwKda3mBfBwhnFzLq10Q==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
recipient: age1p05z980kdtngk9mw67hfev72h7xhslplpxfk9yskgmf0hl4lu3ls04zht9 recipient: age1p05z980kdtngk9mw67hfev72h7xhslplpxfk9yskgmf0hl4lu3ls04zht9
lastmodified: "2026-06-12T00:44:20Z" lastmodified: "2026-07-10T20:47:30Z"
mac: ENC[AES256_GCM,data:cyI5NH6+OR/Q4T3atFN+gXsJbRaR/Q5I+MyJHy5qXsShh8LnQvEKBnnIPKz2xpuDwFvKd4DabMOxcu5xe6IRH9TN7G411vp+vruM+TicoCJ4U2xAP/J9Tlh3YKT6kZJqj/zAhvP5qPCzvz7xkFTvluLrWgPlaHWn/rlCskh0t5M=,iv:WBeS1rqjJblNGMVa7hEn5MXbZJU8WKd6541BCxu2rGI=,tag:OfOzQI6ESUdUYCbBEq9GFw==,type:str] mac: ENC[AES256_GCM,data:gqrsaZ7GwS+qkuVRwGkrTJjL1qfBid3RdbGLEZIr1P4XuKatqiFWs0ihj/Qm6jItktoPXwMHcejzx/wQgTImBvdNXDW5TbgF39VJYCZ8r/ToTX2LdZXCBJHim8F9eVE+aBJfsb/LHyvTJLcp3BgrOFyNYjt067585hDt/D3Tmh0=,iv:cKUPZI1lH1wMJVhgR0/TB3iDU6TUSv8vLo+vlThk2AU=,tag:eT2BwsN8mL5RgpQ+pAaKPg==,type:str]
unencrypted_suffix: _unencrypted unencrypted_suffix: _unencrypted
version: 3.13.1 version: 3.13.1
@@ -1,28 +0,0 @@
# NFS mounts of nixdesk (14900k) bulk storage for r5500. Exports live in
# modules/hosts/14900k/_private/jellyfin-nfs-export.nix
#
# Jellyfin library paths:
# Movies → /mnt/nixdesk-jellyfin/movies
# Shows → /mnt/nixdesk-jellyfin/tv
{ ... }:
let
nfsExportHost = "192.168.2.25";
nfsClientOpts = [
"rw"
"noatime"
"nofail"
"_netdev"
"nfsvers=3"
"tcp"
"lookupcache=none"
"x-systemd.automount"
"x-systemd.idle-timeout=3600"
];
in
{
fileSystems."/mnt/nixdesk-jellyfin" = {
device = "${nfsExportHost}:/mnt/deep/jellyfin";
fsType = "nfs";
options = nfsClientOpts;
};
}
+1 -1
View File
@@ -17,7 +17,7 @@
./_private/media-disk.nix ./_private/media-disk.nix
./_private/media-paths.nix ./_private/media-paths.nix
./_services/docker-media.nix ./_services/docker-media.nix
./_services/nixdesk-nfs-client.nix self.nixosModules.nixdeskJellyfin
./_services/jellyfin.nix ./_services/jellyfin.nix
./_services/sonarr.nix ./_services/sonarr.nix
./_services/radarr.nix ./_services/radarr.nix
-2
View File
@@ -3,8 +3,6 @@
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { specialArgs = {
inherit self inputs; inherit self inputs;
host = "r5500";
system = "x86_64-linux";
}; };
modules = [ modules = [
self.nixosModules.r5500Configuration self.nixosModules.r5500Configuration
-9
View File
@@ -19,10 +19,6 @@
./_private/firmware.nix ./_private/firmware.nix
]; ];
sops.secrets."tailscale/auth-key" = {
mode = "0400";
};
chiasson.system.librepods.enable = true; chiasson.system.librepods.enable = true;
chiasson.system.palera1n.enable = true; chiasson.system.palera1n.enable = true;
@@ -76,11 +72,6 @@
networking = { networking = {
hostName = "t2mbp"; hostName = "t2mbp";
networkManager.enable = true; networkManager.enable = true;
tailscale = {
enable = true;
authKeyFile = config.sops.secrets."tailscale/auth-key".path;
acceptRoutes = true;
};
}; };
}; };
-2
View File
@@ -4,8 +4,6 @@
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { specialArgs = {
inherit self inputs; inherit self inputs;
host = "t2mbp";
system = "x86_64-linux";
}; };
modules = [ modules = [
self.nixosModules.t2mbpConfiguration self.nixosModules.t2mbpConfiguration
+10 -4
View File
@@ -1,21 +1,27 @@
{ self, inputs, ... }: { self, inputs, ... }:
{ {
flake.nixosModules.t2mbpHome = flake.nixosModules.t2mbpHome =
{ self, ... }: { self, pkgs, ... }:
{ {
imports = [ self.nixosModules.desktopHomeBase ]; imports = [ self.nixosModules.desktopHomeBase ];
chiasson.users.extraModules.olivier = [ chiasson.users.extraModules.olivier = [
{ {
chiasson.home = { chiasson.home = {
browsers = { browsers.edge.enable = true;
edge.enable = true;
};
apps = { apps = {
discord.enable = true; discord.enable = true;
pokeclicker.enable = true; pokeclicker.enable = true;
}; };
editors.vscode = {
enable = true;
extensions = with pkgs.vscode-extensions; [
alefragnani.project-manager
johnpapa.vscode-peacock
];
};
}; };
} }
]; ];
-2
View File
@@ -4,8 +4,6 @@
specialArgs = inputs // { specialArgs = inputs // {
inherit self; inherit self;
inputs = inputs; inputs = inputs;
host = "uConsole";
system = "aarch64-linux";
}; };
trustCaches = false; trustCaches = false;
modules = [ modules = [
+9 -3
View File
@@ -1,14 +1,20 @@
{ self, inputs, ... }: { self, inputs, ... }:
{ {
flake.nixosModules.uConsoleHome = flake.nixosModules.uConsoleHome =
{ self, ... }: { self, pkgs, ... }:
{ {
imports = [ self.nixosModules.desktopHomeBase ]; imports = [ self.nixosModules.desktopHomeBase ];
chiasson.users.extraModules.olivier = [ chiasson.users.extraModules.olivier = [
{ {
chiasson.home = { chiasson.home.hardware.uconsoleGamepad.enable = true;
hardware.uconsoleGamepad.enable = true;
chiasson.home.editors.vscode = {
enable = true;
extensions = with pkgs.vscode-extensions; [
alefragnani.project-manager
johnpapa.vscode-peacock
];
}; };
} }
]; ];
-33
View File
@@ -1,33 +0,0 @@
# Build a raw Navi hive attrset from host specs + deployment targets.
# Call `inputs.navi.lib.makeHive` on the result to produce `flake.naviHive`.
{ lib, inputs, ... }: {
flake.lib.mkNaviHiveConfig =
{
metaNixpkgs,
hostSpecs,
deployments,
}:
let
deployNodes = lib.filterAttrs (name: _: deployments ? ${name}) hostSpecs;
in
{
meta = {
nixpkgs = metaNixpkgs;
nodeNixpkgs = lib.mapAttrs (
name: spec:
import inputs.nixpkgs {
system = spec.system;
}
) deployNodes;
nodeSpecialArgs = lib.mapAttrs (_: spec: spec.specialArgs) deployNodes;
allowApplyAll = false;
};
}
// lib.mapAttrs (
name: spec:
{
imports = spec.modules or [ spec.configuration ];
deployment = deployments.${name};
}
) deployNodes;
}
-30
View File
@@ -1,30 +0,0 @@
{ ... }: {
flake.lib.rbwSshSocket =
let
bashSnippet = ''
if [ -z "''${SSH_AUTH_SOCK:-}" ]; then
if [ -n "''${XDG_RUNTIME_DIR:-}" ]; then
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/rbw/ssh-agent-socket"
else
export SSH_AUTH_SOCK="/run/user/$(id -u)/rbw/ssh-agent-socket"
fi
fi
'';
fishSnippet =
pkgs: ''
if test -z "$SSH_AUTH_SOCK"
if test -n "$XDG_RUNTIME_DIR"
set -gx SSH_AUTH_SOCK "$XDG_RUNTIME_DIR/rbw/ssh-agent-socket"
else
set -l _hm_uid (${pkgs.coreutils}/bin/id -u)
set -gx SSH_AUTH_SOCK "/run/user/$_hm_uid/rbw/ssh-agent-socket"
end
end
'';
in
{
inherit bashSnippet fishSnippet;
sessionVariable = "$XDG_RUNTIME_DIR/rbw/ssh-agent-socket";
activationPath = "/run/user/$(id -u)/rbw/ssh-agent-socket";
};
}
-131
View File
@@ -1,131 +0,0 @@
{ lib, ... }: {
flake.lib.sshInventory =
let
hosts = {
"14900k" = {
hostName = "192.168.2.25";
aliases = [ "14900k" "nixdesk" ];
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILwUevBGnf+Y/sL1ZsB4bt0c50a89iqwPRoYUGP4UHsL 14900k";
};
ideapad = {
hostName = "192.168.2.229";
aliases = [ "ideapad" ];
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIQwaaI90xIMjZ46EcMyO8kBwGCxf7qVL75IYhw8Ssze ideapad";
};
t2mbp = {
hostName = "192.168.2.15";
aliases = [ "t2mbp" ];
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMhVWB9YXl/FuQvufle4VWUas/QM8qCKoRd5a83Tt3S6 t2mbp";
};
uConsole = {
hostName = "192.168.2.99";
aliases = [ "uConsole" "uconsole" ];
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAVPR0lRAcywPR7iTchM3+eO7NCdXAR6NPzYXxalr+dP uConsole";
};
test = {
hostName = "test";
aliases = [ "test" ];
publicKey = null;
};
nix-server = {
hostName = "192.168.2.238";
aliases = [ "nix-server" ];
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL3KDicMjtOFR6LfZrFzfAD1gdYUdwv6ZM4PSgtmIuzd nix-server";
};
r5500 = {
hostName = "192.168.2.100";
aliases = [ "r5500" ];
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK7iWCEtkYDLZFRF3w1gzyAok5VCAGUOwu4iWZdMjf3D r5500";
};
};
mkIdentityFileName = hostName: ".ssh/id_ed25519_${lib.strings.toLower hostName}.pub";
activeHosts = builtins.removeAttrs hosts (
builtins.filter (name: hosts.${name}.publicKey == null) (builtins.attrNames hosts)
);
mkIdentityFiles = selectedHosts:
builtins.listToAttrs (
builtins.map
(hostName: {
name = mkIdentityFileName hostName;
value.text = "${selectedHosts.${hostName}.publicKey}\n";
})
(builtins.attrNames selectedHosts)
);
# Gitea git-over-SSH listens on port 222. System SSH (nix deploy, server@…) uses port 22
# via the catalog `nix-server` Host block — never list nix-server or 192.168.2.238 here.
giteaSshBlock = identityAgent: ''
Host git.chiasson.cloud gitea
HostName 192.168.2.238
Port 222
User git
IdentityAgent ${identityAgent}
IdentitiesOnly no
Match host nix-server,192.168.2.238 user git
HostName 192.168.2.238
Port 222
User git
IdentityAgent ${identityAgent}
IdentitiesOnly no
'';
mkSshConfigTemplate =
{
selectedHosts ? activeHosts,
user ? null,
identityAgent ? "__RBW_SSH_SOCK__",
}:
let
hostBlocks = builtins.map
(hostName:
let
entry = selectedHosts.${hostName};
hostPatterns = builtins.concatStringsSep " " (entry.aliases ++ [ entry.hostName ]);
userLine = if user == null then "" else " User ${user}\n";
portLine =
if hostName == "nix-server" then
" Port 22\n"
else
"";
in
''
Host ${hostPatterns}
HostName ${entry.hostName}
${userLine}${portLine} IdentityFile ~/${mkIdentityFileName hostName}
IdentityAgent ${identityAgent}
IdentitiesOnly yes
'')
(builtins.attrNames selectedHosts);
in
builtins.concatStringsSep "\n" (
[
(giteaSshBlock identityAgent)
]
++ hostBlocks
++ [
''
Host *
IdentitiesOnly yes
IdentityAgent none
''
]
);
in
{
inherit hosts activeHosts mkIdentityFiles mkSshConfigTemplate;
authorizedKeys = lib.unique (
builtins.map (entry: entry.publicKey) (builtins.attrValues activeHosts)
);
identityFiles = mkIdentityFiles activeHosts;
sshConfigTemplate = mkSshConfigTemplate { };
};
}
-99
View File
@@ -1,99 +0,0 @@
# Pure helpers: catalog → NixOS/HM/SSH shapes (`self.lib.usersMerge lib`).
{ ... }: {
flake.lib.usersMerge =
lib:
let
userHm = user: user.homeManager or { };
userSsh = user: user.ssh or { };
in
rec {
resolveHomeManagerModule =
moduleSpec:
let
t = builtins.typeOf moduleSpec;
in
if t == "path" || t == "string" then import moduleSpec else moduleSpec;
selectedUsersAttr =
{ catalog, enabled, hostOverrides }:
lib.listToAttrs (
map (name: {
inherit name;
value = lib.recursiveUpdate catalog.${name} (hostOverrides.${name} or { });
}) enabled
);
missingEnabledNames = catalog: enabled: builtins.filter (name: !(builtins.hasAttr name catalog)) enabled;
strayHomeUserKeys = homeUsers: enabled:
builtins.filter (k: !(builtins.elem k enabled)) (builtins.attrNames homeUsers);
mkNixosUser =
name: user:
{
isNormalUser = user.isNormalUser or true;
description = user.description or name;
extraGroups = user.extraGroups or [ ];
}
// lib.optionalAttrs (user ? hashedPasswordFile && user.hashedPasswordFile != null) {
hashedPasswordFile = user.hashedPasswordFile;
};
hmWiredNames =
selectedUsers:
lib.attrNames (
lib.filterAttrs (_: user:
let
hm = userHm user;
in
(hm.enable or false) && (hm.module or null) != null
) selectedUsers
);
rbwOutboundSnippet =
name: user:
let
outboundCfg = ((userSsh user).outbound or { }).rbw or { };
in
lib.mkIf (outboundCfg.enable or false) {
chiasson.ssh.outbound.rbw.enable = true;
chiasson.ssh.outbound.rbw.user = name;
chiasson.ssh.outbound.rbw.hosts =
if (outboundCfg.hosts or "all") == "all" then [ "all" ] else outboundCfg.hosts;
};
mkHmUserModule =
{ name, user, hostExtraModules }:
let
hm = userHm user;
hmModule = resolveHomeManagerModule hm.module;
in
lib.mkMerge (
[
hmModule
(rbwOutboundSnippet name user)
]
++ (hm.extraModules or [ ])
++ hostExtraModules
);
inboundAuthorizedOrNull =
user:
let
inboundCfg = (userSsh user).inbound or { };
in
if !(inboundCfg.enable or false) then
null
else if (inboundCfg.authorizedHosts or "all") == "all" then
"all"
else
inboundCfg.authorizedHosts;
inboundHostsAttr =
selectedUsers:
lib.pipe selectedUsers [
(lib.mapAttrs (_: inboundAuthorizedOrNull))
(lib.filterAttrs (_: v: v != null))
];
};
}
-17
View File
@@ -1,17 +0,0 @@
# Resolve `wisdom*` HM slices for NixOS `extraModules` (`self` is not an HM specialArg).
# Slices are gated by `chiasson.home.*.enable`; hosts only flip toggles in `home.nix`.
{ lib, ... }: {
flake.lib.wisdomCatalogExtraModules =
self:
let
names = lib.sort builtins.lessThan (
lib.filter (
n:
lib.hasPrefix "wisdom" n
&& n != "wisdom"
&& n != "wisdomShellBash"
) (builtins.attrNames self.homeManagerModules)
);
in
map (name: self.homeManagerModules.${name}) names;
}
+100 -42
View File
@@ -1,37 +1,48 @@
{ self, ... }: { { self, ... }: {
flake.homeManagerModules.sshOutboundRbw = { flake.homeManagerModules.sshOutboundRbw =
config, { config, lib, pkgs, ... }:
lib,
pkgs,
...
}:
let let
cfg = config.chiasson.ssh.outbound.rbw; cfg = config.chiasson.ssh.outbound.rbw;
inventory = self.lib.sshInventory; inventory = self.lib.sshInventory;
# Resolve which hosts to emit blocks for, and which user identity to
# use as the IdentityFile filter against the rbw agent.
selectedHostNames = selectedHostNames =
if cfg.hosts == [ "all" ] then builtins.attrNames inventory.activeHosts else cfg.hosts;
missingHosts = builtins.filter (name: !(builtins.hasAttr name inventory.hosts)) selectedHostNames;
# Resolve to the actual host attrs for the template. The "all" case
# reuses `activeHosts` directly instead of rebuilding the same attrset.
selectedHosts =
if cfg.hosts == [ "all" ] then if cfg.hosts == [ "all" ] then
builtins.attrNames inventory.activeHosts inventory.activeHosts
else else
cfg.hosts; builtins.listToAttrs (
missing = builtins.filter (name: !(builtins.hasAttr name inventory.hosts)) selectedHostNames; map (n: {
selectedHosts = builtins.listToAttrs ( name = n;
builtins.map (name: { value = inventory.hosts.${n};
inherit name;
value = inventory.hosts.${name};
}) selectedHostNames }) selectedHostNames
); );
sshConfigTemplate = inventory.mkSshConfigTemplate { # All identities this HM user may authenticate AS: cfg.user
selectedHosts = selectedHosts; # extraIdentities. `cfg.user` can be null (e.g. user not in inventory
user = cfg.user; # yet) — in that case the Host-block IdentityFile line is suppressed
}; # and cross-account SSH is wired from extraIdentities alone.
effectiveIdentities = lib.filter (n: n != null) ([ cfg.user ] ++ cfg.extraIdentities);
defaultUserHasKey = cfg.user == null || (inventory.users.${cfg.user}.publicKey or "") != "";
# Each extra identity must have a pubkey in the inventory. Dropping
# it silently would produce a dead Match block — fail the build.
missingExtraKeys = lib.filter (n: (inventory.users.${n}.publicKey or "") == "") cfg.extraIdentities;
in in
{ {
options.chiasson.ssh.outbound.rbw = { options.chiasson.ssh.outbound.rbw = {
enable = lib.mkEnableOption "Generated `~/.ssh/config` + rbw agent socket."; enable = lib.mkEnableOption "Generated `~/.ssh/config` + rbw agent socket.";
user = lib.mkOption { user = lib.mkOption {
type = lib.types.str; type = lib.types.nullOr lib.types.str;
default = config.home.username; default = config.home.username;
description = "`User` in generated `Host` blocks."; description = ''
Inventory user whose public key is written to `~/.ssh/id_ed25519_<user>.pub`
and used as `IdentityFile` to filter the rbw agent. Set `null`
to disable the per-user .pub file / IdentityFile line (e.g.
when the user isn't in the inventory yet).
'';
}; };
hosts = lib.mkOption { hosts = lib.mkOption {
type = lib.types.listOf lib.types.str; type = lib.types.listOf lib.types.str;
@@ -41,36 +52,84 @@
manageSshConfig = lib.mkOption { manageSshConfig = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
default = true; default = true;
description = "Write `~/.ssh/config` from the template."; description = "Write `~/.ssh/config` (disable for manual management).";
};
# Cross-account SSH on the operator's laptop/desktop. Each entry
# adds a `~/.ssh/id_ed25519_<account>.pub` filter file and a
# `Match user <account>` block in `~/.ssh/config` so
# `ssh <account>@<host>` picks the right key from the rbw agent.
# `cfg.user` is already wired by the Host blocks — don't list it here.
extraIdentities = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
example = [
"server"
"builder"
];
description = ''
Catalog accounts this HM user may authenticate AS, in addition
to `cfg.user`. Each entry must have a publicKey pasted into
`modules/ssh/inventory.nix`. Typical for the operator's
primary laptop: `[ "server" "builder" ]` so fleet/ops commands
like `ssh server@r5500` or `ssh builder@nix-server` work
without touching `/etc/passwd` on each host.
'';
}; };
}; };
config = lib.mkIf cfg.enable (lib.mkMerge [ config = lib.mkIf cfg.enable (
lib.mkMerge [
{ {
assertions = [ assertions = [
{ {
assertion = missing == [ ]; assertion = missingHosts == [ ];
message = "ssh.outbound.rbw: unknown host keys: ${builtins.concatStringsSep ", " missing}"; message = "ssh.outbound.rbw: unknown host keys: ${builtins.concatStringsSep ", " missingHosts}";
}
{
assertion = defaultUserHasKey;
message = "ssh.outbound.rbw: no publicKey for inventory user `${cfg.user}` in `modules/ssh/inventory.nix`.";
}
{
assertion = missingExtraKeys == [ ];
message = "ssh.outbound.rbw: extraIdentities has entries with no publicKey in `modules/ssh/inventory.nix`: ${builtins.concatStringsSep ", " missingExtraKeys}";
}
# `enable=true` with neither a default user nor any extras gives the
# agent no IdentityFile at all; with IdentitiesOnly yes the user
# would silently be unable to authenticate as any catalog user.
{
assertion = effectiveIdentities != [ ];
message = "ssh.outbound.rbw: enabled but no identities wired. Set `chiasson.ssh.outbound.rbw.user` (defaults to `home.username`) or list catalog accounts under `extraIdentities`.";
} }
]; ];
} }
(lib.mkMerge [
{ {
home.packages = with pkgs; [ rbw pinentry-gtk2 ]; home.packages = with pkgs; [
rbw
pinentry-gtk2
];
home.sessionVariables.SSH_AUTH_SOCK = self.lib.rbwSshSocket.sessionVariable; home.sessionVariables.SSH_AUTH_SOCK = self.lib.rbwSshSocket.sessionVariable;
home.file = inventory.mkIdentityFiles selectedHosts; # Write a `.pub` file per identity this HM user may act as
# (cfg.user extraIdentities). OpenSSH reads each one via
# IdentityFile/Match to filter agent keys — they never hold
# private key material, so 0644 (HM's default) is fine.
# OpenSSH's StrictModes only rejects group/other-writable files.
home.file = lib.listToAttrs (
map (n: {
name = inventory.mkIdentityFileName n;
value.text = "${inventory.users.${n}.publicKey}\n";
}) effectiveIdentities
);
programs.ssh.enable = lib.mkIf cfg.manageSshConfig false; programs.ssh.enable = lib.mkIf cfg.manageSshConfig false;
home.activation.rbwSshConfig = lib.mkIf cfg.manageSshConfig (lib.hm.dag.entryAfter [ "writeBoundary" ] '' }
mkdir -p "$HOME/.ssh" (lib.mkIf cfg.manageSshConfig {
chmod 700 "$HOME/.ssh" home.file.".ssh/config".text = inventory.mkSshConfigTemplate {
RBW_SSH_SOCK="${self.lib.rbwSshSocket.activationPath}" inherit selectedHosts;
cat > "$HOME/.ssh/config" <<'EOF' user = cfg.user;
${sshConfigTemplate} inherit (cfg) extraIdentities;
EOF };
sed -i "s|__RBW_SSH_SOCK__|$RBW_SSH_SOCK|g" "$HOME/.ssh/config" })
chmod 600 "$HOME/.ssh/config" {
'');
systemd.user.services.rbw-agent-bootstrap = { systemd.user.services.rbw-agent-bootstrap = {
Unit = { Unit = {
Description = "Bootstrap rbw SSH agent"; Description = "Bootstrap rbw SSH agent";
@@ -82,15 +141,14 @@ EOF
ExecStart = "${pkgs.bash}/bin/bash -lc '${pkgs.rbw}/bin/rbw unlocked >/dev/null 2>&1 || true'"; ExecStart = "${pkgs.bash}/bin/bash -lc '${pkgs.rbw}/bin/rbw unlocked >/dev/null 2>&1 || true'";
RemainAfterExit = true; RemainAfterExit = true;
}; };
Install = { Install.WantedBy = [ "graphical-session.target" ];
WantedBy = [ "graphical-session.target" ];
}; };
};
home.activation.rbwPinentryConfig = lib.hm.dag.entryAfter [ "writeBoundary" ] '' home.activation.rbwPinentryConfig = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
${pkgs.rbw}/bin/rbw config set pinentry "${pkgs.pinentry-gtk2}/bin/pinentry-gtk-2" >/dev/null 2>&1 || true ${pkgs.rbw}/bin/rbw config set pinentry "${pkgs.pinentry-gtk2}/bin/pinentry-gtk-2" >/dev/null 2>&1 || true
''; '';
} }
]); ])
]
);
}; };
} }
+159
View File
@@ -0,0 +1,159 @@
{ lib, ... }: {
flake.lib.sshInventory =
let
# Hosts: pure network endpoints. No public keys live here anymore —
# keys are per USER (see `users` below), one key per person.
hosts = {
"14900k" = {
hostName = "192.168.2.25";
aliases = [ "14900k" "nixdesk" ];
};
ideapad = {
hostName = "192.168.2.229";
aliases = [ "ideapad" ];
};
t2mbp = {
hostName = "192.168.2.15";
aliases = [ "t2mbp" ];
};
"uConsole" = {
hostName = "192.168.2.99";
aliases = [ "uConsole" "uconsole" ];
};
# Scratchpad / recovery target — hostName isn't an IP, so `activeHosts`
# excludes it from navi deployments. Leave it in `hosts` for inventory
# visibility while recovery is in progress.
test = {
hostName = "test";
aliases = [ "test" ];
};
"nix-server" = {
hostName = "192.168.2.238";
aliases = [ "nix-server" ];
};
r5500 = {
hostName = "192.168.2.100";
aliases = [ "r5500" ];
};
};
# Per-user public keys. One keypair per person, generated once with
# `ssh-keygen -t ed25519 -C <comment>` (or `rbw gen ssh-key <user>`),
# private key stored in Bitwarden under the same name. Paste the
# `ssh-ed25519 AAAA… <comment>` line here.
users = {
olivier = {
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICpORzDw8kEOobjywl7bQaEp6Tez1c/ZP+7VBDsTcM8I olivier";
};
server = {
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICsksvNGOt/ebJtpRi9ocLBjwyl16VSaf+BsL2Hz5PRy server";
};
builder = {
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIILBtfW1cq9mG6uAjAfpZuVa1EWDSTPSCThapDXXlLgV builder";
};
};
# Hosts SSH is actually safe to deploy/scan to: anything whose hostName
# parses as an IPv4 dotted-quad. Filters out scratchpad/non-routable
# entries (e.g. `hostName = "test"`).
activeHosts = lib.filterAttrs
(_: h: lib.match "^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$" h.hostName != null)
hosts;
# .pub filename convention. OpenSSH 7.3+ accepts a `.pub` file as
# IdentityFile to filter `IdentityAgent` (rbw) keys without storing the
# private key on disk — keep this trick.
mkIdentityFileName = userName: ".ssh/id_ed25519_${lib.strings.toLower userName}.pub";
mkSshConfigTemplate =
{
selectedHosts ? activeHosts,
user ? null,
# Catalog accounts the operator may authenticate AS via
# `ssh <account>@<host>`. Each entry gets a `Match user <account>`
# block that overrides IdentityFile so OpenSSH asks the rbw agent
# for that account's private key. `cfg.user` is already covered
# by the Host blocks, so don't list it here.
extraIdentities ? [ ],
identityAgent ? "SSH_AUTH_SOCK",
}:
let
# Shared `IdentityFile` filter line (when `user` is set). Used by
# both the per-host and gitea blocks so the two can't drift apart.
idLine = lib.optionalString (user != null) " IdentityFile ~/${mkIdentityFileName user}\n";
# Match blocks for cross-account SSH. Filter out cfg.user since
# the matching pub is already loaded via the Host block's
# IdentityFile line — re-emitting it would just duplicate.
matchBlocks = lib.concatStringsSep "\n" (map
(n: ''
Match user ${n}
IdentityFile ~/${mkIdentityFileName n}
IdentitiesOnly yes
'')
(builtins.filter (n: n != user) extraIdentities));
# Per-host block. `IdentityFile` (when `user` is set) is a .pub file
# pointing at the agent's matching private key. With IdentitiesOnly
# yes, only agent keys matching that pub are tried — fixes the old
# "too many auth failures" symptom by design.
hostBlock = hostName:
let
e = selectedHosts.${hostName};
hostPatterns = lib.concatStringsSep " " (e.aliases ++ [ e.hostName ]);
in ''
Host ${hostPatterns}
HostName ${e.hostName}
${idLine} IdentityAgent ${identityAgent}
IdentitiesOnly yes
'';
# Gitea block: always emitted. `User git`, port 222. olivier's
# public key (passed via `IdentityFile`) is what gitea accepts
# because it gets pushed into gitea's authorized_keys through
# gitea's own UI for that account.
giteaBlock = ''
Host git.chiasson.cloud gitea
HostName 192.168.2.238
Port 222
User git
${idLine} IdentityAgent ${identityAgent}
IdentitiesOnly yes
'';
hostBlocks = lib.concatStringsSep "\n" (map hostBlock (lib.attrNames selectedHosts));
in
# Filter empty sections so an absent Match block (no extraIdentities)
# doesn't add leading whitespace to the rendered config.
lib.concatStringsSep "\n" (lib.filter (s: s != "") [
matchBlocks
giteaBlock
hostBlocks
''
Host *
IdentitiesOnly yes
IdentityAgent none
''
]);
# Per-user line for `users.users.<u>.openssh.authorizedKeys.keys`.
# `selection` is either "all" or a list of source identifiers for
# sshd's `from=` constraint (IP, CIDR, or hostname if reverse-DNS works).
# Returns null if inventory is missing the user's pubkey — caller is
# expected to assert and fail the build rather than silently lock out.
mkAuthorizedKeyLine = userName: selection:
let
entry = users.${userName} or null;
in
if entry == null then null
else if (entry.publicKey or "") == "" then null
else if selection == "all" then entry.publicKey
else ''from="${lib.concatStringsSep "," selection}" ${entry.publicKey}'';
in
{
inherit hosts users activeHosts;
mkSshConfigTemplate = mkSshConfigTemplate;
mkAuthorizedKeyLine = mkAuthorizedKeyLine;
mkIdentityFileName = mkIdentityFileName;
};
}
+28 -12
View File
@@ -1,35 +1,51 @@
{ self, ... }: { { self, ... }: {
flake.nixosModules.sshInbound = { flake.nixosModules.sshInbound =
config, { config, lib, ... }:
lib,
...
}:
let let
cfg = config.chiasson.ssh.inbound; cfg = config.chiasson.ssh.inbound;
inventory = self.lib.sshInventory; inventory = self.lib.sshInventory;
# Every inbound-enabled user must have a publicKey pasted into the
# inventory — silently dropping the key would lock the user out.
missingKeys = lib.filter
(name:
let line = inventory.mkAuthorizedKeyLine name (cfg.userAuthorizedHosts.${name} or "all");
in line == null)
(lib.attrNames cfg.userAuthorizedHosts);
in in
{ {
options.chiasson.ssh.inbound = { options.chiasson.ssh.inbound = {
enable = lib.mkEnableOption "Apply SSH inventory public keys to `authorized_keys`."; enable = lib.mkEnableOption "Write user-specific SSH inventory public keys into `authorized_keys`.";
userAuthorizedHosts = lib.mkOption { userAuthorizedHosts = lib.mkOption {
type = lib.types.attrsOf (lib.types.either (lib.types.enum [ "all" ]) (lib.types.listOf lib.types.str)); type = lib.types.attrsOf (lib.types.either (lib.types.enum [ "all" ]) (lib.types.listOf lib.types.str));
default = { }; default = { };
example = { example = {
olivier = "all"; olivier = "all";
admin = [ "14900k" "t2mbp" ]; server = [ "192.168.2.25" "192.168.2.15" ];
}; };
description = '' description = ''
Catalog users that receive the SSH inventory public keys in `authorized_keys`. Catalog users whose inventory public key is installed in
`authorized_keys`. The value is either `"all"` (no `from=`
restriction) or a list of source identifiers appended to
sshd's `from=` constraint. List entries should be IPs or CIDRs;
hostnames require reverse-DNS to resolve cleanly on the target.
''; '';
}; };
}; };
config = lib.mkIf cfg.enable { config = lib.mkMerge [
{
assertions = [{
assertion = cfg.enable -> missingKeys == [ ];
message = "chiasson.ssh.inbound: users enabled but missing public key in `modules/ssh/inventory.nix`: ${lib.concatStringsSep ", " missingKeys}";
}];
}
(lib.mkIf cfg.enable {
users.users = lib.mapAttrs users.users = lib.mapAttrs
(_user: _selection: { (name: selection: {
openssh.authorizedKeys.keys = inventory.authorizedKeys; openssh.authorizedKeys.keys = [ (inventory.mkAuthorizedKeyLine name selection) ];
}) })
cfg.userAuthorizedHosts; cfg.userAuthorizedHosts;
}; })
];
}; };
} }
+39
View File
@@ -0,0 +1,39 @@
# rbw (Bitwarden) SSH-agent socket wiring, shared across shells and the
# outbound-rbw Home Manager module. Exposed as `flake.lib.rbwSshSocket`.
{ ... }: {
flake.lib.rbwSshSocket =
let
socketPath = "$XDG_RUNTIME_DIR/rbw/ssh-agent-socket";
# Bash init snippet — used by wisdom/shells/bash.nix (profile + interactive).
bashSnippet = ''
if [ -z "''${SSH_AUTH_SOCK:-}" ]; then
if [ -n "''${XDG_RUNTIME_DIR:-}" ]; then
export SSH_AUTH_SOCK="${socketPath}"
else
export SSH_AUTH_SOCK="/run/user/$(id -u)/rbw/ssh-agent-socket"
fi
fi
'';
# Fish init snippet — used by wisdom/shells/fish.nix.
fishSnippet = pkgs: ''
if test -z "$SSH_AUTH_SOCK"
if test -n "$XDG_RUNTIME_DIR"
set -gx SSH_AUTH_SOCK "${socketPath}"
else
set -l _hm_uid (${pkgs.coreutils}/bin/id -u)
set -gx SSH_AUTH_SOCK "/run/user/$_hm_uid/rbw/ssh-agent-socket"
end
end
'';
in
{
inherit bashSnippet fishSnippet;
# Used by home-manager modules to expose SSH_AUTH_SOCK to GUI apps
# and HM-managed shells declaratively (no activation script needed).
sessionVariable = socketPath;
};
}
+5 -6
View File
@@ -17,10 +17,9 @@
++ lib.optionals pkgs.stdenv.isx86_64 [ heroic ]; ++ lib.optionals pkgs.stdenv.isx86_64 [ heroic ];
steamExtraPkgs = steamExtraPkgs =
if !cfg.steam.steamTinkerLaunch.enable then lib.optional (cfg.steam.steamTinkerLaunch.enable && lib.meta.availableOn pkgs.stdenv.hostPlatform pkgs.steamtinkerlaunch) pkgs.steamtinkerlaunch;
[ ]
else launcherSet = launcherPkgs ++ steamExtraPkgs ++ cfg.launchers.extraPackages;
lib.optional (lib.meta.availableOn pkgs.stdenv.hostPlatform pkgs.steamtinkerlaunch) pkgs.steamtinkerlaunch;
in in
{ {
options.chiasson.system.gaming = { options.chiasson.system.gaming = {
@@ -194,11 +193,11 @@
]; ];
} }
(lib.mkIf (cfg.launchers.forUsers == null) { (lib.mkIf (cfg.launchers.forUsers == null) {
environment.systemPackages = launcherPkgs ++ steamExtraPkgs ++ cfg.launchers.extraPackages; environment.systemPackages = launcherSet;
}) })
(lib.mkIf (cfg.launchers.forUsers != null) { (lib.mkIf (cfg.launchers.forUsers != null) {
users.users = lib.genAttrs cfg.launchers.forUsers (_: { users.users = lib.genAttrs cfg.launchers.forUsers (_: {
packages = launcherPkgs ++ steamExtraPkgs ++ cfg.launchers.extraPackages; packages = launcherSet;
}); });
}) })
]); ]);
+38
View File
@@ -0,0 +1,38 @@
# NFS mount of nixdesk (14900k) bulk storage for clients. Exports live in
# modules/hosts/14900k/_private/jellyfin-nfs-export.nix
#
# Jellyfin library paths (see also jellyfin.nix):
# Movies → /mnt/nixdesk-jellyfin/movies
# Shows → /mnt/nixdesk-jellyfin/tv
#
# If you see "Stale file handle" under /mnt after changing exports or fsid on nixdesk, drop the
# old client mount and let automount reattach, e.g.:
# sudo umount -l /mnt/nixdesk-jellyfin
# ls /mnt/nixdesk-jellyfin
{ ... }:
{
flake.nixosModules.nixdeskJellyfin =
{ lib, ... }:
let
nfsExportHost = "192.168.2.25";
# nfsvers+tcp: predictable Linux↔Linux; lookupcache=none: fewer stale dentries after export changes.
nfsClientOpts = [
"rw"
"noatime"
"nofail"
"_netdev"
"nfsvers=3"
"tcp"
"lookupcache=none"
"x-systemd.automount"
"x-systemd.idle-timeout=3600"
];
in
{
fileSystems."/mnt/nixdesk-jellyfin" = {
device = "${nfsExportHost}:/mnt/deep/jellyfin";
fsType = "nfs";
options = nfsClientOpts;
};
};
}
+339
View File
@@ -0,0 +1,339 @@
# Users & SSH inbound: options + catalog defaults + integration. Single module
# that used to be split across `modules/system/users/{default,catalog-options,
# catalog-default,home-integration}.nix`. Per-host overrides / extra HM modules
# work the same way they always have; only the file structure changed.
{ self, ... }:
{
flake.nixosModules.users =
{ config, options, lib, ... }:
let
cfg = config.chiasson.users;
usersLib =
let
userHm = user: user.homeManager or { };
userSsh = user: user.ssh or { };
in
rec {
resolveHomeManagerModule =
moduleSpec:
let
t = builtins.typeOf moduleSpec;
in
if t == "path" || t == "string" then import moduleSpec else moduleSpec;
selectedUsersAttr =
{ catalog, enabled, hostOverrides }:
lib.listToAttrs (
map (name: {
inherit name;
value = lib.recursiveUpdate catalog.${name} (hostOverrides.${name} or { });
}) enabled
);
missingEnabledNames =
catalog: enabled: builtins.filter (name: !(builtins.hasAttr name catalog)) enabled;
strayHomeUserKeys =
homeUsers: enabled: builtins.filter (k: !(builtins.elem k enabled)) (builtins.attrNames homeUsers);
mkNixosUser =
name: user:
{
isNormalUser = user.isNormalUser or true;
description = user.description or name;
extraGroups = user.extraGroups or [ ];
}
// lib.optionalAttrs (user ? hashedPasswordFile && user.hashedPasswordFile != null) {
hashedPasswordFile = user.hashedPasswordFile;
};
hmWiredNames =
selectedUsers:
lib.attrNames (
lib.filterAttrs (
_: user:
let
hm = userHm user;
in
(hm.enable or false) && (hm.module or null) != null
) selectedUsers
);
rbwOutboundSnippet =
name: user:
let
outboundCfg = ((userSsh user).outbound or { }).rbw or { };
in
lib.mkIf (outboundCfg.enable or false) {
chiasson.ssh.outbound.rbw.enable = true;
chiasson.ssh.outbound.rbw.user = name;
chiasson.ssh.outbound.rbw.hosts =
if (outboundCfg.hosts or "all") == "all" then [ "all" ] else outboundCfg.hosts;
chiasson.ssh.outbound.rbw.extraIdentities = outboundCfg.extraIdentities or [ ];
};
mkHmUserModule =
{ name, user, hostExtraModules }:
let
hm = userHm user;
hmModule = resolveHomeManagerModule hm.module;
in
lib.mkMerge (
[
hmModule
(rbwOutboundSnippet name user)
]
++ (hm.extraModules or [ ])
++ hostExtraModules
);
inboundAuthorizedOrNull =
user:
let
inboundCfg = (userSsh user).inbound or { };
in
if !(inboundCfg.enable or false) then
null
else if (inboundCfg.authorizedHosts or "all") == "all" then
"all"
else
inboundCfg.authorizedHosts;
inboundHostsAttr =
selectedUsers:
lib.pipe selectedUsers [
(lib.mapAttrs (_: inboundAuthorizedOrNull))
(lib.filterAttrs (_: v: v != null))
];
};
inventory = self.lib.sshInventory;
olivierEnabled = lib.elem "olivier" cfg.enabled;
# Merge catalog + per-host overrides into the final user attrs.
selectedUsers = lib.listToAttrs (
map (name: {
inherit name;
value = lib.recursiveUpdate cfg.catalog.${name} (cfg.hostOverrides.${name} or { });
}) cfg.enabled
);
names = usersLib.hmWiredNames selectedUsers;
missing = usersLib.missingEnabledNames cfg.catalog cfg.enabled;
stray = usersLib.strayHomeUserKeys cfg.extraModules cfg.enabled;
hmAvailable = lib.hasAttrByPath [ "home-manager" "users" ] options;
inboundUsersAttr = usersLib.inboundHostsAttr selectedUsers;
hmUsersAttr = lib.listToAttrs (
map (name: {
inherit name;
value = usersLib.mkHmUserModule {
inherit name;
user = selectedUsers.${name};
hostExtraModules = cfg.extraModules.${name} or [ ];
};
}) names
);
# Fish shell wiring: HM's fish module declares its package, but
# /etc/passwd + /etc/shells need updating so login shells work.
# Only fires for HM users that actually enable fish.
hmFishUsers =
if !hmAvailable then
{ }
else
lib.filterAttrs (
name: hmUser: (hmUser.programs.fish.enable or false) && builtins.elem name names
) config.home-manager.users;
in
{
imports = [
self.nixosModules.sshInbound
{ _module.args = { inherit self usersLib; }; }
];
####################
# Options
####################
options.chiasson.users = {
catalog = lib.mkOption {
type = lib.types.attrs;
default = { };
description = "User records; defaults below. Override with `hostOverrides` or `mkForce`.";
};
enabled = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
description = "Catalog names to materialize as `users.users` on this machine.";
};
hostOverrides = lib.mkOption {
type = lib.types.attrs;
default = { };
description = "`recursiveUpdate`'d onto catalog users on this host.";
};
# Standard `attrsOf (listOf …)` already concatenates lists across
# module definitions; no custom merge function needed.
extraModules = lib.mkOption {
type = lib.types.attrsOf (lib.types.listOf lib.types.unspecified);
default = { };
description = ''
Per-user Home Manager extraModules keyed by catalog name. Lists
from multiple modules (desktopHomeBase + this host's home.nix)
are concatenated.
'';
};
homeManager.autoWire = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Auto-create Home Manager users from the catalog.";
};
};
####################
# Catalog defaults + integration
####################
# Nix won't accept both `config.X = …` and `config = …` in the same
# attrset (the path-attr partially defines `config`, then the explicit
# `config = …` is a redefinition error). All `config.` writes must
# therefore live INSIDE the single mkMerge block below.
config = lib.mkMerge [
####################
# Catalog defaults
####################
{
chiasson.users.catalog = {
olivier = {
isNormalUser = true;
description = "Olivier";
extraGroups = [
"networkmanager"
"wheel"
"docker"
"fuse"
"uinput"
"kvm"
# `video` lets brightnessctl/light udev rules own /sys/backlight without sudo.
# Harmless on headless hosts (no devices).
"video"
# DRI render + input for gamescope / Steam on Wayland, no sudo.
"render"
"input"
];
hashedPasswordFile = lib.mkIf olivierEnabled (
config.sops.secrets."users/olivier/hashedPassword".path
);
homeManager = {
enable = true;
module = { pkgs, ... }: {
home.username = "olivier";
home.homeDirectory = "/home/olivier";
home.stateVersion = "25.11";
programs.home-manager.enable = true;
# Declarative rbw config — replaces per-host
# `rbw config set email|base_url`. Neither value is a
# secret (URL + login email), so plaintext is fine, same
# as the public keys committed in ssh-inventory.nix.
programs.rbw = {
enable = true;
settings = {
email = "olivierchiasson@hotmail.fr";
base_url = "https://bitwarden.chiasson.cloud";
};
};
};
};
ssh.inbound.enable = true;
ssh.inbound.authorizedHosts = "all";
ssh.outbound.rbw.enable = true;
ssh.outbound.rbw.hosts = [ "all" ];
# olivier's laptop: the HM SSH module writes the matching
# `.pub` filter for each of these and emits a `Match user`
# block, so `ssh server@r5500` / `ssh builder@nix-server`
# route the right private key from the rbw agent.
ssh.outbound.rbw.extraIdentities = [
"server"
"builder"
];
};
server = {
isNormalUser = true;
description = "Server user";
extraGroups = [ "wheel" ];
homeManager = {
enable = false;
module = null;
};
ssh.inbound.enable = true;
ssh.inbound.authorizedHosts = "all";
ssh.outbound.rbw.enable = false;
ssh.outbound.rbw.hosts = [ "all" ];
};
builder = {
isNormalUser = true;
description = "Navi fleet deploy (push + activate only)";
extraGroups = [ ];
createHome = false;
homeManager = {
enable = false;
module = null;
};
ssh.inbound.enable = true;
ssh.inbound.authorizedHosts = "all";
};
};
# Pull in olivier's hashed password from sops; `neededForUsers`
# makes nixos decrypt it at boot so the user record can read it.
sops.secrets."users/olivier/hashedPassword" = lib.mkIf olivierEnabled {
neededForUsers = true;
};
}
####################
# Integration
####################
{
assertions = [
{
assertion = missing == [ ];
message = "chiasson.users.enabled references unknown catalog names: ${lib.concatStringsSep ", " missing}";
}
{
assertion = stray == [ ];
message = "chiasson.users.extraModules has keys not in chiasson.users.enabled: ${lib.concatStringsSep ", " stray}";
}
];
# NixOS user accounts (no HM, raw).
users.users = lib.mapAttrs (name: user: usersLib.mkNixosUser name user) selectedUsers;
}
(lib.optionalAttrs hmAvailable {
"home-manager".useGlobalPkgs = lib.mkIf (cfg.homeManager.autoWire && names != [ ]) true;
"home-manager".sharedModules = lib.mkIf (cfg.homeManager.autoWire && names != [ ]) [
self.homeManagerModules.sshOutboundRbw
];
"home-manager".users = lib.mkIf (cfg.homeManager.autoWire && names != [ ]) hmUsersAttr;
})
# Wire user-specific ACLs into the inbound module — fail the build
# if a user has no matching pubkey.
(lib.mkIf (inboundUsersAttr != { }) {
chiasson.ssh.inbound.enable = true;
chiasson.ssh.inbound.userAuthorizedHosts = inboundUsersAttr;
})
# Fish-shell wiring: HM knows the package; we sync /etc/passwd +
# /etc/shells with `mkForce`. `mkNixosUser` doesn't emit `shell`, so
# the force is uncontested.
(lib.mkIf (hmFishUsers != { }) {
environment.shells = lib.mkAfter (
lib.mapAttrsToList (_: hmUser: lib.getExe hmUser.programs.fish.package) hmFishUsers
);
users.users = lib.mapAttrs (name: hmUser: {
shell = lib.mkForce (lib.getExe hmUser.programs.fish.package);
}) hmFishUsers;
})
];
};
}
-105
View File
@@ -1,105 +0,0 @@
# Shared user definitions for all hosts that import `nixosModules.users`.
# Module (not bare attrset) so catalog entries can use `config.*` for sops paths etc.
{ ... }: {
flake.nixosModules.usersCatalogDefaults =
{ config, lib, ... }:
let
olivierEnabled = lib.elem "olivier" config.chiasson.users.enabled;
in
{
config.sops.secrets."users/olivier/hashedPassword" = lib.mkIf olivierEnabled {
neededForUsers = true;
};
config.chiasson.users.catalog = {
olivier = {
isNormalUser = true;
description = "Olivier";
extraGroups = [
"networkmanager"
"wheel"
"docker"
"fuse"
"uinput"
"kvm"
# `video` is required for the brightnessctl/light udev rules to grant write access
# to /sys/class/backlight/*/brightness without sudo. Harmless on hosts without a
# backlight (servers, desktop towers): the group simply has no devices to own.
"video"
# DRI render nodes and input devices for gamescope / Steam on Wayland (no sudo).
"render"
"input"
];
# Declared in this module when olivier is in `chiasson.users.enabled`.
# With `neededForUsers`, `.path` is under /run/secrets-for-users/… (sops-nix README).
hashedPasswordFile = lib.mkIf olivierEnabled (
config.sops.secrets."users/olivier/hashedPassword".path
);
homeManager = {
enable = true;
module =
{ ... }:
{
home.username = "olivier";
home.homeDirectory = "/home/olivier";
home.stateVersion = "25.11";
programs.home-manager.enable = true;
};
};
ssh = {
inbound = {
enable = true;
authorizedHosts = "all";
};
outbound = {
rbw = {
enable = true;
hosts = "all";
};
};
};
};
server = {
isNormalUser = true;
description = "Server user";
extraGroups = [ "wheel" ];
homeManager = {
enable = false;
module = null;
};
ssh = {
inbound = {
enable = true;
authorizedHosts = "all";
};
outbound = {
rbw = {
enable = false;
hosts = "all";
};
};
};
};
builder = {
isNormalUser = true;
description = "Navi fleet deploy (push + activate only)";
extraGroups = [ ];
createHome = false;
homeManager = {
enable = false;
module = null;
};
ssh.inbound.enable = true;
};
};
};
}
-55
View File
@@ -1,55 +0,0 @@
{ ... }: {
flake.nixosModules.usersCatalogOptions =
{ lib, ... }:
{
options.chiasson.users = {
catalog = lib.mkOption {
type = lib.types.attrs;
default = { };
description = ''
User records merged from `usersCatalogDefaults`; override with `hostOverrides` or `mkForce`.
'';
};
enabled = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
description = "Catalog names to materialize as `users.users` on this machine.";
};
hostOverrides = lib.mkOption {
type = lib.types.attrs;
default = { };
description = ''
`recursiveUpdate`d onto catalog users.
'';
};
extraModules = lib.mkOption {
type =
(lib.types.attrsOf (lib.types.listOf lib.types.unspecified))
// {
merge =
loc: defs:
let
values = map (d: d.value) defs;
names = lib.unique (lib.concatLists (map builtins.attrNames values));
in
lib.genAttrs names (
name: lib.concatLists (map (v: v.${name} or [ ]) values)
);
};
default = { };
description = ''
Per-user Home Manager `extraModules` keyed by catalog user name.
Keys must match `chiasson.users.enabled`. Lists from multiple modules
are concatenated (e.g. `desktop-home-base.nix` + host `home.nix`).
'';
};
homeManager = {
autoWire = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Create HM users from the catalog when true.";
};
};
};
};
}
-27
View File
@@ -1,27 +0,0 @@
# Catalog → NixOS `users.users` + Home Manager + SSH inbound.
{ self, ... }: {
flake.nixosModules.users =
{ config, lib, ... }:
let
usersLib = self.lib.usersMerge lib;
selectUsers =
c:
let
uc = c.chiasson.users;
in
usersLib.selectedUsersAttr {
catalog = uc.catalog;
enabled = uc.enabled;
hostOverrides = uc.hostOverrides;
};
in
{
imports = [
self.nixosModules.sshInbound
self.nixosModules.usersCatalogOptions
self.nixosModules.usersCatalogDefaults
{ _module.args = { inherit self usersLib selectUsers; }; }
self.nixosModules.usersHomeIntegration
];
};
}
-71
View File
@@ -1,71 +0,0 @@
{ ... }: {
flake.nixosModules.usersHomeIntegration =
{ config, options, lib, self, usersLib, selectUsers, ... }:
let
cfg = config.chiasson.users;
selected = selectUsers config;
missing = usersLib.missingEnabledNames cfg.catalog cfg.enabled;
stray = usersLib.strayHomeUserKeys cfg.extraModules cfg.enabled;
names = usersLib.hmWiredNames selected;
hmAvailable = lib.hasAttrByPath [ "home-manager" "users" ] options;
hmUsersAttr = lib.listToAttrs (
map (name: {
inherit name;
value = usersLib.mkHmUserModule {
inherit name;
user = selected.${name};
hostExtraModules = cfg.extraModules.${name} or [ ];
};
}) names
);
inboundUsersAttr = usersLib.inboundHostsAttr selected;
# HM configures fish in ~/.config/fish but no longer sets /etc/passwd or /etc/shells.
hmFishUsers =
if !hmAvailable then { }
else
lib.filterAttrs (
name: hmUser: (hmUser.programs.fish.enable or false) && builtins.elem name names
) config.home-manager.users;
in
{
config = lib.mkMerge [
{
assertions = [
{
assertion = missing == [ ];
message = "chiasson.users.enabled references unknown catalog users: ${builtins.concatStringsSep ", " missing}";
}
{
assertion = stray == [ ];
message = "chiasson.users.extraModules has keys not in chiasson.users.enabled: ${builtins.concatStringsSep ", " stray}";
}
];
}
{
users.users = lib.mapAttrs (name: user: usersLib.mkNixosUser name user) selected;
}
(lib.optionalAttrs hmAvailable {
"home-manager".useGlobalPkgs = lib.mkIf (cfg.homeManager.autoWire && names != [ ]) true;
"home-manager".sharedModules = lib.mkIf (cfg.homeManager.autoWire && names != [ ]) [ self.homeManagerModules.sshOutboundRbw ];
"home-manager".users = lib.mkIf (cfg.homeManager.autoWire && names != [ ]) hmUsersAttr;
})
(lib.mkIf (inboundUsersAttr != { }) {
chiasson.ssh.inbound.enable = true;
chiasson.ssh.inbound.userAuthorizedHosts = inboundUsersAttr;
})
(lib.mkIf (hmFishUsers != { }) {
environment.shells = lib.mkAfter (
lib.mapAttrsToList (
_: hmUser: lib.getExe hmUser.programs.fish.package
) hmFishUsers
);
users.users = lib.mapAttrs (
name: hmUser: {
shell = lib.mkForce (lib.getExe hmUser.programs.fish.package);
}
) hmFishUsers;
})
];
};
}
+3 -1
View File
@@ -12,7 +12,9 @@
options.chiasson.home.apps.discord.enable = lib.mkEnableOption '' options.chiasson.home.apps.discord.enable = lib.mkEnableOption ''
Vesktop (nixcord). Needs nixpkgs `discord` breaks on e.g. aarch64-linux. Vesktop (nixcord). Needs nixpkgs `discord` breaks on e.g. aarch64-linux.
''; '' // {
default = false;
};
config = lib.mkIf root.enable (lib.mkMerge [ config = lib.mkIf root.enable (lib.mkMerge [
{ {
+6 -19
View File
@@ -1,4 +1,4 @@
{ ... }: { { self, ... }: {
flake.nixosModules.systemLocalsend = flake.nixosModules.systemLocalsend =
{ config, lib, ... }: { config, lib, ... }:
let let
@@ -19,23 +19,10 @@
}; };
}; };
flake.homeManagerModules.wisdomAppsLocalsend = flake.homeManagerModules.wisdomAppsLocalsend = self.lib.wisdomSlice {
{ config, lib, pkgs, ... }: path = "apps.localsend";
let default = true;
root = config.chiasson.home; description = "LocalSend client; open the firewall on NixOS with `system.localsend` if you want inbound.";
cfg = config.chiasson.home.apps.localsend; packages = pkgs: [ pkgs.localsend ];
in
{
options.chiasson.home.apps.localsend = {
enable = lib.mkEnableOption ''
LocalSend client; open the firewall on NixOS with `system.localsend` if you want inbound.
'';
package = lib.mkPackageOption pkgs "localsend" { };
};
config = lib.mkIf (root.enable && cfg.enable) {
home.packages = [ cfg.package ];
};
}; };
} }
+6 -14
View File
@@ -1,16 +1,8 @@
{ ... }: { { self, ... }: {
flake.homeManagerModules.wisdomAppsPokeclicker = flake.homeManagerModules.wisdomAppsPokeclicker = self.lib.wisdomSlice {
{ config, lib, pkgs, ... }: path = "apps.pokeclicker";
let default = false;
root = config.chiasson.home; description = "PokéClicker desktop (Farigh fork .deb nix).";
cfg = config.chiasson.home.apps.pokeclicker; packages = pkgs: [ (pkgs.callPackage ./package { }) ];
pokeclickerPkg = pkgs.callPackage ./package { };
in
{
options.chiasson.home.apps.pokeclicker.enable = lib.mkEnableOption "PokéClicker desktop (Farigh fork .deb nix).";
config = lib.mkIf (root.enable && cfg.enable) {
home.packages = [ pokeclickerPkg ];
};
}; };
} }
+6 -17
View File
@@ -1,19 +1,8 @@
{ ... }: { { self, ... }: {
flake.homeManagerModules.wisdomBrowsersChrome = flake.homeManagerModules.wisdomBrowsersChrome = self.lib.wisdomSlice {
{ config, lib, pkgs, ... }: path = "browsers.chrome";
let default = false;
root = config.chiasson.home; description = "Chrome (unfree, needs `allowUnfree`); skipped if nixpkgs has no build for this platform.";
cfg = config.chiasson.home.browsers.chrome; packages = pkgs: [ pkgs.google-chrome ];
in
{
options.chiasson.home.browsers.chrome.enable = lib.mkEnableOption ''
Chrome (unfree, needs `allowUnfree`); skipped if nixpkgs has no build for this platform.
'';
config = lib.mkIf (root.enable && cfg.enable) {
home.packages = lib.optional (
lib.meta.availableOn pkgs.stdenv.hostPlatform pkgs.google-chrome
) pkgs.google-chrome;
};
}; };
} }
+49 -47
View File
@@ -5,25 +5,43 @@
cfg = config.chiasson.system.chromiumHevc; cfg = config.chiasson.system.chromiumHevc;
in in
{ {
options.chiasson.system.chromiumHevc.enable = lib.mkEnableOption '' options.chiasson.system.chromiumHevc = {
enable = lib.mkEnableOption ''
VA-API packages for Chromium HEVC (Intel iHD + optional NVIDIA nvidia-vaapi-driver). VA-API packages for Chromium HEVC (Intel iHD + optional NVIDIA nvidia-vaapi-driver).
Pair with `wisdomBrowsersChromiumHevc` on the user side. Pair with `wisdomBrowsersChromiumHevc` on the user side.
''; '';
gpu = lib.mkOption {
type = lib.types.enum [
"intel"
"nvidia"
];
default = "intel";
description = ''
VA-API stack for the `*-hevc` browser launchers. Use **intel** for Jellyfin
(Chromium + nvidia-vaapi-driver is unsupported upstream and fails with
`failed Initialize()ing the frame pool` in Jellyfin). **nvidia** adds the
nvidia-vaapi-driver and keep renderD129 + VaapiOnNvidiaGPUs for experiments only.
'';
};
};
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
hardware.graphics.enable = lib.mkDefault true; hardware.graphics.enable = lib.mkDefault true;
hardware.graphics.extraPackages = lib.mkAfter ( hardware.graphics.extraPackages = lib.mkAfter (
with pkgs; lib.optionals (cfg.gpu == "nvidia") [
[ nvidia-vaapi-driver ] pkgs.nvidia-vaapi-driver
]
); );
}; };
}; };
flake.homeManagerModules.wisdomBrowsersChromiumHevc = flake.homeManagerModules.wisdomBrowsersChromiumHevc =
{ config, lib, pkgs, ... }: { config, lib, pkgs, osConfig ? { }, ... }:
let let
root = config.chiasson.home; root = config.chiasson.home;
cfg = config.chiasson.home.browsers.chromiumHevc; cfg = config.chiasson.home.browsers.chromiumHevc;
gpu = lib.attrByPath [ "chiasson" "system" "chromiumHevc" "gpu" ] "intel" osConfig;
browserCatalog = { browserCatalog = {
"google-chrome" = { "google-chrome" = {
@@ -53,7 +71,6 @@
intel = { intel = {
driver = "iHD"; driver = "iHD";
drmDevice = "/dev/dri/renderD128"; drmDevice = "/dev/dri/renderD128";
nvdBackend = "direct";
enableFeatures = [ enableFeatures = [
"VaapiVideoDecodeLinuxGL" "VaapiVideoDecodeLinuxGL"
"VaapiVideoDecoder" "VaapiVideoDecoder"
@@ -69,7 +86,6 @@
nvidia = { nvidia = {
driver = "nvidia"; driver = "nvidia";
drmDevice = "/dev/dri/renderD129"; drmDevice = "/dev/dri/renderD129";
nvdBackend = "direct";
enableFeatures = [ enableFeatures = [
"VaapiVideoDecoder" "VaapiVideoDecoder"
"VaapiIgnoreDriverChecks" "VaapiIgnoreDriverChecks"
@@ -85,21 +101,17 @@
}; };
}; };
activeGpu = gpuProfiles.${cfg.vaapi.gpu}; activeGpu = gpuProfiles.${gpu};
mkChromiumHevc =
packageName:
let
spec = browserCatalog.${packageName};
browser = spec.package;
launcherName = spec.launcher;
enableFeatures = lib.concatStringsSep "," activeGpu.enableFeatures; enableFeatures = lib.concatStringsSep "," activeGpu.enableFeatures;
disableFeatures = lib.concatStringsSep "," activeGpu.disableFeatures; disableFeatures = lib.concatStringsSep "," activeGpu.disableFeatures;
desktopItem = pkgs.makeDesktopItem {
name = launcherName; mkDesktopItem =
spec:
pkgs.makeDesktopItem {
name = spec.launcher;
desktopName = spec.desktopName; desktopName = spec.desktopName;
genericName = "Web Browser"; genericName = "Web Browser";
exec = "${launcherName} %U"; exec = "${spec.launcher} %U";
icon = spec.icon; icon = spec.icon;
categories = [ categories = [
"Network" "Network"
@@ -113,6 +125,14 @@
"x-scheme-handler/https" "x-scheme-handler/https"
]; ];
}; };
mkChromiumHevc =
packageName:
let
spec = browserCatalog.${packageName};
browser = spec.package;
launcherName = spec.launcher;
desktopItem = mkDesktopItem spec;
in in
pkgs.runCommand launcherName pkgs.runCommand launcherName
{ {
@@ -126,7 +146,7 @@
makeWrapper ${browser}/bin/${spec.binary} $out/bin/${launcherName} \ makeWrapper ${browser}/bin/${spec.binary} $out/bin/${launcherName} \
--set LIBVA_DRIVER_NAME ${lib.escapeShellArg activeGpu.driver} \ --set LIBVA_DRIVER_NAME ${lib.escapeShellArg activeGpu.driver} \
--set LIBVA_DRM_DEVICE ${lib.escapeShellArg activeGpu.drmDevice} \ --set LIBVA_DRM_DEVICE ${lib.escapeShellArg activeGpu.drmDevice} \
--set NVD_BACKEND ${lib.escapeShellArg activeGpu.nvdBackend} \ --set NVD_BACKEND direct \
--add-flags "--enable-features=${enableFeatures}" \ --add-flags "--enable-features=${enableFeatures}" \
--add-flags "--disable-features=${disableFeatures}" \ --add-flags "--disable-features=${disableFeatures}" \
${lib.concatMapStringsSep " " (a: "--add-flags ${lib.escapeShellArg a}") cfg.extraCommandLineArgs} ${lib.concatMapStringsSep " " (a: "--add-flags ${lib.escapeShellArg a}") cfg.extraCommandLineArgs}
@@ -136,46 +156,28 @@
''; '';
selectedPackages = lib.filter ( selectedPackages = lib.filter (
name: name: lib.meta.availableOn pkgs.stdenv.hostPlatform browserCatalog.${name}.package
let
spec = browserCatalog.${name};
in
lib.meta.availableOn pkgs.stdenv.hostPlatform spec.package
) cfg.packages; ) cfg.packages;
wrappers = map mkChromiumHevc selectedPackages; wrappers = map mkChromiumHevc selectedPackages;
in in
{ {
options.chiasson.home.browsers.chromiumHevc = { options.chiasson.home.browsers.chromiumHevc = {
enable = lib.mkEnableOption '' enable =
lib.mkEnableOption ''
`google-chrome-hevc`: Chromium with VA-API HEVC for Jellyfin / MSE playback. `google-chrome-hevc`: Chromium with VA-API HEVC for Jellyfin / MSE playback.
Default GPU is **Intel** (`vaapi.gpu = "intel"`): Chromium + NVIDIA VA-API is GPU stack comes from `chiasson.system.chromiumHevc.gpu` (default **intel**).
unsupported upstream (`nvidia-vaapi-driver` README) and fails with
`failed Initialize()ing the frame pool` in Jellyfin.
Requires `chiasson.system.chromiumHevc.enable` on NixOS. Requires `chiasson.system.chromiumHevc.enable` on NixOS.
''; ''
// {
packages = lib.mkOption { default = true;
type = lib.types.listOf (
lib.types.enum (lib.attrNames browserCatalog)
);
default = [ "google-chrome" ];
description = "Chromium-based browsers to wrap.";
}; };
vaapi.gpu = lib.mkOption { packages = lib.mkOption {
type = lib.types.enum [ type = lib.types.listOf (lib.types.enum (lib.attrNames browserCatalog));
"intel" default = if pkgs.stdenv.hostPlatform.isAarch64 then [ "chromium" ] else [ "google-chrome" ];
"nvidia" description = "Chromium-based browsers to wrap.";
];
default = "intel";
description = ''
VA-API stack for `google-chrome-hevc`. Use **intel** for Jellyfin (Chromium +
nvidia-vaapi-driver is unsupported and hits frame-pool init errors). **nvidia**
keeps renderD129 + VaapiOnNvidiaGPUs for experiments only.
'';
}; };
extraCommandLineArgs = lib.mkOption { extraCommandLineArgs = lib.mkOption {
+6 -15
View File
@@ -1,17 +1,8 @@
{ ... }: { { self, ... }: {
flake.homeManagerModules.wisdomBrowsersEdge = flake.homeManagerModules.wisdomBrowsersEdge = self.lib.wisdomSlice {
{ config, lib, pkgs, ... }: path = "browsers.edge";
let default = false;
root = config.chiasson.home; description = "Edge (unfree); skipped if unavailable on this platform.";
cfg = config.chiasson.home.browsers.edge; packages = pkgs: [ pkgs.microsoft-edge ];
in
{
options.chiasson.home.browsers.edge.enable = lib.mkEnableOption "Edge (unfree); skipped if unavailable on this platform.";
config = lib.mkIf (root.enable && cfg.enable) {
home.packages = lib.optional (
lib.meta.availableOn pkgs.stdenv.hostPlatform pkgs.microsoft-edge
) pkgs.microsoft-edge;
};
}; };
} }
+13 -23
View File
@@ -1,11 +1,10 @@
{ ... }: { { self, ... }: {
flake.homeManagerModules.wisdomBrowsersFlow = flake.homeManagerModules.wisdomBrowsersFlow = self.lib.wisdomSlice {
{ config, lib, pkgs, ... }: path = "browsers.flow";
let default = false;
root = config.chiasson.home; description = "[Flow](https://github.com/MultiboxLabs/flow-browser) upstream AppImage wrapped for NixOS.";
cfg = config.chiasson.home.browsers.flow; packages =
pkgs:
flow-browser =
let let
pname = "flow-browser"; pname = "flow-browser";
version = "0.11.0"; version = "0.11.0";
@@ -25,7 +24,8 @@
appimageContents = pkgs.appimageTools.extractType2 { inherit pname version src; }; appimageContents = pkgs.appimageTools.extractType2 { inherit pname version src; };
in in
pkgs.appimageTools.wrapType2 { [
(pkgs.appimageTools.wrapType2 {
inherit pname version src; inherit pname version src;
nativeBuildInputs = [ pkgs.makeWrapper ]; nativeBuildInputs = [ pkgs.makeWrapper ];
@@ -45,23 +45,13 @@
meta = { meta = {
description = "Chromium-based browser (upstream AppImage)"; description = "Chromium-based browser (upstream AppImage)";
homepage = "https://github.com/MultiboxLabs/flow-browser"; homepage = "https://github.com/MultiboxLabs/flow-browser";
license = lib.licenses.gpl3Plus; license = pkgs.lib.licenses.gpl3Plus;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; sourceProvenance = with pkgs.lib.sourceTypes; [ binaryNativeCode ];
platforms = [ "x86_64-linux" "aarch64-linux" ]; platforms = [ "x86_64-linux" "aarch64-linux" ];
mainProgram = pname; mainProgram = pname;
maintainers = [ ]; maintainers = [ ];
}; };
}; })
in ];
{
options.chiasson.home.browsers.flow.enable = lib.mkEnableOption ''
[Flow](https://github.com/MultiboxLabs/flow-browser) upstream AppImage wrapped for NixOS.
'';
config = lib.mkIf (root.enable && cfg.enable) {
home.packages = lib.optional (
lib.meta.availableOn pkgs.stdenv.hostPlatform flow-browser
) flow-browser;
};
}; };
} }
+3 -1
View File
@@ -31,7 +31,9 @@
{ {
options.chiasson.home.browsers.orion.enable = lib.mkEnableOption '' options.chiasson.home.browsers.orion.enable = lib.mkEnableOption ''
[Orion](https://orionbrowser.com/) (Kagi) installs the upstream Flatpak bundle and provides `oriongtk`. [Orion](https://orionbrowser.com/) (Kagi) installs the upstream Flatpak bundle and provides `oriongtk`.
''; '' // {
default = false;
};
config = lib.mkIf (root.enable && cfg.enable) { config = lib.mkIf (root.enable && cfg.enable) {
home.packages = [ oriongtk ]; home.packages = [ oriongtk ];
+3 -1
View File
@@ -8,7 +8,9 @@
{ {
imports = [ inputs.zen-browser.homeModules.beta ]; imports = [ inputs.zen-browser.homeModules.beta ];
options.chiasson.home.browsers.zen.enable = lib.mkEnableOption "Zen Browser + locked-down policies / extensions."; options.chiasson.home.browsers.zen.enable = lib.mkEnableOption "Zen Browser + locked-down policies / extensions." // {
default = false;
};
config = lib.mkIf (root.enable && cfg.enable) { config = lib.mkIf (root.enable && cfg.enable) {
programs.zen-browser = { programs.zen-browser = {
+28 -10
View File
@@ -1,22 +1,21 @@
# HM side of the flake; option tree is `chiasson.home.*` (docs/conventions.md). # HM side of the flake; option tree is `chiasson.home.*` (docs/conventions.md).
{ self, inputs, ... }: { { self, inputs, ... }: {
# Root module: chiasson.home.enable + bash. Other `wisdom*` slices auto-wire via # Root module: chiasson.home.enable + git identity. Other `wisdom*` slices (including
# `lib.wisdomCatalogExtraModules`; hosts flip `chiasson.home.*.enable` rather than re-importing. # the bash shell) auto-wire via `lib.wisdomCatalogExtraModules`; hosts flip
# `chiasson.home.*.enable` rather than re-importing.
flake.homeManagerModules.wisdom = flake.homeManagerModules.wisdom =
{ config, lib, ... }: { config, lib, pkgs, ... }:
let let
cfg = config.chiasson.home; cfg = config.chiasson.home;
in in
{ {
imports = [
self.homeManagerModules.wisdomShellBash
];
options.chiasson.home = { options.chiasson.home = {
enable = lib.mkEnableOption '' enable =
lib.mkEnableOption ''
HM profile root for this flake (bash on by default). Desktop hosts use HM profile root for this flake (bash on by default). Desktop hosts use
`lib.wisdomCatalogExtraModules` once per user and flip `chiasson.home.*.enable` on the host. `lib.wisdomCatalogExtraModules` once per user and flip `chiasson.home.*.enable` on the host.
'' // { ''
// {
default = true; default = true;
}; };
@@ -29,6 +28,25 @@
}; };
}; };
config = lib.mkIf cfg.enable { home.packages = cfg.extraPackages; }; config = lib.mkIf cfg.enable (
lib.mkMerge [
{ home.packages = cfg.extraPackages; }
# Base git identity + encryption/player tools shared by every HM user.
{
programs.git = {
enable = true;
settings.user = {
name = "OlivierChiasson";
email = "olivierchiasson@hotmail.fr";
};
};
home.packages = [
pkgs.git-crypt
pkgs.feishin
];
}
]
);
}; };
} }
+3 -1
View File
@@ -12,7 +12,9 @@
enable = lib.mkEnableOption '' enable = lib.mkEnableOption ''
WhiteSur GTK + icon themes, Phinger cursor, and Qt via qt6ct (DMS) or KDE platform theme. WhiteSur GTK + icon themes, Phinger cursor, and Qt via qt6ct (DMS) or KDE platform theme.
Matugen accent colors load via gtk3/gtk4 extraCss when matugenGtkColors is enabled. Matugen accent colors load via gtk3/gtk4 extraCss when matugenGtkColors is enabled.
''; '' // {
default = true;
};
matugenGtkColors = lib.mkOption { matugenGtkColors = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
+4 -2
View File
@@ -13,11 +13,13 @@
{ {
options.chiasson.home.desktop.screenshot.enable = lib.mkEnableOption '' options.chiasson.home.desktop.screenshot.enable = lib.mkEnableOption ''
grim/slurp/swappy + SwiftShare helpers; Hyprland binds if HM Hyprland is on. grim/slurp/swappy + SwiftShare helpers; Hyprland binds if HM Hyprland is on.
''; '' // {
default = true;
};
options.chiasson.home.desktop.screenshot.swiftshareApiKeyFile = lib.mkOption { options.chiasson.home.desktop.screenshot.swiftshareApiKeyFile = lib.mkOption {
type = lib.types.nullOr lib.types.str; type = lib.types.nullOr lib.types.str;
default = null; default = "/run/secrets/swiftshare/API_KEY";
description = '' description = ''
File with SwiftShare API key (sops path is fine). Required when screenshot module is on. File with SwiftShare API key (sops path is fine). Required when screenshot module is on.
''; '';
+3 -1
View File
@@ -33,7 +33,9 @@
in in
{ {
options.chiasson.home.editors.cursor = { options.chiasson.home.editors.cursor = {
enable = lib.mkEnableOption "Cursor editor from the `cursor` flake input."; enable = lib.mkEnableOption "Cursor editor from the `cursor` flake input." // {
default = true;
};
setAsDefaultEditor = lib.mkOption { setAsDefaultEditor = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
default = true; default = true;
+6 -15
View File
@@ -1,17 +1,8 @@
{ ... }: { { self, ... }: {
flake.homeManagerModules.wisdomEditorsKate = flake.homeManagerModules.wisdomEditorsKate = self.lib.wisdomSlice {
{ config, lib, pkgs, ... }: path = "editors.kate";
let default = false;
root = config.chiasson.home; description = "Kate.";
cfg = config.chiasson.home.editors.kate; packages = pkgs: [ pkgs.kdePackages.kate ];
in
{
options.chiasson.home.editors.kate.enable = lib.mkEnableOption "Kate.";
config = lib.mkIf (root.enable && cfg.enable) {
home.packages = lib.optional (
lib.meta.availableOn pkgs.stdenv.hostPlatform pkgs.kdePackages.kate
) pkgs.kdePackages.kate;
};
}; };
} }
+6 -17
View File
@@ -1,19 +1,8 @@
{ ... }: { { self, ... }: {
flake.homeManagerModules.wisdomEditorsObsidian = flake.homeManagerModules.wisdomEditorsObsidian = self.lib.wisdomSlice {
{ config, lib, pkgs, ... }: path = "editors.obsidian";
let default = true;
root = config.chiasson.home; description = "Obsidian (unfree); skipped if unavailable here.";
cfg = config.chiasson.home.editors.obsidian; packages = pkgs: [ pkgs.obsidian ];
in
{
options.chiasson.home.editors.obsidian.enable = lib.mkEnableOption ''
Obsidian (unfree); skipped if unavailable here.
'';
config = lib.mkIf (root.enable && cfg.enable) {
home.packages = lib.optional (
lib.meta.availableOn pkgs.stdenv.hostPlatform pkgs.obsidian
) pkgs.obsidian;
};
}; };
} }
+100
View File
@@ -0,0 +1,100 @@
# Visual Studio Code (Microsoft build, unfree). Default extensions + settings shared by all
# hosts; per-host extras (peacock, comment-anchors, project-manager) go via
# `chiasson.home.editors.vscode.extensions`.
{ self, ... }: {
flake.homeManagerModules.wisdomEditorsVscode =
{ config, lib, pkgs, ... }:
let
root = config.chiasson.home;
cfg = config.chiasson.home.editors.vscode;
defaultExtensions = with pkgs.vscode-extensions; [
jnoortheen.nix-ide
yzhang.markdown-all-in-one
esbenp.prettier-vscode
vscjava.vscode-java-pack
redhat.java
];
# Wrap VS Code so a JDK is on PATH — the Red Hat Java language server (and
# other extension-bundled JVMs) need `java` to run, independent of the
# per-project `java.configuration.runtimes` setting.
vscodeWithJdk = pkgs.symlinkJoin {
name = "vscode-with-jdk";
paths = [ pkgs.vscode ];
nativeBuildInputs = [ pkgs.makeWrapper ];
postBuild = ''
wrapProgram "$out/bin/code" \
--prefix PATH : "${pkgs.jdk25}/bin"
'';
};
coreSettings = {
"nix.enableLanguageServer" = true;
"nix.serverPath" = "nixd";
"nix.serverSettings" = {
nixd = {
formatting = {
command = "nixfmt";
};
};
};
"diffEditor.ignoreTrimWhitespace" = false;
"chat.disableAIFeatures" = true;
"java.configuration.runtimes" = [
{
name = "JavaSE-21";
path = "${pkgs.jdk21}/lib/openjdk";
}
{
name = "JavaSE-25";
path = "${pkgs.jdk25}/lib/openjdk";
default = true;
}
];
};
# Seed a *writable* settings.json (not a store symlink) so extensions like
# kilo-code can edit it at runtime. `force = false` in the config means HM
# only writes it when absent, preserving kilo's later edits across `switch`.
settingsJson = pkgs.writeText "vscode-user-settings" (
builtins.toJSON coreSettings
);
in
{
options.chiasson.home.editors.vscode = {
enable = lib.mkEnableOption ''
Visual Studio Code (Microsoft build; needs `nixpkgs.config.allowUnfree`). Core
extensions (nix-ide, markdown-all-in-one, prettier) + nixd/nixfmt settings are included.
'' // {
default = false;
};
extensions = lib.mkOption {
type = lib.types.listOf lib.types.package;
default = [ ];
description = ''
Extra extensions not wanted on every host (e.g. peacock, comment-anchors,
project-manager). Per-host via `chiasson.users.extraModules`.
'';
};
};
config = lib.mkIf (root.enable && cfg.enable) {
home.packages = [ ];
# Writable, seed-once user settings (kilo-code can append to it).
home.file.".config/Code/User/settings.json" = {
source = settingsJson;
force = false;
};
programs.vscode = {
enable = true;
package = vscodeWithJdk;
extensions = defaultExtensions ++ cfg.extensions;
};
};
};
}
+3 -1
View File
@@ -8,7 +8,9 @@
{ {
options.chiasson.home.filebrowsers.nemo.enable = lib.mkEnableOption '' options.chiasson.home.filebrowsers.nemo.enable = lib.mkEnableOption ''
Nemo file manager (GTK). Colors come from DMS matugen via GTK settings no KDE/Qt bridge needed. Nemo file manager (GTK). Colors come from DMS matugen via GTK settings no KDE/Qt bridge needed.
''; '' // {
default = true;
};
config = lib.mkIf (root.enable && cfg.enable) { config = lib.mkIf (root.enable && cfg.enable) {
home.packages = [ pkgs.nemo ]; home.packages = [ pkgs.nemo ];
+3 -1
View File
@@ -8,7 +8,9 @@
{ {
options.chiasson.home.hardware.uconsoleGamepad.enable = lib.mkEnableOption '' options.chiasson.home.hardware.uconsoleGamepad.enable = lib.mkEnableOption ''
uConsole gamepad antimicrox profile + Hyprland exec-once when HM Hyprland is on. uConsole gamepad antimicrox profile + Hyprland exec-once when HM Hyprland is on.
''; '' // {
default = false;
};
config = lib.mkIf (root.enable && cfg.enable) (lib.mkMerge [ config = lib.mkIf (root.enable && cfg.enable) (lib.mkMerge [
{ {
+3 -1
View File
@@ -8,7 +8,9 @@
in in
{ {
options.chiasson.home.shell.fish = { options.chiasson.home.shell.fish = {
enable = lib.mkEnableOption "Fish + grc, quiet greeting, rbw SSH socket defaults."; enable = lib.mkEnableOption "Fish + grc, quiet greeting, rbw SSH socket defaults." // {
default = true;
};
nixYourShell = { nixYourShell = {
enable = lib.mkEnableOption '' enable = lib.mkEnableOption ''
+3 -1
View File
@@ -7,7 +7,9 @@
in in
{ {
options.chiasson.home.shell.ohMyPosh = { options.chiasson.home.shell.ohMyPosh = {
enable = lib.mkEnableOption "[Oh My Posh](https://ohmyposh.dev/) prompt."; enable = lib.mkEnableOption "[Oh My Posh](https://ohmyposh.dev/) prompt." // {
default = true;
};
builtinTheme = lib.mkOption { builtinTheme = lib.mkOption {
type = lib.types.str; type = lib.types.str;
+3 -1
View File
@@ -7,7 +7,9 @@
cfg = config.chiasson.home.shell.yazi; cfg = config.chiasson.home.shell.yazi;
in in
{ {
options.chiasson.home.shell.yazi.enable = lib.mkEnableOption "Yazi as `y` + 7zz with rar."; options.chiasson.home.shell.yazi.enable = lib.mkEnableOption "Yazi as `y` + 7zz with rar." // {
default = true;
};
config = lib.mkIf (root.enable && cfg.enable) { config = lib.mkIf (root.enable && cfg.enable) {
programs.yazi = { programs.yazi = {
+3 -1
View File
@@ -15,7 +15,9 @@
{ {
options.chiasson.home.terminals.kitty.enable = lib.mkEnableOption '' options.chiasson.home.terminals.kitty.enable = lib.mkEnableOption ''
Kitty + DMS includes; activation strips `*-theme.auto.conf` so matugen colors stick. Kitty + DMS includes; activation strips `*-theme.auto.conf` so matugen colors stick.
''; '' // {
default = true;
};
config = lib.mkIf (root.enable && cfg.enable) { config = lib.mkIf (root.enable && cfg.enable) {
programs.kitty = { programs.kitty = {