Edit 2023-03-03: This is now written in long-form at https://jamesog.net/2023/03/03/yubikey-as-an-ssh-certificate-authority/
The original version is retained below.
ykmanfrom theyubikey-managerpackage- libykcs11 from the
yubico-piv-toolpackage
| services.caddy = { | |
| # Enable on-demand TLS to allow domain handles to work. | |
| # When a virtual host uses a wildcard, instead of trying to request a wildcard | |
| # from Let's Encrypt, it'll issue a cert for each hostname if the service | |
| # specified here responds with 200. | |
| globalConfig = '' | |
| on_demand_tls { | |
| ask http://[::1]:3000/tls-check | |
| } | |
| ''; |
| theme = "Tomorrow Night Blue" | |
| copy-on-select = true | |
| macos-non-native-fullscreen = true | |
| macos-titlebar-style = "tabs" | |
| macos-option-as-alt = true |
| alias: Agile price charge | |
| description: >- | |
| Set the inverter to force charge when we're in the time window and the | |
| Octoppus Agile price is at or below the threshold. | |
| trigger: | |
| - platform: state | |
| entity_id: | |
| - binary_sensor.charge_window | |
| from: "off" | |
| to: "on" |
| { | |
| networking.hostId = "..."; # Use head -c8 /etc/machine-id to get this | |
| services.zfs.autoScrub.enable = true; | |
| } |
| . { | |
| forward . tls://2a07:a8c0::ae:9cfd tls://2a07:a8c1::ae:9cfd tls://45.90.28.178 tls://45.90.30.178 8.8.8.8 8.8.4.4 { | |
| tls_servername dns01-ae9cfd.dns.nextdns.io | |
| policy sequential | |
| } | |
| cache { | |
| success 12800 86400 300 | |
| denial 12800 | |
| prefetch 25 | |
| serve_stale 24h |
| { config, pkgs, ... }: | |
| { | |
| environment.etc = { | |
| "ssh/ca.pub".text = '' | |
| ssh-rsa ... | |
| ''; | |
| }; | |
| services.openssh.extraConfig = |
Edit 2023-03-03: This is now written in long-form at https://jamesog.net/2023/03/03/yubikey-as-an-ssh-certificate-authority/
The original version is retained below.
ykman from the yubikey-manager packageyubico-piv-tool package| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Label</key> | |
| <string>net.jamesog.takeabreak</string> | |
| <key>Program</key> | |
| <string>/usr/bin/say</string> | |
| <key>ProgramArgs</key> | |
| <array> |
| #!/bin/sh | |
| # | |
| # PROVIDE: tailscaled tailscale | |
| # REQUIRE: NETWORKING | |
| . /etc/rc.subr | |
| name="tailscaled" | |
| rcvar="${name}_enable" |