Skip to content

Instantly share code, notes, and snippets.

@pvilas
Created July 25, 2024 06:34
Show Gist options
  • Save pvilas/1e451d7b16af3f105b0024151ecbab9d to your computer and use it in GitHub Desktop.
Save pvilas/1e451d7b16af3f105b0024151ecbab9d to your computer and use it in GitHub Desktop.
notes de nix

Instalació a OSX

curl -L https://nixos.org/nix/install | sh

Configurar entorn

Afeixir a .bashrc o .zshrc

. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh

source ~/.bashrc

Crear entorn de desenvolupament

Al directori on vulgem treballar, cram un `default.nix``

{ pkgs ? import <nixpkgs> {} }:

pkgs.mkShell {
  buildInputs = [
    pkgs.git
    pkgs.nodejs
    pkgs.python3
    pkgs.virtualenv
  ];

  shellHook = ''
    echo "Entorno de desarrollo listo!"
  '';
}

i després fer nix-shell... ja tenim python, node, etc a l'abast!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment