From 0d6345f0763b6e4032af37b8dc7e70aa9d6df150 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20H=C3=A9mono?= Date: Tue, 24 Mar 2026 22:42:21 +0100 Subject: [PATCH 1/4] Add .gitignore to exclude .idea/ Co-Authored-By: Claude Sonnet 4.6 --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9f11b75 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea/ From 816796fdf48ee8ddb04cc6e8b44e87f606b4185b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20H=C3=A9mono?= Date: Tue, 24 Mar 2026 22:42:24 +0100 Subject: [PATCH 2/4] Install claude-code from nixpkgs-unstable on LAPTOP-032 Co-Authored-By: Claude Sonnet 4.6 --- flake.lock | 17 +++++++++++++++++ flake.nix | 1 + hosts/LAPTOP-032/users/julien.nix | 15 +++++++++++++-- 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/flake.lock b/flake.lock index 9c21f9b..112a0ab 100644 --- a/flake.lock +++ b/flake.lock @@ -92,6 +92,22 @@ "type": "github" } }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1774106199, + "narHash": "sha256-US5Tda2sKmjrg2lNHQL3jRQ6p96cgfWh3J1QBliQ8Ws=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "6c9a78c09ff4d6c21d0319114873508a6ec01655", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "blueprint": "blueprint", @@ -99,6 +115,7 @@ "mysecrets": "mysecrets", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable", "sops-nix": "sops-nix" } }, diff --git a/flake.nix b/flake.nix index 0d6bd56..ea89a4b 100644 --- a/flake.nix +++ b/flake.nix @@ -3,6 +3,7 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; + nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; blueprint = { url = "github:numtide/blueprint"; diff --git a/hosts/LAPTOP-032/users/julien.nix b/hosts/LAPTOP-032/users/julien.nix index d800561..a8d3382 100644 --- a/hosts/LAPTOP-032/users/julien.nix +++ b/hosts/LAPTOP-032/users/julien.nix @@ -1,4 +1,13 @@ -{ flake, config, pkgs, ... }: +{ flake, inputs, config, pkgs, ... }: + +let + pkgs-unstable = import inputs.nixpkgs-unstable { + inherit (pkgs) system; + config.allowUnfreePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) [ + "claude-code" + ]; + }; +in { @@ -13,11 +22,13 @@ programs.uv.enable = true; - programs.gemini-cli = { + programs.claude-code = { enable = true; + package = pkgs-unstable.claude-code; }; home.packages = with pkgs; [ + wl-clipboard ]; # Let Home Manager install and manage itself. From 2e4d57f63009a333371f5ef3f338c376183376f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20H=C3=A9mono?= Date: Tue, 24 Mar 2026 22:42:29 +0100 Subject: [PATCH 3/4] Add CLAUDE.md with repo architecture and commands Co-Authored-By: Claude Sonnet 4.6 --- CLAUDE.md | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..3c2391f --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,65 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Overview + +Personal NixOS flake-based configuration using [Numtide Blueprint](https://github.com/numtide/blueprint) for multi-host management. Manages three hosts with Home Manager for user environments. + +## Commands + +```bash +# Rebuild and switch the current host +sudo nixos-rebuild switch --flake .#$(hostname) + +# Test without applying +sudo nixos-rebuild test --flake .#$(hostname) + +# Apply home-manager for a user +home-manager switch --flake .#julien@LAPTOP-032 +home-manager switch --flake .#jhemono@gwiad + +# Update flake inputs +nix flake update +nix flake update nixpkgs-unstable # single input +``` + +## Architecture + +Blueprint auto-discovers hosts and modules — no manual registration needed. + +``` +flake.nix (Blueprint orchestrator) +modules/ + nixos/ + base.nix — common system settings (bootloader, timezone, Nix store GC, system packages) + jhemono.nix — jhemono user account + SSH authorized keys + home/ + user.nix — custom options: user.name, user.email + base.nix — shell (Fish), editor (Helix) + git.nix — Git + Jujutsu + GitHub CLI +hosts/ + gwiad/ — ThinkPad T14 AMD workstation, Sway/Wayland + sesame/ — home server (Forgejo, Nextcloud, Mailu, Nginx, sops-nix secrets) + LAPTOP-032/ — work laptop, GNOME +``` + +## Hosts + +**gwiad** — personal workstation +- nixos-hardware: `lenovo-thinkpad-t14-amd-gen3` +- Sway + Waybar, btrbk snapshots, syncthing + +**sesame** — home server (`*.hemono.fr` domains) +- Services: Forgejo (`git`), Nextcloud (`suite`), Mailu (`mail`), Transmission, Syncthing +- All HTTPS via ACME; SSH-key-only access +- Secrets via sops-nix (private `mysecrets` repo) + +**LAPTOP-032** — work laptop +- GNOME/GDM, Docker (rootless), claude-code (from `nixpkgs-unstable`), UV, Node.js + +## Key Conventions + +- `nixpkgs-unstable` overlay is used when a package isn't available or outdated in the stable channel (e.g., `claude-code`) +- Home Manager modules receive user info via the custom `user.name` / `user.email` options defined in `modules/home/user.nix` +- Host-specific files live entirely under `hosts//`; shared logic goes in `modules/` From d9f167a958f9c00900334ccfbad815fbeb3a1f6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20H=C3=A9mono?= Date: Fri, 27 Mar 2026 16:00:53 +0100 Subject: [PATCH 4/4] Install Lazygit --- hosts/LAPTOP-032/users/julien.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hosts/LAPTOP-032/users/julien.nix b/hosts/LAPTOP-032/users/julien.nix index a8d3382..fc8ab44 100644 --- a/hosts/LAPTOP-032/users/julien.nix +++ b/hosts/LAPTOP-032/users/julien.nix @@ -27,6 +27,10 @@ in package = pkgs-unstable.claude-code; }; + programs.lazygit = { + enable = true; + }; + home.packages = with pkgs; [ wl-clipboard ];