{"id":13688015,"url":"https://github.com/srid/nixos-config","last_synced_at":"2025-05-15T22:12:09.133Z","repository":{"id":39758130,"uuid":"355283608","full_name":"srid/nixos-config","owner":"srid","description":"KISS NixOS configuration based on Flakes \u0026 flake-parts (supports macOS too)","archived":false,"fork":false,"pushed_at":"2025-05-13T07:41:22.000Z","size":1174,"stargazers_count":517,"open_issues_count":2,"forks_count":24,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-13T08:42:07.499Z","etag":null,"topics":["nix","nixos","nixos-configuration"],"latest_commit_sha":null,"homepage":"","language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/srid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-04-06T17:58:58.000Z","updated_at":"2025-05-13T07:41:25.000Z","dependencies_parsed_at":"2023-02-19T08:46:11.660Z","dependency_job_id":"bc4cee78-57a3-4c27-8e9e-31ba09f2cbad","html_url":"https://github.com/srid/nixos-config","commit_stats":{"total_commits":1260,"total_committers":3,"mean_commits":420.0,"dds":0.04761904761904767,"last_synced_commit":"fe9c16cc6a60bbc17646c15c8ce3c5380239ab92"},"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srid%2Fnixos-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srid%2Fnixos-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srid%2Fnixos-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srid%2Fnixos-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srid","download_url":"https://codeload.github.com/srid/nixos-config/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254430335,"owners_count":22069909,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nix","nixos","nixos-configuration"],"created_at":"2024-08-02T15:01:05.034Z","updated_at":"2025-05-15T22:12:04.116Z","avatar_url":"https://github.com/srid.png","language":"Nix","funding_links":[],"categories":["Nix","Personal Dotfiles \u0026 Infra repo's using flake-parts"],"sub_categories":["Community Modules"],"readme":"[![AGPL](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://en.wikipedia.org/wiki/Affero_General_Public_License)\n[![project chat](https://img.shields.io/badge/zulip-join_chat-brightgreen.svg)](https://nixos.zulipchat.com/#narrow/stream/413948-nixos)\n[![Naiveté Compass of Mood](https://img.shields.io/badge/naïve-FF10F0)](https://compass.naivete.me/ \"This project follows the 'Naiveté Compass of Mood'\")\n\nThis repository contains the Nix / NixOS configuration for all of my systems. See [nixos-unified](https://nixos-unified.org)—specifically [nixos-unified-template](https://github.com/juspay/nixos-unified-template)—if you wish to create your own configuration from scratch.\n\n## Setup\n\nTo use this repository as base configuration for your new machine running:\n\n### NixOS Linux\n\n\u003e [!TIP]\n\u003e For a general tutorial, see https://nixos.asia/en/nixos-install-flake\n\n- Install NixOS\n  - Hetzner dedicated from Linux Rescue system: https://github.com/numtide/nixos-anywhere (see [blog post](https://galowicz.de/2023/04/05/single-command-server-bootstrap/); example PR: https://github.com/srid/nixos-config/pull/35 where I had to configure networking manually)\n    - Copy from existing configuration (eg: ax41.nix)\n    - Make networking configuration changes.\n    - Run nixos-anywhere from a Linux system, targetting `root@\u003cip\u003e`\n    - Wait for reboot; `ssh srid@\u003cip\u003e`; profit!\n  - Digital Ocean\n    - Legacy/manual approach: [nixos-infect](https://github.com/elitak/nixos-infect)\n    - Modern/automate approach: Custom image + colerama; cf. [Zulip](https://nixos.zulipchat.com/#narrow/stream/413948-nixos/topic/Deploying.20to.20DigitalOcean) and [example](https://github.com/fpindia/fpindia-chat)\n  - X1 Carbon: https://srid.ca/x1c7-install\n  - Windows (via WSL): https://github.com/nix-community/NixOS-WSL\n- Clone this repo anywhere\n- Rename `./configurations/nixos/??.nix` to match your current system hostname\n- Edit `config.nix` to set your primary user information\n- Run `nix run`. That's it. Re-open your terminal.\n\n### macOS\n\n- [Install Nix](https://nixos.asia/en/install)\n- Clone this repo anywhere\n- Rename `./configurations/darwin/??.nix` to match your current system hostname\n- Edit `config.nix` to set your primary user information\n- Run `nix run`.[^cleanup] That's it. Re-open your terminal.\n\n[^cleanup]: You might have to `rm -rf /etc/nix/nix.conf`, so our flake.nix can do its thing.\n\n## Architecture\n\nStart from `flake.nix` (see [Flakes](https://nixos.wiki/wiki/Flakes)). [`flake-parts`](https://flake.parts/) is used as the module system.\n\n### Directory layout\n\n\u003e[!TIP]\n\u003e See `flake-module.nix` for autowiring of flake outputs based on this directory structure.\n\n| Path | Corresponding flake output |\n| -- | -- |\n| `./configurations/{nixos,darwin,home}/foo.nix` |  `{nixos,darwin,home}Configurations.foo` |\n| `./mdules/{nixos,darwin,home,flake-parts}/foo.nix` | `{nixos,darwin,home,flake}Modules.foo` |\n| `./overlays/foo.nix` | `overlays.foo` |\n| `./packages` | N/A (Nix packages) |\n| `./secrets` | N/A (agenix data) |\n\n## Tips\n\n- To update NixOS (and other inputs) run `nix flake update`\n  - You may also update a subset of inputs, e.g.\n    ```sh\n    nix flake lock --update-input nixpkgs --update-input darwin --update-input home-manager\n    # Or, `nix run .#update`\n    ```\n- To free up disk space,\n  ```sh-session\n  sudo nix-env -p /nix/var/nix/profiles/system --delete-generations +2\n  sudo nixos-rebuild boot\n  ```\n- To autoformat the project tree using nixpkgs-fmt, run `nix fmt`.\n- To build all flake outputs (locally or in CI), run `nix --accept-flake-config run github:juspay/omnix ci build`\n- For secrets management, I use [agenix](https://github.com/ryantm/agenix), because it works with SSH keys, and functions well on macOS and NixOS.\n\n## Discussion\n\nIf you wish to discuss about this config, [join the Zulip](https://nixos.zulipchat.com/login/?next=/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrid%2Fnixos-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrid%2Fnixos-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrid%2Fnixos-config/lists"}