{"id":16183515,"url":"https://github.com/juspay/nixos-unified-template","last_synced_at":"2025-06-22T16:41:21.908Z","repository":{"id":152872860,"uuid":"622224043","full_name":"juspay/nixos-unified-template","owner":"juspay","description":"A multi-platform Nix configuration template optimized as development environment, based on nixos-unified. ","archived":false,"fork":false,"pushed_at":"2025-06-22T00:13:16.000Z","size":285,"stargazers_count":280,"open_issues_count":10,"forks_count":57,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-06-22T01:24:12.219Z","etag":null,"topics":["home-manager","home-manager-config","nix"],"latest_commit_sha":null,"homepage":"","language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/juspay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-04-01T13:43:05.000Z","updated_at":"2025-06-19T16:21:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"ae5a932a-b6e6-4103-89b3-34e25c9ebf6e","html_url":"https://github.com/juspay/nixos-unified-template","commit_stats":null,"previous_names":["juspay/nixos-unified-template","juspay/nix-dev-home"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/juspay/nixos-unified-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juspay%2Fnixos-unified-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juspay%2Fnixos-unified-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juspay%2Fnixos-unified-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juspay%2Fnixos-unified-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juspay","download_url":"https://codeload.github.com/juspay/nixos-unified-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juspay%2Fnixos-unified-template/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261328219,"owners_count":23142446,"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":["home-manager","home-manager-config","nix"],"created_at":"2024-10-10T07:01:34.131Z","updated_at":"2025-06-22T16:41:16.874Z","avatar_url":"https://github.com/juspay.png","language":"Nix","funding_links":[],"categories":["Nix","Nix Configurations"],"sub_categories":[],"readme":"[![project chat](https://img.shields.io/badge/zulip-join_chat-brightgreen.svg)](https://nixos.zulipchat.com/#narrow/stream/413950-nix)\n\n# nixos-unified-template\n\nThis repository provides a ready-made Nix configuration to manage either your Home environment or whole NixOS systems. It is optimized specifically for development environment (with direnv, neovim with LSP[^neovim], etc.).\n\nUnder the hood, it uses [nixos-unified]. See [`./modules`](modules/) to see what's available. We support [home-manager] (see `./modules/home`), [nix-darwin] (see `./modules/darwin`) and [NixOS] (see `./modules/nixos`).\n\n| Platform    | Supported By                              |\n|-------------|-------------------------------------------|\n| macOS only       | ✅ [home-manager] and/or ✅ [nix-darwin]   |\n| NixOS only       | ✅ [home-manager] and ✅ [NixOS]  |\n| All platforms    | ✅ [home-manager] only                       |\n\n[^neovim]: Wanna try before you buy?\n    ```\n    git clone https://github.com/srid/rust-nix-template\n    cd rust-nix-template\n    nix develop\n    nix run github:juspay/nixos-unified-template#neovim\n    # Type `SPC f f` to open a .rs file\n    # Wait for rust-analyzer to finish; go to a symbol and type K\n    ```\n\n    Expect to see:\n\n    \u003cimg width=\"534\" alt=\"image\" src=\"https://github.com/user-attachments/assets/204e6ad7-c233-4503-9924-73fbce2772d6\"\u003e\n\n\n[nix-darwin]: https://github.com/LnL7/nix-darwin\n[home-manager]: https://github.com/nix-community/home-manager\n[NixOS]: https://nixos.asia/en/nixos-tutorial\n[nixos-unified]: https://nixos-unified.org\n\n## Getting Started\n\n### On NixOS\n\nIf you use, or intend to use, [NixOS]:\n\n1. Install NixOS from [Graphical ISO image](https://nixos.org/download/#download-nixos) and reboot.\n1. Ensure that `/etc/nixos/{configuration.nix, hardware-configuration.nix}` are in place.\n1. In a terminal, become `root` and initialize our template under `/etc/nixos`:\n    ```sh-session\n    sudo su -\n    cd /etc/nixos\n    nix --accept-flake-config --extra-experimental-features \"nix-command flakes\" \\\n      run github:juspay/omnix -- \\\n      init github:juspay/nixos-unified-template#nixos -o .\n    # Replace HOSTNAME with the hostname you entered above.\n    mv configuration.nix hardware-configuration.nix ./configurations/nixos/HOSTNAME/\n    nix --extra-experimental-features \"nix-command flakes\" run\n    ```\n1. At this point, you can move `/etc/nixos` to anywhere, and initialize a Git repository to track future changes.\n\n### On non-NixOS\n\nIf you are on macOS or running other Linux distros:\n\n1. [Install Nix](https://nixos.asia/en/install):\n    ```sh-session\n    curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \\\n      sh -s -- install --no-confirm --extra-conf \"trusted-users = $(id -un)\"\n    ```\n1. Open a new terminal; Initialize[^omnix] your Nix configuration using this repo as template:\n    ```sh-session\n    nix --accept-flake-config run github:juspay/omnix -- \\\n      init github:juspay/nixos-unified-template -o ~/nixconfig\n    cd ~/nixconfig\n    ```\n    \u003cimg width=\"1092\" alt=\"image\" src=\"https://github.com/user-attachments/assets/1341d200-d894-488c-ba74-42d8830cc6f7\"\u003e\n\n    - It will prompt to you choose between [home-manager] only configuration and [nix-darwin] configuration (ignore the [NixOS] template). The latter includes [home-manager] as well.\n    - Optionally, you may edit `./modules/{home,darwin}/*.nix` to your liking.\n1. Run `nix run` (or the appropriate command printed by the above command) to activate your configuration.\n    - Does this fail to run? See the [Troubleshooting](#troubleshooting) section below.\n1. Restart your terminal.\n\nAfter steps 1-4, you should expect to see the [starship](https://starship.rs/) prompt:\n\n\u003cimg width=\"236\" alt=\"image\" src=\"https://github.com/user-attachments/assets/bea3a7e5-b06a-483f-b76b-5c3865ce5e55\"\u003e\n\nWhenever you modify your configuration in `./modules/*/*.nix`, you should re-run `nix run` to activate the new configuration.\n\n[^omnix]: We use [omnix](https://omnix.page/om/init.html) to initialize this repository template.\n\n## Details\n\nThe configuration repo has `flake.nix` file in the current directory and some `./modules/{home,darwin,nixos}/*.nix` files containing the [home-manager], [nix-darwin] and [NixOS] configurations respectively that you can review. It also has a [justfile](https://github.com/casey/just), which provides a set of recipes analogous to Make targets to interact with the nix flake.\n\nRun `nix run` to activate this configuration in your system.\n\nTo browse the capabilities of [home-manager] (and to see what else can go in your `./modules/home/*.nix` -- such as shell aliases), consult [home-manager options reference](https://nix-community.github.io/home-manager/options.xhtml). You can also run `man home-configuration.nix` in the terminal.\n\nGlobal configuration is in the `./config.nix` file. Here, you can specify your user name, email and such settings.\n\n## What's included\n\nHere we describe just a handful of tools included in this template. See the [./modules](./modules) directory for more.\n\n### neovim\n\nNeovim configured using [nixvim](https://github.com/nix-community/nixvim) is included across all configurations. It is also exposed as a flake app, so you can launch it directly using `nix run github:juspay/nixos-unified-template#neovim`. See `neovim/nixvim.nix`.\n\n### starship\n\nPrettify your shell prompt with [starship](https://starship.rs/). It is configured to show the current git branch, the current directory, Nix devshell status and the exit code of the last command.\n\n### direnv\n\n[direnv](https://nixos.asia/en/direnv) as well as `nix-direnv` is fully configured and available to use in your shell, with tight starship (see above) prompt integration. See `direnv.nix`\n\n### git configuration\n\nYour `~/.config/git/config` is managed entirely in Nix. See `git.nix`.\n\n### comma\n\nType `, ` followed by the any binary name to run it directly from nixpkgs, using [comma](https://github.com/nix-community/comma).\n\n### Garbage collection\n\nNix garbage collection runs periodically to keep disk space manageable. See `gc.nix`\n\nBy default, [home-manager] is configured to run garbage collection automatically every week. If your projects use nix-direnv, you don't have to worry about having to download the dependencies again while in a remote area with limited internet access ([see prominent features of nix-direnv](https://github.com/nix-community/nix-direnv#nix-direnv)).\n\n## Troubleshooting\n\n### `error: opening lock file ...`\n\n**Problem**: When using home-manager, `nix run` shows an error like: `error: opening lock file '/nix/var/nix/profiles/per-user/utkarsh.pandey1/profile.lock': No such file or directory`\n\n**Solution**: This is an instance of https://github.com/nix-community/home-manager/issues/4611. Run `sudo mkdir /nix/var/nix/profiles/per-user/$(id -un)/ \u0026\u0026 sudo chown $(id -un) /nix/var/nix/profiles/per-user/$(id -un)` and try again.\n\n### `error: unable to download ... Problem with the SSL CA cert (path? access rights?)`\n\n**Problem**: On macOS, you may see this error: `error: unable to download ... Problem with the SSL CA cert (path? access rights?)`\n\n**Solution**: You may be able to resolve this by running:\n\n```sh\nsudo rm /etc/ssl/certs/ca-certificates.crt\nsudo ln -s /nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt /etc/ssl/certs/ca-certificates.crt\n```\n\nSee https://github.com/NixOS/nix/issues/2899#issuecomment-1669501326\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuspay%2Fnixos-unified-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuspay%2Fnixos-unified-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuspay%2Fnixos-unified-template/lists"}