Comments (8)
Hi, curious if you had Nix installed previously or used the Determinate Systems Installer. The Determinate Systems Installer enables flakes and nix commands by default.
Nix experimental commands are enabled a few different ways:
- In your
/etc/nix/nix.conf
file. Mine has this line (from the Determinate Systems installer):
experimental-features = nix-command flakes
- At the command line, as you have done.
nix --extra-experimental-features 'nix-command flakes' run .#apply
I used to include the extra long command as part of the README steps, but after moving to the Determinate Systems installer, I dropped it as I felt the verbosity was a little confusing for newcomers.
But curious how you installed Nix, as I may add it back.
from nixos-config.
FWIW, when I installed using using the Determinate Systems shell-based installer a few days ago, I didn't run into that problem for nix run .#apply
, but I did later on at step 9 when running nix run .#build
because I had deleted /etc/nix/nix.conf
as instructed in step 9. I also overcame this by manually adding the --extra-experimental-features 'nix-command flakes'
option to the command
from nixos-config.
Actually I just noticed all of this behavior is well-described in the Nix Flakes wiki. So maybe just add an obvious link to that in the README?
from nixos-config.
I think I used the macOS recommended way:
sh <(curl -L https://nixos.org/nix/install)
Adding
experimental-features = nix-command flakes
to nix.conf resolves it. It would be helpful to mention it in the readme. I guess the problem resurfaces once you rename the config.
from nixos-config.
Hey @TheKashe and @jspiers, thanks a ton. I've made a few changes to the README based on your report.
-
Added a section to help users enable Nix experimental commands that either had Nix installed or don't use the Determinate Systems installer
-
Removed the step to move
nix.conf
out of the way based on this issue (looks like it's fixed now).
from nixos-config.
I'm having this issue as well (M3)
$ nixos-config % nix run .#build-switch
Running build-switch for aarch64-darwin
Starting build...
Switching to new generation...
building the system configuration...
error: Unexpected files in /etc, aborting activation
The following files have unrecognized content and would be overwritten:
/etc/nix/nix.conf
/etc/bashrc
Please check there is nothing critical in these files, rename them by adding .before-nix-darwin to the end, and then try again.
Should we move nix.conf
or something else?
Great project, BTW, Dustin, thanks!!
from nixos-config.
Hi @pfeodrippe,
Yes I will add a note to the README. This comes from nix-darwin and helps prevent files you have existing from being overwritten by the Nix config, without your consent.
You basically need to backup those files somewhere and remove them from their existing location . The nix config will replace them with copies from the configuration.
Note, my Nix config uses zsh
. So if you need to movebash
configuration over, you may want to switch the configuration to enable bash
. This is done in the shared home-manager file.
from nixos-config.
Hi @pfeodrippe,
Yes I will add a note to the README. This comes from nix-darwin and helps prevent files you have existing from being overwritten by the Nix config, without your consent.
You basically need to backup those files somewhere and remove them from their existing location . The nix config will replace them with copies from the configuration.
Note, my Nix config uses
zsh
. So if you need to movebash
configuration over, you may want to switch the configuration to enablebash
. This is done in the shared home-manager file.
Thank you, man \o Appreciate it
from nixos-config.
Related Issues (20)
- Define user context in `flake.nix` and refactor install scripts
- MacOS M2 - install issue HOT 11
- Fix chmod command in README
- aarch64-darwin/create-keys: cannot execute: No such file or directory (MacBook Pro M3 Max chip) HOT 15
- Question [Help] HOT 11
- Issue with Adding Homebrew Tap HOT 5
- dustinlyons/nix-secrets.git dependency HOT 6
- NixOS install `./bin/apply: No such file or directory` HOT 8
- Installation issue on NixOS with xvda boot disk HOT 3
- Installed new NixOS install using this repo, no GUI on reboot HOT 13
- macOS - User does not own "system" or "default" profile HOT 8
- error: selector 'bash' matches no derivations HOT 21
- Purpose of mail and name? HOT 2
- Networking wireless device fails to start HOT 3
- How to upgrade everything installed (Mac OSX Sonoma)? HOT 6
- Add -b backup to `home-manager switch` HOT 2
- starter config appears to expect secrets repo HOT 3
- Couple of issues found with the latest instructions/code HOT 4
- Homebrew not found HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nixos-config.