Skip to content

Instantly share code, notes, and snippets.

@vamega
vamega / cloudinit.yaml
Last active July 3, 2022 07:36 — forked from kradalby/cloudinit.yaml
Oracle Linux 8.5 to NixOS with ESP resizing
#cloud-config
# vim: syntax=yaml
# Derived from https://gist.github.com/kradalby/0957a5d4fbb9018d0b700b118f5c5341
disable_root: false
ssh_authorized_keys: []
write_files:
- path: "/etc/ssh/sshd_config.d/permit_root"
owner: "root:root"
permissions: "0644"
@vamega
vamega / nix-on-macos-catalina.md
Created August 26, 2021 05:08 — forked from chriselsner/nix-on-macos-catalina.md
Nix on macOS Catalina

Nix on macOS Catalina

I'm writing this gist for my own records but it might help someone else too.

Installing Nix

Support for Catalina has improved a lot since the update was first rolled out.

Note: See the NixOS manual for discussion of the --darwin-use-unencrypted-nix-store-volume option.

#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten