Skip to content

Instantly share code, notes, and snippets.

View davegallant's full-sized avatar
🐧
coding

Dave Gallant davegallant

🐧
coding
View GitHub Profile
@davegallant
davegallant / pct-enter.sh
Created December 3, 2023 04:06 — forked from Xenthys/pct-enter.sh
A helper for Proxmox's "pct enter" to use containers' hostnames and enter them from any cluster node.
#!/bin/bash
id=$(grep "$1" /etc/pve/.rrd | cut -d'/' -f 2 | cut -d':' -f 1)
[[ "$id" == '' ]] && echo "The specified LXC does not exist." && exit 1
node=$(grep "^\"$id\":" /etc/pve/.vmlist | cut -d'"' -f 6)
[[ $(hostname) != "$node" ]] && pre="ssh -t $node "
echo "Entering LXC $id on node $node..."
${pre}pct enter $id
@davegallant
davegallant / encryptedNixos.md
Created November 13, 2022 18:18 — forked from ladinu/encryptedNixos.md
NixOS install with encrypted /boot /root with single password unlock

Requirements

  1. Encrypt everthing including /boot and /root
  2. Enter password once
  3. Support UEFI

Installation media setup

Download NixOS minimal iso and copy to USB stick. For example on Mac OSX

$ diskutil list
$ diskutil unmountDisk /dev/disk1 # Make sure you got right device
@davegallant
davegallant / README.md
Created November 13, 2021 21:35 — forked from triangletodd/README.md
k3s in LXC on Proxmox

On the host

Ensure these modules are loaded

cat /proc/sys/net/bridge/bridge-nf-call-iptables

Disable swap

sysctl vm.swappiness=0
swapoff -a
@davegallant
davegallant / nixos.md
Created May 2, 2021 17:50 — forked from martijnvermaat/nixos.md
Installation of NixOS with encrypted root