NixOS + home-manager configs, mirrored from GitLab SaaS. gitlab.com/andreijiroh-dev/nixops-config
nix-flake nixos home-manager nixpkgs nix-flakes
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: cook up AGENT.md for Gemini CLI and friends

Also update le README to mention this.

Signed-off-by: ajhalili2006 <ajhalili2006@gmail.com>

+103
+29
.idx/AGENT.md
··· 1 + # Firebase Studio configuration 2 + 3 + This directory holds the Firebase Studio (formerly Project IDX) dev environment 4 + configuration for this project. 5 + 6 + ## Key Files 7 + 8 + - `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. 9 + - `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. 10 + 11 + ## Common Tasks 12 + 13 + ### Adding Packages 14 + 15 + 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`. 16 + 17 + ### Adding Extensions 18 + 19 + 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`. 20 + 21 + ## Features 22 + 23 + - **Docker Support**: Docker is enabled by default in this workspace (`services.docker.enable = true`). `DOCKER_BUILDKIT` is also enabled for faster builds. 24 + 25 + ## Resources 26 + 27 + - [Firebase Studio Documentation](https://firebase.google.com/docs/studio) 28 + - [Firebase Studio Console](https://studio.firebase.google.com) 29 + - [NixOS Package Search](https://search.nixos.org/packages)
+66
AGENT.md
··· 1 + This repository contains NixOS and Home Manager configurations for various machines. The goal is to manage system and user configurations declaratively using Nix. 2 + 3 + ### Project Structure 4 + 5 + The repository is structured as a Nix flake. 6 + 7 + - `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. 8 + - `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. 9 + - `shared/`: Contains modules that are shared across different hosts. This is where most of the configuration logic resides. 10 + - `shared/desktop/`: Desktop specifics (Bluetooth, Plasma, Firefox, Yubikey, etc.). 11 + - `shared/server/`: Server-side configurations (SSH, Firewall, Tailscale, Cockpit). 12 + - `shared/home-manager/`: Home Manager configurations for user-specific dotfiles and packages. 13 + - `shared/shells/`: Shell configurations (Bash, custom prompts). 14 + - `shared/vscode/`: VSCode related settings. 15 + - `pkgs/`: Custom packages defined in this flake (e.g., `coolify-compose`, `detect-vscode-for-git`). 16 + - `scripts/`: Helper scripts for deployment and maintenance. 17 + - `misc/`: Miscellaneous configurations and library scripts (e.g., `starship.toml`, bash helper functions). 18 + 19 + ### Key Concepts 20 + 21 + - **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. 22 + - **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`. 23 + - **Flake Outputs**: 24 + - `nixosConfigurations`: System configurations for hosts. 25 + - `homeConfigurations`: Standalone Home Manager configurations. 26 + - `packages`: Custom packages exported by this flake. 27 + - `overlays`: Nixpkgs overlays to make custom packages available to system configurations. 28 + - `exportedConfigs`: Reusable modules exported for external consumers. 29 + 30 + ### Developer Workflow 31 + 32 + #### Adding a new host 33 + 34 + 1. Create a new directory in `hosts/` for the new host. 35 + 2. Add a `configuration.nix` file inside the new directory. You can use one of the existing host configurations as a template. 36 + 3. Add a new entry to the `nixosConfigurations` in `flake.nix` for the new host, pointing to your new `configuration.nix`. 37 + 4. Import the necessary shared modules into your `configuration.nix`. 38 + 39 + #### Modifying a configuration 40 + 41 + 1. Identify which module or host configuration you need to change. 42 + 2. Make your changes to the respective `.nix` file. 43 + 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. 44 + 45 + #### Updating dependencies 46 + 47 + To update the flake's inputs (e.g., `nixpkgs`), run: 48 + 49 + ```bash 50 + nix flake update 51 + ``` 52 + 53 + This will update the `flake.lock` file with the latest versions of the dependencies. 54 + 55 + ### Important Files 56 + 57 + - `flake.nix`: The central point of the configuration. 58 + - `shared/meta.nix`: Imports a base set of shared modules. 59 + - `shared/home-manager/main.nix`: The main entry point for user-specific configurations managed by Home Manager. 60 + - `shared/home-manager/nogui.nix`: A headless Home Manager configuration (used in `plain` configs). 61 + - `hosts/<hostname>/configuration.nix`: The main configuration file for a specific host. 62 + - `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. 63 + - `hosts/live-cd/base.nix` and `hosts/live-cd/kde-plasma.nix`: Live CD-specific NixOS configurations 64 + - `.idx/`: Firebase Studio specific dev environment configurations. See @.idx/AGENT.md for details. 65 + 66 + 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
··· 25 25 26 26 ## Usage 27 27 28 + ### Poking around Gemini CLI + Chat in VS Code? 29 + 30 + I already ported my GitHub Copilot instructions into the standard `AGENT.md` file 31 + so your AI tools can easily speedrun things in different shell sessions with Gemini 32 + CLI up and running. While this is untested, I symlinked the old file location for 33 + compatibility so you're good to go if you are contributing patches or just forking 34 + around and finding out. 35 + 28 36 ### Installing NixOS 29 37 30 38 It is recommended to install NixOS using either the Calamares-based graphical