Did you know that it is rather easy to setup a VM to test your NixOs configuration?
# flake.nix
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
.compose-form__publish-button-wrapper .button--block { | |
font-size: 0px; | |
} | |
.compose-form__publish-button-wrapper .button--block::after { | |
content: "Toot!"; | |
font-size: 15px; | |
vertical-align: middle; | |
color: #fff; | |
} |
#! /usr/bin/env nix-shell | |
#! nix-shell -i sh -p coreutils findutils gnused ripgrep strace | |
# Usage ./get-command-nix-deps.sh ./script.sh 10s | |
timeout "$2" strace -qqfe execve sh -c "$1" 2>&1 >/dev/null | \ | |
rg '(/nix/store|/run/current-system/sw/bin)' | \ | |
sed -E 's=.*execve\("(\/.*)", \[.*=\1=g' | \ | |
xargs readlink -f | sort -u | \ | |
sed -E 's=/nix/store/[0-9a-z]*-(.*)-(.*)/.*/.*=\1 (\2)=g' | sort -u | |
iperf3
serverwg-quick down wg0
/etc/wireguard/wg0.conf
file{ pkgsPath ? <nixpkgs> }: | |
let | |
pkgs = import pkgsPath {}; | |
pkgsAarch64 = import pkgsPath { system = "aarch64-linux"; }; | |
iso = (pkgsAarch64.nixos { | |
imports = [ (pkgsPath + "/nixos/modules/installer/cd-dvd/installation-cd-base.nix") ]; | |
users.users.root.openssh.authorizedKeys.keyFiles = [(builtins.fetchurl https://github.com/lheckemann.keys)]; | |
}).config.system.build.isoImage; |
{ lib, config, pkgs, ... }: | |
with lib; | |
{ | |
options.v4l2 = mkEnableOption "Enable the confguration to use the reflex as a webcam"; | |
config = mkIf config.v4l2 { | |
# 20.03: v4l2loopback 0.12.5 is required for kernel >= 5.5 | |
# https://github.com/umlaeute/v4l2loopback/issues/257 |
Here are my working notes on getting a system up and running.
WARNING: You can run into a hidden problem that will prevent a correct partition setup and /etc/nixos/configuration.nix
from working: if you are setting up a UEFI system, then you need to make sure you boot into the NixOS installation from the UEFI partition of the bootable media. You may have to enter your BIOS boot selection menu to verify this. For example, if you setup a NixOS installer image on a flash drive, your BIOS menu may display several boot options from that flash drive: choose the one explicitly labeled with “UEFI”.
I used these resources:
#!/usr/bin/env python | |
from sys import argv, stdout | |
from os import system, remove, path | |
from urlparse import urlparse | |
import re | |
import dfu | |
import ssl | |
import math | |
import json | |
import getopt |
sudo LIBVA_DRIVER_NAME=iHD ffmpeg -crtc_id 69 -framerate 60 -f kmsgrab -i - -vaapi_device /dev/dri/renderD128 -filter:v hwmap,scale_vaapi=w=1920:h=1200:format=nv12 -c:v h264_vaapi -profile:v constrained_baseline -level:v 3.1 -b:v 20000k test.mp4
LIBVA_DRIVER_NAME=iHD ffmpeg -device /dev/dri/card0 -f kmsgrab -i - -vf 'hwmap=derive_device=vaapi,scale_vaapi=w=1920:h=1080:format=nv12' -c:v h264_vaapi -vstats output.mp4