# First time user - where should I create my nix.conf?

**URL:** https://discourse.nixos.org/t/first-time-user-where-should-i-create-my-nix-conf/39655
**Category:** Help
**Created:** [February 11, 2024, 10:53pm UTC](https://discourse.nixos.org/t/first-time-user-where-should-i-create-my-nix-conf/39655 "2024-02-11T22:53:04Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![crantok](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/c/b5ac83/32.png) [@crantok](https://discourse.nixos.org/u/crantok)
#### Post date: [February 11, 2024, 10:53pm UTC](https://discourse.nixos.org/t/first-time-user-where-should-i-create-my-nix-conf/39655/1 "2024-02-11T22:53:04Z")

</div>

Hello.

I installed single-user nix (because I don’t have systemd) on MX Linux using the command given at [Download Nix / NixOS | Nix & NixOS](https://nixos.org/download.html)

I started following the quick start at [2. Run a program with Nix](https://zero-to-nix.com/start/nix-run) . (I uninstalled nix created by the Determinate Systems installer because the non-systemd version requires every nix command to be executed with sudo.)

To execute the commands in that quick start I have had to use the option `--extra-experimental-features "nix-command flakes"`

I would like to stop doing that. A web search tells me that I can add something to `nix.conf` in order to permanently allow the use of those features. I don’t have a `nix.conf` on my system.

I see `/etc/nix/nix.conf` mentioned a lot but I don’t have an `/etc/nix` directory. These are all the directories I have that are called `nix`:

```auto
$ find / -type d -name nix
/nix
/nix/var/nix
/nix/var/log/nix
/nix/store/iwgkck1d64s5f26ngln540hpf06g28py-nix-2.20.1/libexec/nix
/nix/store/2mkwqw9wzydn8xqsb2rrfj7ar8myqx9b-nixpkgs/nixpkgs/pkgs/development/tools/yarn2nix-moretea/yarn2nix/nix
/nix/store/2mkwqw9wzydn8xqsb2rrfj7ar8myqx9b-nixpkgs/nixpkgs/pkgs/stdenv/nix
/nix/store/2mkwqw9wzydn8xqsb2rrfj7ar8myqx9b-nixpkgs/nixpkgs/pkgs/tools/package-management/nix
/nix/store/2mkwqw9wzydn8xqsb2rrfj7ar8myqx9b-nixpkgs/nixpkgs/pkgs/tools/typesetting/tex/nix
/nix/store/2mkwqw9wzydn8xqsb2rrfj7ar8myqx9b-nixpkgs/nixpkgs/pkgs/tools/nix
/home/crantok/.local/state/nix
/home/crantok/.cache/nix

```

Please would you tell me where I should create the `nix.conf` file?

---

<div class="post-metadata">

### Author: ![ElvishJerricco](https://discourse.nixos.org/user_avatar/discourse.nixos.org/elvishjerricco/32/984_2.png) [@ElvishJerricco](https://discourse.nixos.org/u/ElvishJerricco)
#### Post date: [February 12, 2024, 12:16am UTC](https://discourse.nixos.org/t/first-time-user-where-should-i-create-my-nix-conf/39655/2 "2024-02-12T00:16:34Z")

</div>

> [@crantok](#):
>
> I see `/etc/nix/nix.conf` mentioned a lot but I don’t have an `/etc/nix` directory.

I mean, you can just create that directory. Or you can create `~/.config/nix/` and put `nix.conf` in there.

---

<div class="post-metadata">

### Author: ![fricklerhandwerk](https://discourse.nixos.org/user_avatar/discourse.nixos.org/fricklerhandwerk/32/2029_2.png) [@fricklerhandwerk](https://discourse.nixos.org/u/fricklerhandwerk)
#### Post date: [February 12, 2024, 6:40am UTC](https://discourse.nixos.org/t/first-time-user-where-should-i-create-my-nix-conf/39655/3 "2024-02-12T06:40:38Z")

</div>

@crantok having reworked a large part of it, I naturally recommend reading the Nix Reference Manual on all things Nix. It’s the closest you’ll get to the truth before the source code itself. As opposed to all other resources except `man nix`, getting it from [nix.dev](https://nix.dev/reference/nix-manual) additionally allows matching documentation to your installed version.

Here’s the section on nix.conf that would answer your question: [nix.conf - Nix Reference Manual](https://nix.dev/manual/nix/2.19/command-ref/conf-file)

The manual is not always complete or easy to read, and it will take time to fix everything, but that requires working with it to see what needs improvements. Feel free to open pull requests or report problems.

---

<div class="post-metadata">

### Author: ![crantok](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/c/b5ac83/32.png) [@crantok](https://discourse.nixos.org/u/crantok)
#### Post date: [February 12, 2024, 3:52pm UTC](https://discourse.nixos.org/t/first-time-user-where-should-i-create-my-nix-conf/39655/4 "2024-02-12T15:52:00Z")

</div>

Thanks both.

In future I’ll assume the manual is correct and then ask if I run into trouble.

As a new user doing web searches, I had the sense that Nix is a moving target and didn’t want to make any assumptions about what information was up to date.
