Upgrade to Pro — share decks privately, control downloads, hide ads and more …

NixOS - Purely Functional Package Management

yawnt
June 01, 2016

NixOS - Purely Functional Package Management

yawnt

June 01, 2016
Tweet

More Decks by yawnt

Other Decks in Programming

Transcript

  1. { stdenv, fetchurl, perl }: stdenv.mkDerivation { name = "hello-2.1.1";

    builder = ./builder.sh; src = fetchurl { url = “${packageURL}; md5 = “${md5hash}; }; inherit perl; }
  2. $ nix-repl command not found: nix-repl $ nix-shell -p nix-repl

    [nix-shell:~]$ nix-repl -v nix-repl v1.1.2 [nix-shell:~]$ exit $ nix-repl command not found: nix-repl
  3. $ fdisk /dev/sda $ mkfs.ext4 -L nixos /dev/sda1 $ mkswap

    -L swap /dev/sda2 $ swapon /dev/sda2 $ mount /dev/disk/by-label/nixos /mnt $ nixos-generate-config --root /mnt $ nano /mnt/etc/nixos/configuration.nix $ nixos-install $ reboot
  4. { config, pkgs, ... }: { imports = [ ./hardware-configuration.nix

    ]; boot.loader.grub.device = "/dev/sda"; }