Skip to content

Instantly share code, notes, and snippets.

View dysinger's full-sized avatar
🏠
Working from home

Dysinger dysinger

🏠
Working from home
  • Independent
  • Nearby
View GitHub Profile
let
privateZeroTierInterfaces = [ "ztbso1b6n3" ]; # ZT NET INTERFACE
in {
system.stateVersion = "19.03";
services.openssh.enable = true;
services.openssh.openFirewall = false; # SSH ONLY ON VPN
services.openssh.passwordAuthentication = false;
networking.firewall.enable = true;
@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
@dysinger
dysinger / postmortem.org
Created January 18, 2023 17:20
Postmortem Template

Postmortem

Post Mortem of Outage on <DATE>

  • Post-Mortem Owner: <Firstname Lastname> <Email>
  • Meeting Scheduled For: <DATE>
  • Call Recording: <LINK>
  • Outage Notes: <LINK>
@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
{
# ... #
# https://nixos.org/manual/nixos/unstable/options.html#opt-services.avahi.enable
services.avahi.enable = lib.mkForce false; # USE SYSTEMD-RESOLVED
services.resolved = {
# https://nixos.org/manual/nixos/unstable/options.html#opt-services.resolved.enable
enable = true;
@dysinger
dysinger / simple-nginx-webdav.sh
Created January 5, 2010 20:32
A simple nginx/webdav setup for use with things like mobile-org
#!/bin/sh
# on ubuntu: need some utils & dev libs
sudo apt-get install apache2-utils openssl libssl-dev libpcre3-dev
# compile nginx
cd /tmp
curl http://nginx.org/download/nginx-0.7.64.tar.gz | tar xz
cd nginx*
./configure --with-http_ssl_module --with-http_dav_module \
@dysinger
dysinger / README.lhs
Last active February 9, 2022 18:07
Single-file executable literate Haskell with Stack
#!/usr/bin/env stack
> -- stack --resolver lts-6 --install-ghc runghc --package classy-prelude --package lens --package wreq
Blah Blah words about this single file executable README goes here.
> {-# LANGUAGE DeriveAnyClass #-}
> {-# LANGUAGE DeriveGeneric #-}
> {-# LANGUAGE NoImplicitPrelude #-}
> {-# LANGUAGE OverloadedStrings #-}
@dysinger
dysinger / notes.txt
Created October 8, 2021 23:21
My /etc/nixos/configuration.nix with full disk encrypted ZFS and USB thumb EXT4 /boot
# 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 $BOOT-part1
# ZFS:
@dysinger
dysinger / packages.el
Last active January 16, 2021 19:30
Private spacemacs layer to try out Chris Done's Intero mode for haskell
;; 1. place this in ~/.emacs.d/private/intero/packages.el
;; 2. add intero, syntax-checking and auto-completion to your
;; ~/.spacemacs layer configuration & remove the haskell layer
;; if you were using that before
;; 3. make sure you have stack installed http://haskellstack.org
;; 4. fire up emacs & open up a stack project's source files
{ config, pkgs, ... }:
{
require = [ <nixos/modules/installer/scan/not-detected.nix> ];
boot = {
initrd = {
kernelModules = [ "ata_piix" "ahci" ];
luks.devices = [{ name = "luks"; device = "/dev/sda2"; preLVM = true; }];
};
loader.grub.device = "/dev/sda";
};