# Where do people keep their \`configuration.nix\`

**URL:** https://discourse.nixos.org/t/where-do-people-keep-their-configuration-nix/11044
**Category:** Help
**Created:** [January 18, 2021, 1:49pm UTC](https://discourse.nixos.org/t/where-do-people-keep-their-configuration-nix/11044 "2021-01-18T13:49:22Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![jtojnar](https://discourse.nixos.org/user_avatar/discourse.nixos.org/jtojnar/32/70_2.png) [@jtojnar](https://discourse.nixos.org/u/jtojnar)
#### Post date: [January 18, 2021, 5:16pm UTC](https://discourse.nixos.org/t/where-do-people-keep-their-configuration-nix/11044/4 "2021-01-18T17:16:08Z")

</div>

I cloned my [config repo](https://github.com/jtojnar/nixfiles) into Projects directory in my home directory and have been running `nixos-rebuild switch -I nixpkgs=$HOME/Projects/nixpkgs -I nixos-config=$HOME/Projects/nixfiles/hosts/$(hostname)/configuration.nix`.¹

I do not even have `/etc/nixos` on my computer, and the nixfiles directory is completely anonymous – I can move it anywhere and, since I actually use relative paths in the rebuild command, I will not even have to change anything.

Some other tools like `nixos-option` might require `nixos-config` on `$NIX_PATH` as well, but I do not use them. I could always just alias `nixos-option` to `env NIX_PATH=nixos-config=$PWD/... nixos-option` and run it in my anonymous repo if I wanted to.

* * *

1. Actually, these days I use a simple [script](https://github.com/jtojnar/nixfiles/blob/f0cd41f75f75e504711040ba6e5ea49f17085f7c/pkgs/utils/deploy#L38) but it still does basically the same thing.

---

_[View the full topic](https://discourse.nixos.org/t/where-do-people-keep-their-configuration-nix/11044)._
