ES-Nix / get-nix

Is a unofficial wrapper of the nix installer.
MIT License
1 stars 0 forks source link

Adding general tips of how to troubleshoot the instalation of single user nix installer #1

Open PedroRegisPOAR opened 3 years ago

PedroRegisPOAR commented 3 years ago

TODO:

Checking environment variables

env
env | grep 'some_env_var name'
declare -px > env.sh
source env.sh

https://stackoverflow.com/a/39119103

The /tmp thing

The ~/tmp and/or /tmp:

security_model=mapped-xattr

Refs.:

## FIX for running out of space / tmp, which is used for building
fileSystems."/nix/.rw-store" = {
  fsType = "tmpfs";
  # options = [ "mode=0755" ];
  options = [ "mode=0755" "nosuid" "nodev" "relatime" "size=14G" ];
  neededForBoot = true;
};

From: https://githubmemory.com/repo/colemickens/nixcfg/issues/3

Remote builders

{ nix.trustedUsers = [ "@wheel" ]; } # or specific user
PedroRegisPOAR commented 3 years ago

Using the CLI

nix flake update --override-input nixpkgs nixpkgs/84aa23742f6c72501f9cc209f29c438766f5352d
nix \
flake \
update \
--override-input nixpkgs github:NixOS/nixpkgs/nixos-21.11
PedroRegisPOAR commented 3 years ago

TODO: take a look in that.

However, if nix has to build a derivation, it has to spin up a builder... And builders run in a user namespace with uids and gids mapped and significantly less permissions. That builder is what's spitting out that error. From: https://github.com/NixOS/nixpkgs/issues/67465#issuecomment-643886723

PedroRegisPOAR commented 2 years ago

TODO:

$ nix build github:nix-community/nix-installers/93907b1b4a34b4391bc3e776a410213669f64074#deb
$ ls -al result 
lrwxrwxrwx 1 pedro pedro 68 jul  6 13:04 result -> /nix/store/a6li3c1in0cia6a4nsmy4nnvh3b550hq-nix-multi-user-2.9.1.deb