News for hackers. Stuff that matters.
Re:Nix and NixOS, my pain points by Reventlov on Sunday December 25, 2022 @07:07AM (#34126536)
Because instead of distributing two files (channels.scm and manifest.scm, or flake.lock and flake.nix), you have to execute monstruosities like `guix shell --container -m ./manifest.scm -- bash -c 'GUIX_LOCPATH=$GUIX_ENVIRONMENT/lib/locale LC_ALL=fr_FR.utf-8 exec jekyll build'`, which is how I build some websites I have.

To me, that's not ok from an user experience point of view.

Re:Nix and NixOS, my pain points by sierkov on Sunday December 25, 2022 @08:58AM (#34127268)
Exactly my point. You can already do it with direnv, have guix shell once you cd into dir and then just do `jekyll build`.
Re:Nix and NixOS, my pain points by mananaysiempre on Sunday December 25, 2022 @11:00AM (#34128293)
Does

  nix develop -c jekyll build
not do the job for you? (For a single development command—for deploy 'nix build' should be set up to do the right thing, including setting LC_ALL if necessary; and to enter a dev shell just 'nix develop' should work. Nixpkgs installs glibc with a full complement of locales by default, which has its downsides size-wise but should prevent any troubles when setting LC_ALL=fr_FR.)

Or, for an automatic setup,

  cat > .envrc
  use flake
  ^D
or, for an automatic setup with caching[1],

  cat > .envrc
  if ! has nix_direnv_version || ! nix_direnv_version 2.2.0; then
    source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.0/direnvrc" "sha256-5EwyKnkJNQeXrRkYbwwRBcXbibosCJqyIUuz9Xq+LRc="
  fi
  use flake
  ^D
(I don't have nix-direnv installed systemwide because it ignores the --no-write-lock-file flag I need to pass sometimes. If you put some of your config in default.nix or shell.nix or whatever, you’ll need to watch_file resp. nix_direnv_watch_file those.)

[1] https://github.com/nix-community/nix-direnv#direnv-source_ur...

Re:Nix and NixOS, my pain points by Reventlov on Sunday December 25, 2022 @11:08AM (#34128346)
Oh, in Nix, this works flawlessly, I was talking about Guix in the comment !
Re:Nix and NixOS, my pain points by rekado on Sunday December 25, 2022 @06:20PM (#34132589)
Use `setenv` inside the manifest.

    (setenv "MAMA" "MIA")
    (specifications->manifest (list "hello"))