- Put
ci.yaml
into.github/workflows/
- Follow https://github.com/cachix/cachix-action#usage to setup Cachix and benefit from quick CI build times.
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 LinearTypes #-} | |
{-# LANGUAGE LambdaCase #-} | |
{-# LANGUAGE BlockArguments #-} | |
{-# LANGUAGE NoImplicitPrelude #-} | |
{-# LANGUAGE QualifiedDo #-} | |
import Prelude.Linear hiding (partition) | |
import qualified Control.Functor.Linear as Linear | |
import Control.Functor.Linear (State, state, execState, pure) | |
import qualified Data.Array.Mutable.Linear as Array |
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
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
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
{ stdenv, fetchFromGitHub, fetchzip }: | |
stdenv.mkDerivation rec { | |
pname = "it930x-firmware"; | |
version = "1"; | |
src = fetchFromGitHub { | |
owner = "nns779"; | |
repo = "px4_drv"; | |
rev = "90e0a4b30b812e7e5fff4483144f165de8914157"; |
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
{ pkgs, lib, ... }: | |
with lib; | |
{ | |
config = { | |
i18n.defaultLocale = "de_DE.UTF-8"; | |
time.timeZone = "Europe/Paris"; | |
services = { |
The following are appendices from Optics By Example, a comprehensive guide to optics from beginner to advanced! If you like the content below, there's plenty more where that came from; pick up the book!
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 DataKinds #-} | |
-- | My database API. | |
module DBAPI where | |
import Data.Defaults | |
data ConnSpec p = ConnSpec | |
{ username :: !(Required p String) |
This is one way of managing your user profile declaratively.
Alternatives include:
- an attrset-based
nix-env
-based environment, installed usingnix-env -ir
rather thannix-env --set
. LnL has an overlay which shows a way of doing this. - home-manager, which provides NixOS-like config for your
$HOME
Note that this is incompatible with regular imperative use of nix-env
, e.g. nix-env -iA nixpkgs.hello
. It has the advantage of allowing the installation of multiple outputs of the same package much better than nix-env
's builtin profile builder does.
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 GADTs #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE OverloadedLabels #-} |
NewerOlder