Table of Contents
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Using a specific checkout of nixpkgs makes it easy to debug as you know exactly what the deps are. | |
| # This being said in production you should pass the global nixpkgs to this file. | |
| let nixpkgs-src = builtins.fetchTarball { | |
| url = "https://github.com/NixOS/nixpkgs/archive/56d94c8c69f8cac518027d191e2f8de678b56088.tar.gz"; | |
| sha256 = "1c812ssgmnmh97sarmp8jcykk0g57m8rsbfjg9ql9996ig6crsmi"; | |
| }; | |
| in | |
| { pkgs ? (import nixpkgs-src {}) }: | |
| with pkgs; | |
| with stdenv.lib; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module RedBlackTree | |
| ( | |
| Tree, | |
| empty, | |
| member, | |
| insert) | |
| where | |
| data Color = R | B deriving Show |
I think Gabriel's blogpost http://www.haskellforall.com/2018/08/nixos-in-production.html he explains how to work around nixos-rebuild's inflexibilities. However, I think everything that is being suggested is actually possible in nixos-rebuild already
They blog is still a good exercise to understanding what nixos-rebuild does behind the scenes though.
Deploy to a target machine, from a build machine, with pinned nixpkgs, and a specific nixos config:
nixos-rebuild switch \
--build-host=build@build.service.consul \
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ### [ Lexical part ] ######################################################## | |
| _ascii_letter_upper | |
| : 'A' - 'Z' | |
| ; | |
| _ascii_letter_lower | |
| : 'a' - 'z' | |
| ; |
keybase pgp pull <keybase.io user>
gpg --edit-key <keybase.io user>
> lsign
> save
git-crypt add-gpg-user <keybase.io user>| title | The Fools Who Dream |
|---|---|
| subtitle | (Computer Science Edition) |
| author | Justin Hurwitz (Lyrics Justin Le) |
[Charles Babbage]
His difference engine / did multiplication
And sometimes addition by three
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE DataKinds #-} | |
| {-# LANGUAGE EmptyCase #-} | |
| {-# LANGUAGE GADTs #-} | |
| {-# LANGUAGE KindSignatures #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| {-# LANGUAGE PolyKinds #-} | |
| {-# LANGUAGE RankNTypes #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} |