···11+# Firebase Studio configuration
22+33+This directory holds the Firebase Studio (formerly Project IDX) dev environment
44+configuration for this project.
55+66+## Key Files
77+88+- `dev.nix`: The primary configuration file for your Firebase Studio workspace. It defines the system packages, VS Code extensions, environment variables, and lifecycle hooks used in the environment.
99+- `dev.local.nix`: An optional, git-ignored file for making local-only adjustments to your workspace without affecting the shared configuration. It is automatically imported by `dev.nix` if it exists.
1010+1111+## Common Tasks
1212+1313+### Adding Packages
1414+1515+To add new system tools, search for the package name on [NixOS Package Search](https://search.nixos.org/packages) and add it to the `packages` list in `dev.nix`.
1616+1717+### Adding Extensions
1818+1919+To add VS Code extensions from the Open VSX marketplace, find the extension ID (usually in the format `publisher.extension-name`) and add it to the `idx.extensions` list in `dev.nix`.
2020+2121+## Features
2222+2323+- **Docker Support**: Docker is enabled by default in this workspace (`services.docker.enable = true`). `DOCKER_BUILDKIT` is also enabled for faster builds.
2424+2525+## Resources
2626+2727+- [Firebase Studio Documentation](https://firebase.google.com/docs/studio)
2828+- [Firebase Studio Console](https://studio.firebase.google.com)
2929+- [NixOS Package Search](https://search.nixos.org/packages)
+66
AGENT.md
···11+This repository contains NixOS and Home Manager configurations for various machines. The goal is to manage system and user configurations declaratively using Nix.
22+33+### Project Structure
44+55+The repository is structured as a Nix flake.
66+77+- `flake.nix`: The main entry point. It defines the flake's inputs (like `nixpkgs`, `home-manager`, etc.) and outputs. The main outputs are `nixosConfigurations` for NixOS hosts and `homeConfigurations` for home-manager configurations on both NixOS and non-NixOS hosts.
88+- `hosts/`: Contains the configurations for specific machines. Each subdirectory corresponds to a host and contains a `configuration.nix` file, which is the main configuration for that host.
99+- `shared/`: Contains modules that are shared across different hosts. This is where most of the configuration logic resides.
1010+ - `shared/desktop/`: Desktop specifics (Bluetooth, Plasma, Firefox, Yubikey, etc.).
1111+ - `shared/server/`: Server-side configurations (SSH, Firewall, Tailscale, Cockpit).
1212+ - `shared/home-manager/`: Home Manager configurations for user-specific dotfiles and packages.
1313+ - `shared/shells/`: Shell configurations (Bash, custom prompts).
1414+ - `shared/vscode/`: VSCode related settings.
1515+- `pkgs/`: Custom packages defined in this flake (e.g., `coolify-compose`, `detect-vscode-for-git`).
1616+- `scripts/`: Helper scripts for deployment and maintenance.
1717+- `misc/`: Miscellaneous configurations and library scripts (e.g., `starship.toml`, bash helper functions).
1818+1919+### Key Concepts
2020+2121+- **NixOS Modules**: The configurations are built using the NixOS module system. The `shared/` directory contains many reusable modules. When you need to add or change a configuration, you'll likely be editing one of these files or creating a new one.
2222+- **Home Manager**: Home Manager is used to manage user-level configurations (dotfiles, packages, services). The main Home Manager configuration is in `shared/home-manager/main.nix`.
2323+- **Flake Outputs**:
2424+ - `nixosConfigurations`: System configurations for hosts.
2525+ - `homeConfigurations`: Standalone Home Manager configurations.
2626+ - `packages`: Custom packages exported by this flake.
2727+ - `overlays`: Nixpkgs overlays to make custom packages available to system configurations.
2828+ - `exportedConfigs`: Reusable modules exported for external consumers.
2929+3030+### Developer Workflow
3131+3232+#### Adding a new host
3333+3434+1. Create a new directory in `hosts/` for the new host.
3535+2. Add a `configuration.nix` file inside the new directory. You can use one of the existing host configurations as a template.
3636+3. Add a new entry to the `nixosConfigurations` in `flake.nix` for the new host, pointing to your new `configuration.nix`.
3737+4. Import the necessary shared modules into your `configuration.nix`.
3838+3939+#### Modifying a configuration
4040+4141+1. Identify which module or host configuration you need to change.
4242+2. Make your changes to the respective `.nix` file.
4343+3. To apply the changes to a machine, run `sudo nixos-rebuild switch --flake .#<hostname>` on that machine, where `<hostname>` is the name of the host you want to update.
4444+4545+#### Updating dependencies
4646+4747+To update the flake's inputs (e.g., `nixpkgs`), run:
4848+4949+```bash
5050+nix flake update
5151+```
5252+5353+This will update the `flake.lock` file with the latest versions of the dependencies.
5454+5555+### Important Files
5656+5757+- `flake.nix`: The central point of the configuration.
5858+- `shared/meta.nix`: Imports a base set of shared modules.
5959+- `shared/home-manager/main.nix`: The main entry point for user-specific configurations managed by Home Manager.
6060+- `shared/home-manager/nogui.nix`: A headless Home Manager configuration (used in `plain` configs).
6161+- `hosts/<hostname>/configuration.nix`: The main configuration file for a specific host.
6262+- `hosts/<hostname>/users/<username>.nix`: User-specific configurations for a given host, leveraging Home Manager. See `hosts/stellapent-cier/users/gildedguy.nix` for an example.
6363+- `hosts/live-cd/base.nix` and `hosts/live-cd/kde-plasma.nix`: Live CD-specific NixOS configurations
6464+- `.idx/`: Firebase Studio specific dev environment configurations. See @.idx/AGENT.md for details.
6565+6666+When working on this codebase, remember that it's all about declarative configuration. Instead of changing things imperatively on the system, you declare the desired state in these `.nix` files, and Nix takes care of making it happen.
+8
README.md
···25252626## Usage
27272828+### Poking around Gemini CLI + Chat in VS Code?
2929+3030+I already ported my GitHub Copilot instructions into the standard `AGENT.md` file
3131+so your AI tools can easily speedrun things in different shell sessions with Gemini
3232+CLI up and running. While this is untested, I symlinked the old file location for
3333+compatibility so you're good to go if you are contributing patches or just forking
3434+around and finding out.
3535+2836### Installing NixOS
29373038It is recommended to install NixOS using either the Calamares-based graphical