Skip to content

Instantly share code, notes, and snippets.

View peterromfeldhk's full-sized avatar

Peter Romfeld peterromfeldhk

View GitHub Profile
@peterromfeldhk
peterromfeldhk / nixos-install-encrypted-root.sh
Created April 25, 2019 05:34 — forked from sveitser/nixos-install-encrypted-root.sh
Installs nixos on encrypted root from live CD.
#!/usr/bin/env bash
#
# Installs nixos with full disk encrypted root partition.
#
# - Prompts for password initially, after that no interaction should
# be required.
# - At the end it will prompt for a root password, could not make
# echo-ing it into nixos-install work.
# - Reserves 550MB for boot partition, rest for the root volume.
# - After booting, log in as root user and set password for normal user.
@peterromfeldhk
peterromfeldhk / inventory2json.py
Created February 28, 2018 04:47 — forked from sivel/inventory2json.py
Ansible inventory to dynamic inventory JSON output, accepts all inventory input formats
import sys
import json
from ansible.parsing.dataloader import DataLoader
try:
from ansible.inventory.manager import InventoryManager
A24 = True
except ImportError:
from ansible.vars import VariableManager