A simple service definition for Consul agents; meant to simplify the installation process of Consul.
This is based on the information provided by Hashicorp in the Consul Docs.
- Download the XML file:
- Either
wget {raw_url} consul.xml
htmx.on('htmx:beforeSwap', (htmxEvent) => { | |
let incomingDOM = new DOMParser().parseFromString(htmxEvent.detail.xhr.response, "text/html"); | |
// Transpose <meta> data, page-specific <link> tags and JSON-LD structured data | |
// Note that hx-boost automatically swaps the <title> tag | |
let selector = "head > meta:not([data-revision]), head *[rel=\"canonical\"], head *[rel=\"alternate\"], body script[type=\"application/ld+json\"]"; | |
document.querySelectorAll(selector).forEach((e) => { | |
e.parentNode.removeChild(e); | |
}); | |
incomingDOM.querySelectorAll(selector).forEach((e) => { | |
if (e.tagName === 'SCRIPT') { |
A simple service definition for Consul agents; meant to simplify the installation process of Consul.
This is based on the information provided by Hashicorp in the Consul Docs.
wget {raw_url} consul.xml
{ config, pkgs, lib, ... }: | |
let | |
# There were two main sources of inspiration for this configuration: | |
# 1. https://pavluk.org/blog/2022/01/26/nixos_router.html | |
# 2. https://francis.begyn.be/blog/nixos-home-router | |
# Thank you very much! | |
# | |
# network types: | |
# { type = "none"; } # Don't generate a network file |
$Path = $env:TEMP | |
$Installer = "chrome_installer.exe" | |
Invoke-WebRequest "https://dl.google.com/chrome/install/latest/chrome_installer.exe" -OutFile $Path$Installer | |
Start-Process -FilePath $Path$Installer -Args "/silent /install" -Verb RunAs -Wait | |
Remove-Item $Path$Installer |
Please note that these instructions are not offically supported or condoned by Nix and are not guaranteed to always work, but from my testing everything seems to work perfectly fine.
These steps may not be required if NixOS/nix#2374 is resolved.
These commands are required for both Fedora Workstation and Fedora Silverblue
Some random notes on trying (and failing) to get Proxmox as host with 5700G APU GPU PCI Passthrough to Ubuntu guest VM working:
References:
package main | |
import ( | |
"testing" | |
"github.com/go-gl/mathgl/mgl32" | |
"github.com/kvartborg/vector" | |
"github.com/ungerik/go3d/vec2" | |
"gonum.org/v1/gonum/mat" | |
) |
I wanted to write a module that generates multiple systemd services and timers to scrub some zfs pools at certain intervals. The default scrub config does not support individual scrub intervals for each pool.
I want the config to look like this:
{
services.zfs-auto-scrub = {
tank = "Sat *-*-* 00:00:00";
Hi @nrdxp + @edolstra -- I have a couple ideas for how to make things marginally better here but, tl;dr: I'd like feedback or direction from either or both of you on my idea before I invest more time, especially for exploring the proposed solutions that require C++ development. (Also, please let me know if you'd like me to move this from an issue comment to an RFC or even a, e.g., Google Doc design doc, for easier interaction.)
In my words at a minimum:
flake authors need to be able to request submodule-fetching for the repository hosting
flake.nix
(Please see my appendix for supporting use cases and UX/DX considerations if you aren't already convinced about this need. Also, @nrdxp, please let me know if you actually have a different motivating problem in mind?)
package main | |
import ( | |
"context" | |
"fmt" | |
"log" | |
"net/http" | |
"net/http/httputil" | |
"strings" | |
"time" |