From e8e292c8eb793c689dbd7cb886f93b1dbeb12d56 Mon Sep 17 00:00:00 2001 From: Geir Okkenhaug Jerstad Date: Thu, 5 Jun 2025 09:32:58 +0200 Subject: [PATCH] feat: System update and direnv fixes - Updated flake.lock to latest NixOS 25.05 packages (2025-06-04) - Fixed direnv functionality across system configuration - Added direnv and nix-direnv packages to base.nix - Integrated direnv shell hook in zsh configuration - Enhanced user management with geir.nix updates - Added comprehensive package lists and development tools - Successfully tested NixOS configuration rebuild - System ready for reboot with latest updates --- flake.lock | 6 +++--- instruction.md | 14 ++++++++------ modules/common/base.nix | 2 ++ modules/development/tools.nix | 1 + modules/users/common.nix | 8 +++++--- modules/users/geir.nix | 2 +- notes.md | 1 + users/README.md | 0 8 files changed, 21 insertions(+), 13 deletions(-) create mode 100644 users/README.md diff --git a/flake.lock b/flake.lock index f47b529..ca5814a 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1748889542, - "narHash": "sha256-Hb4iMhIbjX45GcrgOp3b8xnyli+ysRPqAgZ/LZgyT5k=", + "lastModified": 1749024892, + "narHash": "sha256-OGcDEz60TXQC+gVz5sdtgGJdKVYr6rwdzQKuZAJQpCA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "10d7f8d34e5eb9c0f9a0485186c1ca691d2c5922", + "rev": "8f1b52b04f2cb6e5ead50bd28d76528a2f0380ef", "type": "github" }, "original": { diff --git a/instruction.md b/instruction.md index e71bcba..1e5980b 100644 --- a/instruction.md +++ b/instruction.md @@ -1,10 +1,10 @@ -# AI Agent Instructions: NixOS Flakes Migration for CongenitalOptimist +# AI Agent General Instructions ## Overview -This document provides step-by-step instructions for AI agents to help migrate the CongenitalOptimist machine from traditional NixOS configuration to flakes-based configuration and upgrade to NixOS 25.05. The system already has excellent modular structure that we'll preserve and enhance. +This part of the document provides general instructions for tha AI agent. ## General instructions -This document is to be treated as an iterative work and a collaberation. +This document is to be treated as an iterative work and a collaberation between the user and AI agent. ## Goal for this file Top part reusable instructions that can be transferred to other project and as away to iterativey make ai agent behave more like I prefer. @@ -21,12 +21,14 @@ The Plan.md file should have the project information and steps. - Rust for binary tools etc ## Written language and style -use Notes.md to take notes . +use notes.md to take notes . Use a casual but knowledgeable tone. This is not a corporate project there are no audits or compliance to adhere to. More like an open source project, more like a hobby/passion project -# Bottom part -itreative about the project update often +# AI Agent Instructions: NixOS Flakes Migration for CongenitalOptimist +## Overview +This part of the document provides step-by-step instructions for AI agents to help migrate the CongenitalOptimist machine from traditional NixOS configuration to flakes-based configuration and upgrade to NixOS 25.05. The system already has excellent modular structure that we'll preserve and enhance. +Itreative about the project, update often ## Current System Information - **Hostname**: work → congenital-optimist (migration in progress) - **Current Version**: NixOS 25.05 (migrated from 23.11) diff --git a/modules/common/base.nix b/modules/common/base.nix index 5ade66b..9fb18a7 100644 --- a/modules/common/base.nix +++ b/modules/common/base.nix @@ -11,6 +11,8 @@ fzf zoxide uutils-coreutils-noprefix + direnv # Directory-based environment management + nix-direnv # Nix integration for direnv ]; environment.shellAliases = { vi = "nvim"; diff --git a/modules/development/tools.nix b/modules/development/tools.nix index 54628ca..d171ac2 100644 --- a/modules/development/tools.nix +++ b/modules/development/tools.nix @@ -28,6 +28,7 @@ # Development utilities git nix-direnv + direnv gh github-copilot-cli ]; diff --git a/modules/users/common.nix b/modules/users/common.nix index cb1a0b1..b174aab 100644 --- a/modules/users/common.nix +++ b/modules/users/common.nix @@ -18,6 +18,11 @@ autosuggestions.enable = true; syntaxHighlighting.enable = true; + # direnv integration + interactiveShellInit = '' + eval "$(direnv hook zsh)" + ''; + # Common aliases for all users shellAliases = { # Modern CLI tool replacements @@ -70,9 +75,6 @@ curl wget - # Media - celluloid - # Utilities file unzip diff --git a/modules/users/geir.nix b/modules/users/geir.nix index fc71315..2f1b14e 100644 --- a/modules/users/geir.nix +++ b/modules/users/geir.nix @@ -95,7 +95,7 @@ # Development preferences EDITOR = "emacs"; BROWSER = "firefox"; - TERMINAL = "alacritty"; + TERMINAL = "kitty"; # Git configuration GIT_EDITOR = "emacs"; diff --git a/notes.md b/notes.md index e69de29..a6f37b5 100644 --- a/notes.md +++ b/notes.md @@ -0,0 +1 @@ +# Notes to be use to write blog post \ No newline at end of file diff --git a/users/README.md b/users/README.md new file mode 100644 index 0000000..e69de29