The docs on https://developer.apple.com/documentation/virtualization/running_intel_binaries_in_linux_vms_with_rosetta#4239539 are sparse and incomplete and don't tell you at all how to set this up. Lets trial and error our way through this.
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
let imds = ["169.254.169.254" "fd00:ec2::254"]; in | |
{ | |
systemd.slices."-".sliceConfig.IPAddressDeny = imds; | |
systemd.services.my-service-that-needs-aws.serviceConfig.IPAddressAllow = imds; | |
} |
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
resource "aws_s3_bucket_item" "this" { | |
bucket = "images" | |
key = var.image_name | |
source = var.image_path | |
} | |
resource "aws_ebs_snapshort_import" "this" { | |
disk_container { | |
type = "VHD" | |
user_bucket = aws_s3_bucket_item.this.bucket |
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
{-# LANGUAGE BlockArguments #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
module MyLib (someFunc) where | |
import Conduit (ConduitT, Flush (Chunk, Flush), Source, yield, (.|)) | |
import Control.Concurrent (threadDelay) | |
import Control.Monad (forM_) | |
import Control.Monad.IO.Class | |
import Control.Monad.Trans.Class (lift) |
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
longComputation = do | |
threaDelay 5000 | |
pure ["a", "b" ,"c"] | |
longComputation2 = do | |
threadDelay 3000 | |
pure "lol" | |
website = do | |
h1 "Hello, World!" |
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/sh | |
#If already set (e.g. in github actions); use that instead | |
if [ -z "$GITHUB_TOKEN" ]; then | |
nix run nixpkgs#gh auth status || nix run nixpkgs#gh auth login | |
GITHUB_TOKEN="$(nix run nixpkgs#gh auth token)" | |
export GITHUB_TOKEN | |
fi | |
NIX_CONFIG="access-tokens = github.com=$GITHUB_TOKEN" |
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
use flake .#dira |
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
[root@nixos:~]# poweroff | |
[root@nixos:~]# Stopping Session 1 of User root... | |
Stopping Session 2 of User root... | |
[ OK ] Removed slice Slice /system/modprobe. | |
[ OK ] Stopped target Multi-User System. | |
[ OK ] Stopped target Login Prompts. | |
[ OK ] Stopped target Containers. | |
[ OK ] Stopped target Network is Online. |
An error occurred (AccessDenied) when calling the StartInstanceRefresh operation: You are not authorized to use launch template:
You came here because you Googled the above error and got zero hits. You will now get a hit!
You have an error like:
An error occurred (AccessDenied) when calling the StartInstanceRefresh operation: You are not authorized to use launch template:
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
{ pkgs ? import <nixpkgs> {} }: | |
let | |
fontsConf = pkgs.makeFontsConf { | |
fontDirectories = [ ./fonts ]; | |
}; | |
texlive = pkgs.texlive.combine { | |
inherit (pkgs.texlive) | |
appendix | |
tikzmark |
NewerOlder