Skip to content

Instantly share code, notes, and snippets.

View patrl's full-sized avatar

Patrick Elliott patrl

View GitHub Profile
@schar
schar / Heim.hs
Last active April 9, 2018 11:03
Heim (1983) monadically
import Control.Applicative
import Control.Monad
import Data.List
data Atom = P | Q | R | Top
deriving (Show, Eq, Enum)
type W = [Atom]
type C = [W]
type Upd m = m C -> m C
@peti
peti / README.md
Last active January 29, 2024 00:21
Make NixOS provide version-specific LOCALE_ARCHIVE environment variables

This NixOS code ensures that the system provide version-specific $LOCALE_ARCHIVE environment variables to mitigate the effects of NixOS/nixpkgs#38991.

To deploy it, copy the file into your /etc/nixos folder using a file name like multi-glibc-locale-paths.nix. Then edit your configuration.nix file to contain the attribute:

imports = [ ./multi-glibc-locale-paths.nix ];
@dysinger
dysinger / nixos-encrypted-zfs.sh
Last active March 7, 2023 14:51
How I installed Encrypted ZFS root on NixOS
# MOVED HERE https://gist.github.com/dysinger/2a768db5b6e3b729ec898d7d4208add3
@masaeedu
masaeedu / init-haskell.sh
Last active May 20, 2021 15:24
Basic nix haskell setup
#!/usr/bin/env bash
set -Eeuxo pipefail
# Set up git
git init
gitignore haskell
echo '*.cabal' >> .gitignore
# Set up niv
niv init
@dysinger
dysinger / configuration.nix
Last active December 28, 2022 18:39
Basic Full-Disk Encrypted ZFS Thinkpad (w/ 512 sector SSD) booted from USB key
# Basic Full-Disk Encrypted ZFS Thinkpad (w/ 512 sector SSD) booted from USB key
# EFI/BOOT:
# export BOOT=/dev/disk/by-id/usb-SanDisk_Ultra_Fit_4C530001011030101042-0\:0
# parted --script $BOOT -- \
# mklabel gpt \
# mkpart esp fat32 1MiB 512MiB \
# mkpart primary 512MiB 100% \
# set 1 boot on
# mkfs.vfat -n BOOT $BOOT-part1
@kborling
kborling / init.el
Last active November 16, 2023 18:07
My emacs config
;;; init.el --- My personal emacs config -*- lexical-binding: t; -*-
;; Author: Kevin Borling <https://github.com/kborling>
;; Version: 1.1.0
;; Keywords: configuration
;; URL: https://gist.github.com/kborling/13f2300e60ae4878d5d96f5f4d041664
;; Homepage: https://gist.github.com/kborling/13f2300e60ae4878d5d96f5f4d041664
;; Package-Requires: ((emacs "28.1"))
;;; Commentary: