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: get cooking with Live CD customizations

Not yet tested or built, but doing a snapshot for now. Also did a manual
update on the lockfile and some tweaks at Tailscale daemon CLI flags.

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

+128 -67
+1 -54
.github/copilot-instructions.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` and `homeConfigurations`. 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. These modules are organized into subdirectories based on their purpose (e.g., `desktop`, `server`, `home-manager`). 10 - - `home-manager/`: Contains configurations for Home Manager, which is used to manage user-specific dotfiles and packages. 11 - 12 - ### Key Concepts 13 - 14 - - **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. 15 - - **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`. 16 - - **Flake Outputs**: 17 - - `nixosConfigurations`: Defines the system configurations for different hosts. Each attribute in this set corresponds to a host. 18 - - `homeConfigurations`: Defines user configurations that can be deployed with Home Manager. 19 - - `exportedConfigs`: These are configurations that can be used by other flakes. 20 - 21 - ### Developer Workflow 22 - 23 - #### Adding a new host 24 - 25 - 1. Create a new directory in `hosts/` for the new host. 26 - 2. Add a `configuration.nix` file inside the new directory. You can use one of the existing host configurations as a template. 27 - 3. Add a new entry to the `nixosConfigurations` in `flake.nix` for the new host, pointing to your new `configuration.nix`. 28 - 4. Import the necessary shared modules into your `configuration.nix`. 29 - 30 - #### Modifying a configuration 31 - 32 - 1. Identify which module or host configuration you need to change. 33 - 2. Make your changes to the respective `.nix` file. 34 - 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. 35 - 36 - #### Updating dependencies 37 - 38 - To update the flake's inputs (e.g., `nixpkgs`), run: 39 - 40 - ```bash 41 - nix flake update 42 - ``` 43 - 44 - This will update the `flake.lock` file with the latest versions of the dependencies. 45 - 46 - ### Important Files 47 - 48 - - `flake.nix`: The central point of the configuration. 49 - - `shared/meta.nix`: Imports a base set of shared modules. 50 - - `shared/home-manager/main.nix`: The main entry point for user-specific configurations managed by Home Manager. 51 - - `hosts/<hostname>/configuration.nix`: The main configuration file for a specific host. 52 - - `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. 53 - 54 - 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. 1 + AGENT.md
+12 -12
flake.lock
··· 182 182 }, 183 183 "locked": { 184 184 "dir": "pkgs/firefox-addons", 185 - "lastModified": 1769141021, 186 - "narHash": "sha256-HHAeQ1YMo0/gM38gBXulMk7xSPrsiw/7e6UpcmcxcfM=", 185 + "lastModified": 1769227419, 186 + "narHash": "sha256-3Rtx4hYKnRJNopgmMi/erRL6lM3qLypbbvj1TWcoM0g=", 187 187 "owner": "rycee", 188 188 "repo": "nur-expressions", 189 - "rev": "91b470d0ce83a8d84dc46e0bcbeb2a7836c06cd6", 189 + "rev": "d945acd0d5d9e43778f65b5f1646ec036e39e049", 190 190 "type": "gitlab" 191 191 }, 192 192 "original": { ··· 401 401 ] 402 402 }, 403 403 "locked": { 404 - "lastModified": 1769132734, 405 - "narHash": "sha256-gmU9cRplrQWqoback9PgQX7Dlsdx8JlhlVZwf0q1F7E=", 404 + "lastModified": 1769187349, 405 + "narHash": "sha256-clG+nT6I2qxjIgk5WoSDKJyNhzKJs9jzbCujPF2S/yg=", 406 406 "owner": "nix-community", 407 407 "repo": "home-manager", 408 - "rev": "d055b309a6277343cb1033a11d7500f0a0f669fc", 408 + "rev": "082a4cd87c6089d1d9c58ebe52655f9e07245fcb", 409 409 "type": "github" 410 410 }, 411 411 "original": { ··· 526 526 ] 527 527 }, 528 528 "locked": { 529 - "lastModified": 1769134610, 530 - "narHash": "sha256-BvkZ2a3ISQr4vkUo6m4l4FhXme6pJm8vv6ykqbaHk7M=", 529 + "lastModified": 1769220699, 530 + "narHash": "sha256-V+72j5o7sO3YW1w3TcK0NEkRMaXGR54Qx0sVXeroHWo=", 531 531 "owner": "nix-community", 532 532 "repo": "nix4vscode", 533 - "rev": "51af7b835333f959a24b7ccbc97a8e6885edafbc", 533 + "rev": "e1f0e44e632057292875651482fe5d2d70175477", 534 534 "type": "github" 535 535 }, 536 536 "original": { ··· 784 784 ] 785 785 }, 786 786 "locked": { 787 - "lastModified": 1769059766, 788 - "narHash": "sha256-u95Qe60mF3eoEqrd0tIej4A8TDWoc/N4ZjZ60npplgw=", 787 + "lastModified": 1769201724, 788 + "narHash": "sha256-jejW3u1bkqz0ObXZeiZqLQNwC7+MXb8/KMwf3VPQpRI=", 789 789 "owner": "0xc000022070", 790 790 "repo": "zen-browser-flake", 791 - "rev": "dc0483a6e3ff1ffb04ad77d26c1a4458f4cf82d6", 791 + "rev": "0fac05e4b604c3304e7710a95572e78350fe9968", 792 792 "type": "github" 793 793 }, 794 794 "original": {
+18
flake.nix
··· 272 272 ; 273 273 }; 274 274 }; 275 + 276 + live-cd = nixpkgs.lib.nixosSystem { 277 + system = builtins.currentSystem; 278 + modules = [ 279 + ( 280 + { ... }: 281 + { 282 + _module.args = { inherit self nix4vscode; }; 283 + } 284 + ) 285 + nix-ld.nixosModules.nix-ld 286 + determinate.nixosModules.default 287 + home-manager.nixosModules.home-manager 288 + vscode-server.nixosModules.default 289 + chaotic.nixosModules.default 290 + ./hosts/live-cd/kde-plasma.nix 291 + ]; 292 + }; 275 293 }; 276 294 homeConfigurations = { 277 295 # Usage
+75
hosts/live-cd/base.nix
··· 1 + { pkgs, nixpkgs, lib, config, ... }: 2 + 3 + { 4 + import = [ 5 + ../../shared/nix.nix 6 + ../../shared/gnupg.nix 7 + ../../shared/locale.nix 8 + ../../shared/networking.nix 9 + ../../shared/systemd.nix 10 + ../../shared/shells/bash.nix 11 + ../../shared/shells/custom-prompts.nix 12 + ../../shared/1password.nix 13 + ../../shared/vscode/server.nix 14 + ../../shared/server/ssh.nix 15 + ../../shared/server/tailscale.nix 16 + "${nixpkgs}/nixos/modules/installer/iso-image.nix" 17 + "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix" 18 + "${nixpkgs}/nixos/modules/installer/cd-dvd/latest-kernel.nix" 19 + ]; 20 + isoImage.showConfiguration = lib.mkDefault false; 21 + isoImage.configurationName = lib.mkDefault "(Linux ${config.boot.kernelPackages.kernel.version})"; 22 + 23 + networking = { 24 + hostname = "multichaos-livecd"; 25 + networkmanager.enable = true; 26 + }; 27 + 28 + # Enable sshd by default here 29 + systemd.services.sshd.wantedBy = pkgs.lib.mkForce [ "multi-user.target" ]; 30 + 31 + # Some of them are from different shared configs, but tweaked for general use 32 + # in the Live CD setup. 33 + environment.defaultPackages = with pkgs; [ 34 + # nix utils 35 + direnv 36 + cachix 37 + devbox 38 + nixfmt-rfc-style 39 + nil 40 + nixd 41 + 42 + # git tools 43 + gitFull 44 + gh 45 + glab 46 + fjo 47 + 48 + # other utils 49 + wakatime-cli 50 + doppler 51 + dotenvx 52 + 53 + # system utils 54 + neofetch 55 + fastfetch 56 + ]; 57 + 58 + config = { 59 + users.users.nixos = { 60 + openssh = { 61 + authorizedKeys.keys = with import ../../shared/ssh-keys.nix; [ 62 + personal.y2022 63 + personal.passwordless 64 + personal.rp.gildedguy 65 + work.recaptime-dev.crew 66 + ]; 67 + }; 68 + }; 69 + }; 70 + 71 + services.tailscale.extraDaemonFlags = [ 72 + "--verbose=3" 73 + "--state=mem:" 74 + ]; 75 + }
+21
hosts/live-cd/kde-plasma.nix
··· 1 + { config, pkgs, lib, nixpkgs, ... }: 2 + 3 + { 4 + imports = [ 5 + "${nixpkgs}/nixos/modules/installer/iso-image.nix" 6 + ./base.nix 7 + ../../shared/desktop/fonts.nix 8 + ]; 9 + isoImage.edition = "graphical"; 10 + isoImage.showConfiguration = lib.mkDefault false; 11 + 12 + specializsations.plasma.configurations = { 13 + imports = [ 14 + "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma6.nix" 15 + ../../shared/desktop/kde-plasma.nix 16 + ../../shared/vscode/main.nix 17 + ]; 18 + isoImage.showConfiguration = true; 19 + isoImage.configurationName = "Plasma (Linux ${config.boot.kernelPackages.kernel.version})"; 20 + }; 21 + }
+1 -1
shared/server/tailscale.nix
··· 11 11 openFirewall = true; 12 12 disableTaildrop = false; 13 13 extraDaemonFlags = [ 14 - "--verbose 3" 14 + "--verbose=3" 15 15 ]; 16 16 }; 17 17