1.1 KiB
1.1 KiB
❄️ My NixOS Configuration
This directory contains the declarative configuration for my user environment, managed by Home Manager.
🛠️ How it Works (The Nix Way)
In NixOS, configuration files are managed "declaratively" rather than manually.
- The Source of Truth: Everything is defined in your
.nixfiles. - The Nix Store: When you "switch," Nix builds your files and stores them in
/nix/store/. These are immutable (read-only). - Symlinking: Home Manager creates symbolic links in your home directory (like
~/.pi/agents/settings.json) that point back to that read-only store.
✍️ How to Make Changes
Do not edit the files in your home directory. They are read-only symlinks. To change settings:
- Edit your source code: Open
home.nixinnvim. - Modify the Nix block: Locate the
home.filesection for your agents. - Apply changes:
home-manager switch
❓ Why "sudo" doesn't work
The /nix/store is mounted as read-only at the system level. This ensures your system always matches your config and allows for instant rollbacks if something breaks.