This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/ash | |
while [ $# -gt 0 ]; do case "${1}" in | |
-f|--force) force="y";; | |
-r|--renew|--redownload) renew="y";; | |
-d|--destination) shift; dest_dir="${1}";; | |
-i|--dnsmasq_instance) shift; dnsmasq_instance="${1}";; | |
-t|--types|--imagetypes|--images) shift; images="${1}";; | |
esac; shift; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
# this can be your hostname | |
name=nixos | |
disk=/dev/nvme0n1 | |
# destroy disk / remove signatures | |
zpool destroy -f $name ||: | |
wipefs -f -a "$disk"* ||: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, lib, unstable, ... }: | |
with lib; | |
let | |
cfg = config.pflaumen.dns.server; | |
fmt = pkgs.formats.knotConf {}; | |
overlay = _: flip recursiveUpdate { inherit formats; }; | |
formats.knotConf = {}: rec { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env nix-shell | |
#! nix-shell -i bash -p curl jq pup utillinux | |
declare -x PB_YEARS=${PB_YEARS:-5} | |
declare -x PB_LIMIT=${PB_LIMIT:-23} | |
echo "Loading the $PB_LIMIT cheapest (over $PB_YEARS years) TLDs from porkbun.com..." | |
echo; ( | |
cat .pbcache.json 2>/dev/null || | |
curl -ksSLo- 'https://porkbun.com/products/domains' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
imports = [ <nixpkgs/nixos/modules/profiles/qemu-guest.nix> ]; | |
boot.loader.grub.devices = [ "$nixosparty_disk" ]; | |
fileSystems."/".label = "root"; | |
swapDevices = [ { label = "swap"; } ]; | |
networking.hostName = "$nixosparty_name"; | |
services.openssh.enable = true; | |
users.users."root" = { | |
password = "$nixosparty_password"; | |
openssh.authorizedKeys.keys = [ $nixosparty_authorized_keys ]; |