Coder Social home page Coder Social logo

nixos-config's Introduction

Suggestions when you want to build NixOS livecd ISO image on non-Nixos Linux distribuction, e.g. Arch Linux, using Nix Flake

  1. Enable experimental-features.
mkdir -p ~/.config/nix
echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf

And restart nix-daemon.service using sudo systemctl restart nix-daemon.

Flakes

  1. nix-env --install might be required.

Nix | Arch

  1. To manually gc:
nix-env --delete-generations 1d
nix-store --gc
nix-collect-garbage -d
  1. To apply new flake:
nixos-rebuild switch --flake .#blacksteel
nixos-rebuild switch --flake .#invar
  1. To generate hardware configuration (then delete them and use them in your own input):
nixos-generate-config --root /mnt

Error handling for building nixos using nix flake

Nix flakes /nix/store/***-source no such file or directory

  1. Make sure you are using bash.

Unfortunatly nix assumes that the NIX_BUILD_SHELL is a bash variant and passes bash specific arguments to the shell.

zsh in nix-shell

  1. Make sure you did git add flake.nix if you newly cloned a git repo or similar.

Custom live media with Nix flakes

Segmentation fault when building ISO image with nixFlakes

GC_DONT_GC=1 nix build ...

Nix | Issue #4246

Error: experimental Nix feature ‘auto-allocate-uids’ is disabled, use '--extra-experimental-features auto-allocate-uids' when using nixos-install --flake .#example to install NixOS from an ISO iamge

The correct command should be: e.g.

nixos-install --impure --root /mnt --flake .#blacksteel --option extra-experimental-features auto-allocate-uids --option extra-experimental-features cgroups

nixos-config's People

Contributors

yuzukicat avatar

Stargazers

DianQK avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.