NixOS

how are channela built?

https://howoldis.herokuapp.com

Terminology

nixos-rebuild

Disabling Modules

Use disabledModules to prevent nix from importing an module imported from nixpkgs

{ config, lib, pkgs, ... }:
with lib;
{
  disabledModules = [ "security/duosec.nix" ];
  imports = [ ./duosec-patched-module.nix ];
}

nix-shell

Installing project dependancies

When nix-shell is invoked it looks for default.nix and shell.nix and evaluates the contents. This is useful for locally installing project dependancies.

with (import <nixpkgs> {});
stdenv.mkDerivation {
  name = "slides";
  buildInputs = [ tectonic ];
}

Converting string to bool

depressing amount of ${if x then "true" else "false"} in nixpkgs :(

``` nix-repl> builtins.toString true -> “1” nix-repl> builtins.toString false -> “” ``