Compare commits
2 Commits
f1bd5146a3
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 6b8fa60540 | |||
| 86dc80eb3c |
+14
-4
@@ -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.
|
||||||
|
|||||||
@@ -12,8 +12,23 @@
|
|||||||
jnoortheen.nix-ide
|
jnoortheen.nix-ide
|
||||||
yzhang.markdown-all-in-one
|
yzhang.markdown-all-in-one
|
||||||
esbenp.prettier-vscode
|
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 = {
|
coreSettings = {
|
||||||
"nix.enableLanguageServer" = true;
|
"nix.enableLanguageServer" = true;
|
||||||
"nix.serverPath" = "nixd";
|
"nix.serverPath" = "nixd";
|
||||||
@@ -26,7 +41,26 @@
|
|||||||
};
|
};
|
||||||
"diffEditor.ignoreTrimWhitespace" = false;
|
"diffEditor.ignoreTrimWhitespace" = false;
|
||||||
"chat.disableAIFeatures" = true;
|
"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
|
in
|
||||||
{
|
{
|
||||||
options.chiasson.home.editors.vscode = {
|
options.chiasson.home.editors.vscode = {
|
||||||
@@ -48,14 +82,19 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf (root.enable && cfg.enable) {
|
config = lib.mkIf (root.enable && cfg.enable) {
|
||||||
home.packages = [ pkgs.vscode ];
|
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 = {
|
programs.vscode = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.vscode;
|
package = vscodeWithJdk;
|
||||||
extensions = defaultExtensions ++ cfg.extensions;
|
extensions = defaultExtensions ++ cfg.extensions;
|
||||||
userSettings = coreSettings;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user