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
@dysinger
dysinger / flake.nix
Created June 11, 2025 16:58
Sonic w/ SuperCollider on relatime kernel on NixOS
{
description = "NixOS configuration with real-time kernel, Sonic Pi, and SuperCollider";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
musnix.url = "github:musnix/musnix";
};
outputs = { self, nixpkgs, musnix, ... }@inputs: {
nixosConfigurations.example-config = nixpkgs.lib.nixosSystem {
@dysinger
dysinger / aws-cfn-coreos-kubernetes.json
Last active December 6, 2024 10:55
CoreOS Kubernetes on AWS CloudFormation
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "CoreOS on EC2: http://coreos.com/docs/running-coreos/cloud-providers/ec2/",
"Mappings": {
"RegionMap": {
"ap-northeast-1": {
"AMI": "ami-f9b08ff8"
},
"ap-southeast-1": {
"AMI": "ami-c24f6c90"
@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:
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 #-}