This guide is written for Arch Linux.
systemdversion 248 or newer- Use
mkinitcpiofor initramfs generation
| package main | |
| import ( | |
| "fmt" | |
| "github.com/aws/aws-sdk-go/aws" | |
| "github.com/aws/aws-sdk-go/aws/session" | |
| "github.com/aws/aws-sdk-go/service/ssm" | |
| "strings" | |
| ) |
| { config, pkgs, lib, ... }: | |
| with lib; | |
| let | |
| cfg = config.local.dock; | |
| stdenv = pkgs.stdenv; | |
| in | |
| { | |
| options = { | |
| local.dock.enable = mkOption { | |
| description = "Enable dock"; |
| #!/usr/bin/env bash | |
| # rbw git-credential helper | |
| # Based on https://github.com/lastpass/lastpass-cli/blob/master/contrib/examples/git-credential-lastpass | |
| # A credential helper for git to retrieve usernames and passwords from rbw. | |
| # For general usage, see https://git-scm.com/docs/gitcredentials. | |
| # Here's a quick version: | |
| # 1. Put this somewhere in your path. | |
| # 2. git config --global credential.helper rbw |
| FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.16 as builder | |
| ARG TARGETPLATFORM | |
| ARG BUILDPLATFORM | |
| ARG TARGETOS | |
| ARG TARGETARCH | |
| WORKDIR /app/ | |
| ADD . . | |
| RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-w -s" -o yourapplication main.go |
| # Full NixOS configuration for a ZFS server with full disk encryption hosted on Hetzner. | |
| # See <https://mazzo.li/posts/hetzner-zfs.html> for more information. | |
| { config, pkgs, ... }: | |
| let | |
| # Deployment-specific parameters -- you need to fill these in where the ... are | |
| hostName = "..."; | |
| publicKey = "..."; | |
| # From `ls -lh /dev/disk/by-id` |
Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.
Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.
The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.
| #!/usr/bin/env bash | |
| # Installs NixOS on a Hetzner server, wiping the server. | |
| # | |
| # This is for a specific server configuration; adjust where needed. | |
| # | |
| # Prerequisites: | |
| # * Update the script wherever FIXME is present | |
| # | |
| # Usage: |
| { stdenv, lib, pkgs, dpkg, | |
| openssl, libnl, zlib, | |
| fetchurl, autoPatchelfHook, buildFHSUserEnv, writeScript, ... }: | |
| let |
| {pkgs?import <nixpkgs> {}}: | |
| with pkgs; | |
| stdenv.mkDerivation { | |
| name = "falcon-sensor"; | |
| version = "4.18.0-6402"; | |
| arch = "amd64"; | |
| src = ./falcon-sensor_6.34.0-13108_amd64.deb; | |
| nativeBuildInputs = [ dpkg autoPatchelfHook zlib pkgs.libnl pkgs.openssl ]; |