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
// Builds a OCI bundle from a BuildRequest and a path, which points to an | |
// existing (and empty) path to a directory (usually a temporary). | |
// | |
// This function emits an OCI bundle that will run the build specifed in the | |
// buildRequest. | |
// | |
// After running this function, the directory contains the following: | |
// | |
// - `config.json`, the OCI runtime spec itself | |
// - `scratch`, a directory containing other directories which will be |
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
tvix-cli from https://cl.tvl.fyi/c/depot/+/8572/33: | |
❯ /nix/store/fi3j1sbpd2fzwbjnak924z58zhpd07j0-hyperfine-1.16.1/bin/hyperfine --warmup 10 './target/release/tvix -E "with import <nixpkgs>{}; toString stdenv"' 'nix-instantiate --eval --json --expr "with import <nixpkgs>{}; toString stdenv"' | |
Benchmark 1: ./target/release/tvix -E "with import <nixpkgs>{}; toString stdenv" | |
Time (mean ± σ): 1.235 s ± 0.013 s [User: 1.161 s, System: 0.074 s] | |
Range (min … max): 1.218 s … 1.254 s 10 runs | |
Benchmark 2: nix-instantiate --eval --json --expr "with import <nixpkgs>{}; toString stdenv" | |
Time (mean ± σ): 193.7 ms ± 3.4 ms [User: 161.7 ms, System: 32.0 ms] | |
Range (min … max): 190.3 ms … 203.1 ms 14 runs |
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
running tests | |
PERL_DL_NONLAZY=1 "/nix/store/rgw6wzny8rqpri516srzvjv2gqsg1niv-perl-5.36.0/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t | |
t/01_NetPBM.t ................................. ok | |
t/02_Scanner_Options_brother.t ................ ok | |
t/02_Scanner_Options_Brother_DCP-7025.t ....... ok | |
t/02_Scanner_Options_Brother_MFC_5100c.t ...... ok | |
t/02_Scanner_Options_Brother_MFC_8860DN.t ..... ok | |
t/02_Scanner_Options_canonLiDE25.t ............ ok | |
t/02_Scanner_Options_canoscan_FB_630P.t ....... ok | |
t/02_Scanner_Options_epson1.t ................. ok |
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
❯ nix-build -A nixosTests.systemd-cryptenroll | |
this derivation will be built: | |
/nix/store/wrrx8d9splrkd484p6cjrrwpn1n81f98-vm-test-run-systemd-cryptenroll.drv | |
building '/nix/store/wrrx8d9splrkd484p6cjrrwpn1n81f98-vm-test-run-systemd-cryptenroll.drv'... | |
Machine state will be reset. To keep it, pass --keep-vm-state | |
start all VLans | |
start vlan | |
running vlan (pid 7; ctl /build/vde1.ctl) | |
(finished: start all VLans, in 0.00 seconds) | |
run the VM test script |
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
package main | |
import ( | |
"encoding/hex" | |
"fmt" | |
nixhash "github.com/nix-community/go-nix/pkg/hash" | |
"github.com/nix-community/go-nix/pkg/nixbase32" | |
) |
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, lib, ... }: | |
let | |
nsncdPackage = pkgs.rustPlatform.buildRustPackage rec { | |
pname = "nsncd"; | |
version = "unstable-2021-10-13"; | |
src = pkgs.fetchFromGitHub { | |
owner = "flokli"; | |
repo = "nsncd"; |
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
{ stdenv | |
, lib | |
, fetchFromGitHub | |
, kernel | |
, kmod | |
}: | |
stdenv.mkDerivation { | |
pname = "qnap-ec"; | |
version = "unstable-2021-11-22"; |
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
#!/usr/bin/env bash | |
# This assumes a booted rescue system, copies the installation media to the destination disk | |
# it'll then add a CIDATA partition to the end of the disk, and prepare it with user-data | |
# used in a terraform ssh provisioner, but extracted to here for now. | |
destination_disk=/dev/nvme0n1 | |
talos_version=v0.14.3 | |
wipefs -af $destination_disk | |
wget https://github.com/talos-systems/talos/releases/download/${talos_version}/nocloud-amd64.raw.xz |
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
- name: This doesn't work | |
hosts: localhost | |
connection: local | |
gather_facts: no | |
become: no | |
tasks: | |
- local_action: > | |
shell | |
echo hey |
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
# stolen from https://gist.github.com/tarnacious/f9674436fff0efeb4bb6585c79a3b9ff | |
{ config, lib, pkgs, ... }: | |
with lib; | |
{ | |
imports = | |
[ | |
<nixpkgs/nixos/modules/installer/cd-dvd/channel.nix> | |
./configuration.nix |
NewerOlder