Skip to content

Instantly share code, notes, and snippets.

@Mic92
Mic92 / 0_description.md
Last active May 24, 2023 07:32
Tvix (b67ac82cb15c2667c1742dc64c4e001c6768aea1) vs nix (v2.12.0) evaluation of the hello package
View 0_description.md

Tvix is a new implementation of the Nix language and package manager. In this benchmark we test it's performance when instantiating the hello package from nix. Note that at the time tvix does not have its own store implementation yet and it has to execute nix-store whenever it needs to copy files to the store.

View test-nixos-iso.sh
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p bash -p qemu_kvm -p iproute2
set -x -eu -o pipefail
VM_IMAGE=""
CPUS="${CPUS:-$(nproc)}"
MEMORY="${MEMORY:-4096}"
SSH_PORT="${SSH_PORT:-2222}"
IMAGE_SIZE="${IMAGE_SIZE:-10G}"
View disk-space
. 242.3 GiB [##########################] /harshanavkis
. 137.1 GiB [############## ] /paul
98.9 GiB [########## ] /julian
. 84.8 GiB [######### ] /dimitrios
. 61.5 GiB [###### ] /maurice
33.0 GiB [### ] /martin
12.1 GiB [# ] /masa
7.8 GiB [ ] /joerg
5.3 MiB [ ] /okelmann
View install-nixos.sh
#!/usr/bin/env bash
set -exuo pipefail
PROGRAM_NAME="$0"
inst() {
local system="" host="" action="install" from="auto" mount=""
local -a nixCopyArgs
while [[ "$#" -gt 0 ]] ; do
case "$1" in
@Mic92
Mic92 / default.nix
Created December 19, 2022 19:45
forgejo
View default.nix
{ lib
, buildGoPackage
, fetchurl
, makeWrapper
, git
, bash
, gzip
, openssh
, pam
, sqliteSupport ? true
View hardware.nix
{
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
];
disko.devices = import ./raid-config.nix {
raidLevel = 1;
};
View messed-up-mdadm-ids
[root@nixos:/]# cat etc/fstab
# This is a generated file. Do not edit!
#
# To make changes, edit the fileSystems and swapDevices NixOS options
# in your /etc/nixos/configuration.nix file.
#
# <file system> <mount point> <type> <options> <dump> <pass>
# Filesystems.
/dev/md/root / ext4 defaults 0 1
View default.nix
{ pkgs ? import <nixpkgs> {} }:
with pkgs;
let
clang-wrapped = wrapCCWith {
cc = llvmPackages.clang-unwrapped;
bintools = wrapBintoolsWith {
bintools = pkgs.runCommand "lld" {} ''
mkdir -p $out/bin
View gist:86a10bea53f174974d18368ef51a9c7c
with import <nixpkgs> {};
mkShell {
nativeBuildInputs = [
bashInteractive
libosmocore
talloc
];
NIX_CFLAGS_COMPILE = "-ltalloc";
}
View auto-merge-ci.yaml
name: Automatic merge if CI builds
on:
push:
branches:
- 'update/*'
jobs:
wait-for-check-regexp:
runs-on: ubuntu-latest
if: github.actor == 'numtide-bot'