The code and data behind xeiaso.net
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

try this

Signed-off-by: Xe Iaso <me@xeiaso.net>

Xe Iaso 93070819 f7367657

+95 -1
+12
.vscode/extensions.json
··· 1 + { 2 + "recommendations": [ 3 + "unifiedjs.vscode-mdx", 4 + "golang.go", 5 + "bbenoist.nix", 6 + "jnoortheen.nix-ide", 7 + "dhall.dhall-lang", 8 + "denoland.vscode-deno", 9 + "bradlc.vscode-tailwindcss", 10 + "ronnidc.nunjucks" 11 + ] 12 + }
+1
lume/src/blog/notes/_data.yml
··· 1 + is_note: true
+82
lume/src/blog/notes/nix-flakes-terraform-unfree-fix.mdx
··· 1 + --- 2 + title: "How to fix terraform and nix flakes" 3 + date: 2023-10-27 4 + tags: 5 + - nix 6 + - terraform 7 + - enshittification 8 + hero: 9 + ai: Furryrock 10 + file: coffee-birb 11 + prompt: A pink haired avali wearing a sweater and sweatpants drinking coffee indoors. 12 + --- 13 + 14 + Recently Terraform [changed licenses](https://www.theregister.com/2023/08/11/hashicorp_bsl_licence/) to the Business Source License. This is a non-free license in the eyes of Nix, so now whenever you update your project flakes, you get greeted by this lovely error: 15 + 16 + ``` 17 + error: Package ‘terraform-1.6.2’ in /nix/store/z1nvpjx9vd4151vx2krxzmx2p1a36pf9-source/pkgs/applications/networking/cluster/terraform/default.nix:52 has an unfree license (‘bsl11’), refusing to evaluate. 18 + 19 + a) To temporarily allow unfree packages, you can use an environment variable 20 + for a single invocation of the nix tools. 21 + 22 + $ export NIXPKGS_ALLOW_UNFREE=1 23 + 24 + Note: For `nix shell`, `nix build`, `nix develop` or any other Nix 2.4+ 25 + (Flake) command, `--impure` must be passed in order to read this 26 + environment variable. 27 + 28 + b) For `nixos-rebuild` you can set 29 + { nixpkgs.config.allowUnfree = true; } 30 + in configuration.nix to override this. 31 + 32 + Alternatively you can configure a predicate to allow specific packages: 33 + { 34 + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ 35 + "terraform" 36 + ]; 37 + } 38 + 39 + c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add 40 + { allowUnfree = true; } 41 + to ~/.config/nixpkgs/config.nix. 42 + ``` 43 + 44 + The extra fun part is that when you're using a flake with a per-project version of nixpkgs, none of those workarounds work. Here's what you have to do instead: 45 + 46 + In your flake you'll usually have an import of nixpkgs like this: 47 + 48 + ```nix 49 + let 50 + pkgs = import nixpkgs { inherit system; }; 51 + in 52 + crimes_etc 53 + ``` 54 + 55 + Or like this: 56 + 57 + ```nix 58 + let 59 + pkgs = nixpkgs.legacyPackages.${system}; 60 + in 61 + different_crimes_etc 62 + ``` 63 + 64 + You'll want to change that to this: 65 + 66 + ```nix 67 + let 68 + pkgs = import nixpkgs { inherit system; config.allowUnfree = true; }; 69 + in 70 + working_crimes_etc 71 + ``` 72 + 73 + This allows you to bypass the license check for all packages in nixpkgs so that things Just Work™. If you want to only do this for terraform, you can make a separate instance of nixpkgs to pull out only terraform, but I think that overall it's probably easier to just eliminate the problem entirely. 74 + 75 + I hope this helps you out! 76 + 77 + <XeblogConv name="Cadey" mood="coffee"> 78 + Don't you love the intersection of computers and capitalism? It's the best. 79 + </XeblogConv> 80 + <XeblogConv name="Aoi" mood="coffee"> 81 + Tell me about it. 82 + </XeblogConv>
-1
static/img/asg2023-diagram.svg
··· 1 - <svg aria-roledescription="flowchart-v2" role="graphics-document document" viewBox="-8 -8 477.234375 182.75" style="max-width: 100%;" xmlns="http://www.w3.org/2000/svg" width="100%" id="graph-div" height="100%" xmlns:xlink="http://www.w3.org/1999/xlink"><style>@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css");'</style><style>#graph-div{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;fill:#333;}#graph-div .error-icon{fill:hsl(60, 90%, 100%);}#graph-div .error-text{fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);}#graph-div .edge-thickness-normal{stroke-width:2px;}#graph-div .edge-thickness-thick{stroke-width:3.5px;}#graph-div .edge-pattern-solid{stroke-dasharray:0;}#graph-div .edge-pattern-dashed{stroke-dasharray:3;}#graph-div .edge-pattern-dotted{stroke-dasharray:2;}#graph-div .marker{fill:#0b0b0b;stroke:#0b0b0b;}#graph-div .marker.cross{stroke:#0b0b0b;}#graph-div svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;}#graph-div .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#graph-div .cluster-label text{fill:rgb(0, 0, 0);}#graph-div .cluster-label span,#graph-div p{color:rgb(0, 0, 0);}#graph-div .label text,#graph-div span,#graph-div p{fill:#333;color:#333;}#graph-div .node rect,#graph-div .node circle,#graph-div .node ellipse,#graph-div .node polygon,#graph-div .node path{fill:#ECECFE;stroke:#BCBCFB;stroke-width:1px;}#graph-div .flowchart-label text{text-anchor:middle;}#graph-div .node .label{text-align:center;}#graph-div .node.clickable{cursor:pointer;}#graph-div .arrowheadPath{fill:#0b0b0b;}#graph-div .edgePath .path{stroke:#0b0b0b;stroke-width:2.0px;}#graph-div .flowchart-link{stroke:#0b0b0b;fill:none;}#graph-div .edgeLabel{background-color:#E9E9F1;text-align:center;}#graph-div .edgeLabel rect{opacity:0.5;background-color:#E9E9F1;fill:#E9E9F1;}#graph-div .labelBkg{background-color:rgba(233, 233, 241, 0.5);}#graph-div .cluster rect{fill:hsl(60, 90%, 100%);stroke:hsl(60, 50%, 90%);stroke-width:1px;}#graph-div .cluster text{fill:rgb(0, 0, 0);}#graph-div .cluster span,#graph-div p{color:rgb(0, 0, 0);}#graph-div div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(60, 90%, 100%);border:1px solid hsl(60, 50%, 90%);border-radius:2px;pointer-events:none;z-index:100;}#graph-div .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#graph-div :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}</style><g><marker orient="auto" markerHeight="12" markerWidth="12" markerUnits="userSpaceOnUse" refY="5" refX="10" viewBox="0 0 10 10" class="marker flowchart" id="flowchart-pointEnd"><path style="stroke-width: 1; stroke-dasharray: 1, 0;" class="arrowMarkerPath" d="M 0 0 L 10 5 L 0 10 z"></path></marker><marker orient="auto" markerHeight="12" markerWidth="12" markerUnits="userSpaceOnUse" refY="5" refX="0" viewBox="0 0 10 10" class="marker flowchart" id="flowchart-pointStart"><path style="stroke-width: 1; stroke-dasharray: 1, 0;" class="arrowMarkerPath" d="M 0 5 L 10 10 L 10 0 z"></path></marker><marker orient="auto" markerHeight="11" markerWidth="11" markerUnits="userSpaceOnUse" refY="5" refX="11" viewBox="0 0 10 10" class="marker flowchart" id="flowchart-circleEnd"><circle style="stroke-width: 1; stroke-dasharray: 1, 0;" class="arrowMarkerPath" r="5" cy="5" cx="5"></circle></marker><marker orient="auto" markerHeight="11" markerWidth="11" markerUnits="userSpaceOnUse" refY="5" refX="-1" viewBox="0 0 10 10" class="marker flowchart" id="flowchart-circleStart"><circle style="stroke-width: 1; stroke-dasharray: 1, 0;" class="arrowMarkerPath" r="5" cy="5" cx="5"></circle></marker><marker orient="auto" markerHeight="11" markerWidth="11" markerUnits="userSpaceOnUse" refY="5.2" refX="12" viewBox="0 0 11 11" class="marker cross flowchart" id="flowchart-crossEnd"><path style="stroke-width: 2; stroke-dasharray: 1, 0;" class="arrowMarkerPath" d="M 1,1 l 9,9 M 10,1 l -9,9"></path></marker><marker orient="auto" markerHeight="11" markerWidth="11" markerUnits="userSpaceOnUse" refY="5.2" refX="-1" viewBox="0 0 11 11" class="marker cross flowchart" id="flowchart-crossStart"><path style="stroke-width: 2; stroke-dasharray: 1, 0;" class="arrowMarkerPath" d="M 1,1 l 9,9 M 10,1 l -9,9"></path></marker><g class="root"><g class="clusters"></g><g class="edgePaths"><path marker-end="url(#flowchart-pointEnd)" marker-start="url(#flowchart-pointStart)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-Laptop LE-VM" id="L-Laptop-VM-0" d="M228.8984375,16.75L245.80013020833334,16.75C262.7018229166667,16.75,296.5052083333333,16.75,329.7278645833333,25.450650894980598C362.9505208333333,34.151301789961195,395.5924479166667,51.55260357992239,411.9134114583333,60.253254474902995L428.234375,68.95390536988359"></path><path marker-end="url(#flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-Tailscale LE-Laptop" id="L-Tailscale-Laptop-0" d="M63.03125,36.53556330110187L72.421875,33.237969417584885C81.8125,29.94037553406791,100.59375,23.345187767033952,119.62109375,20.047593883516978C138.6484375,16.75,157.921875,16.75,167.55859375,16.75L177.1953125,16.75"></path><path marker-end="url(#flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-Tailscale LE-VM" id="L-Tailscale-VM-0" d="M63.03125,57.96443669889813L72.421875,61.262030582415115C81.8125,64.55962446593209,100.59375,71.15481223296605,123.9296875,74.45240611648302C147.265625,77.75,175.15625,77.75,210.31184895833334,77.75C245.46744791666666,77.75,287.8880208333333,77.75,325.4192708333333,77.75C362.9505208333333,77.75,395.5924479166667,77.75,411.9134114583333,77.75L428.234375,77.75"></path><path marker-end="url(#flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-Funnel LE-VM" id="L-Funnel-VM-0" d="M228.89453125,150L245.796875,150C262.69921875,150,296.50390625,150,329.7272135416667,139.694720866191C362.9505208333333,129.38944173238204,395.5924479166667,108.77888346476406,411.9134114583333,98.47360433095507L428.234375,88.16832519714607"></path><path marker-end="url(#flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-Audience LE-Funnel" id="L-Audience-Funnel-0" d="M65.0390625,150L74.09505208333333,150C83.15104166666667,150,101.26302083333333,150,119.95638020833333,150C138.64973958333334,150,157.92447916666666,150,167.56184895833334,150L177.19921875,150"></path></g><g class="edgeLabels"><g transform="translate(330.30859375, 16.75)" class="edgeLabel"><g transform="translate(-72.92578125, -9.25)" class="label"><foreignObject height="18.5" width="145.8515625"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel">Via VS Code/Tailscale SSH</span></div></foreignObject></g></g><g transform="translate(119.375, 16.75)" class="edgeLabel"><g transform="translate(-29.3359375, -9.25)" class="label"><foreignObject height="18.5" width="58.671875"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel">CONTROL</span></div></foreignObject></g></g><g transform="translate(203.046875, 77.75)" class="edgeLabel"><g transform="translate(-29.3359375, -9.25)" class="label"><foreignObject height="18.5" width="58.671875"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel">CONTROL</span></div></foreignObject></g></g><g transform="translate(330.30859375, 150)" class="edgeLabel"><g transform="translate(-29.0078125, -9.25)" class="label"><foreignObject height="18.5" width="58.015625"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel">WireGuard</span></div></foreignObject></g></g><g transform="translate(119.375, 150)" class="edgeLabel"><g transform="translate(-19.66796875, -9.25)" class="label"><foreignObject height="18.5" width="39.3359375"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel">HTTPS</span></div></foreignObject></g></g></g><g class="nodes"><g transform="translate(203.046875, 16.75)" id="flowchart-Laptop-0" class="node default default flowchart-label"><rect height="33.5" width="51.703125" y="-16.75" x="-25.8515625" ry="0" rx="0" style="" class="basic label-container"></rect><g transform="translate(-18.3515625, -9.25)" style="" class="label"><rect></rect><foreignObject height="18.5" width="36.703125"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">Laptop</span></div></foreignObject></g></g><g transform="translate(444.734375, 77.75)" id="flowchart-VM-1" class="node default default flowchart-label"><rect height="33.5" width="33" y="-16.75" x="-16.5" ry="0" rx="0" style="" class="basic label-container"></rect><g transform="translate(-9, -9.25)" style="" class="label"><rect></rect><foreignObject height="18.5" width="18"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">VM</span></div></foreignObject></g></g><g transform="translate(32.51953125, 47.25)" id="flowchart-Tailscale-2" class="node default default flowchart-label"><rect height="33.5" width="61.0234375" y="-16.75" x="-30.51171875" ry="0" rx="0" style="" class="basic label-container"></rect><g transform="translate(-23.01171875, -9.25)" style="" class="label"><rect></rect><foreignObject height="18.5" width="46.0234375"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">Tailscale</span></div></foreignObject></g></g><g transform="translate(203.046875, 150)" id="flowchart-Funnel-6" class="node default default flowchart-label"><rect height="33.5" width="51.6953125" y="-16.75" x="-25.84765625" ry="0" rx="0" style="" class="basic label-container"></rect><g transform="translate(-18.34765625, -9.25)" style="" class="label"><rect></rect><foreignObject height="18.5" width="36.6953125"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">Funnel</span></div></foreignObject></g></g><g transform="translate(32.51953125, 150)" id="flowchart-Audience-8" class="node default default flowchart-label"><rect height="33.5" width="65.0390625" y="-16.75" x="-32.51953125" ry="0" rx="0" style="" class="basic label-container"></rect><g transform="translate(-25.01953125, -9.25)" style="" class="label"><rect></rect><foreignObject height="18.5" width="50.0390625"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">Audience</span></div></foreignObject></g></g></g></g></g></svg>