Skip to content

Instantly share code, notes, and snippets.

Avatar

Jörg Thalheim Mic92

View GitHub Profile
View gist:019bb8e1950c82c894bd5ace705c7486
diff --git a/test/test-network/conf/25-tun.network b/test/test-network/conf/25-tun.network
new file mode 100644
index 0000000000..bbfba362b3
--- /dev/null
+++ b/test/test-network/conf/25-tun.network
@@ -0,0 +1,5 @@
+[Match]
+Name=tun99
+
+[Network]
View gist:2b95fb7b52b872a1565351214e9108d2
diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c
index d4d4182ee5..3b1fa5848b 100644
--- a/src/network/networkd-dhcp6.c
+++ b/src/network/networkd-dhcp6.c
@@ -1391,7 +1391,7 @@ int dhcp6_configure(Link *link) {
assert(link);
assert(link->network);
- if (!link_dhcp6_enabled(link) && !link_ipv6_accept_ra_enabled(link))
+ if (!link_dhcp6_enabled(link) && (!link_ipv6_accept_ra_enabled(link) || !link->hw_addr.length))
@Mic92
Mic92 / shell.nix
Last active Oct 28, 2020
Development environment to hack on llvm/clang
View shell.nix
with import <nixpkgs> {};
let
gccForLibs = stdenv.cc.cc;
libc_lib = getLib stdenv.cc.libc;
in stdenv.mkDerivation {
name = "env";
buildInputs = [
bashInteractive
ninja
cmake
View nginx-config
#!/usr/bin/env nix-shell
#!nix-shell -p nginx-config-formatter python3 -i python3
import os
import re
import shutil
import subprocess
import sys
from tempfile import TemporaryDirectory
View minutes-draft.md

not sure who started it => Outcome of one of the Berlin meetups ==> tomes of machines, where the hardware config was in multiple repos, It was expected that things are breaking with different nixos versions

Not easy to keep in sync with nixos channels

remove/add for different channels to make it work

Ideally, hardware-specific modules should only contain configuration that cannot be autodetected, e.g. no "enable Intel microcode" config. So quirks etc.

View flake.nix
{
description = "Simple overlay flake";
inputs.nixpkgs.url = "nixpkgs/release-20.03";
outputs = inputs@{ self, nixpkgs }: {
apps.wine.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.wine.override ({
wineRelease = "staging";
wineBuild = "wineWow";
});
View prebuild-nix-shell.nix
with import <nixpkgs> {};
let
shell = stdenv.mkDerivation {
name = "env";
dontUnpack = true;
installPhase = "touch $out";
buildInputs = [
tree
];
};
@Mic92
Mic92 / ssh-to-gpg.go
Last active Jul 9, 2020
Convert ssh private keys i.e. /etc/ssh/ssh_host_rsa_key to gpg
View ssh-to-gpg.go
package main
import (
"crypto"
"crypto/rsa"
"fmt"
"io/ioutil"
"os"
"reflect"
"time"
@Mic92
Mic92 / default.nix
Last active Jul 2, 2020
stdenv with -nostdinc support
View default.nix
with import <nixpkgs> {};
let
libcPattern =
builtins.replaceStrings ["/"] ["\\/"] "${gcc.libc_dev}/include";
gcc' = wrapCCWith {
cc = gcc.cc;
bintools = binutils;
extraBuildCommands = ''
cat >> $out/nix-support/add-flags.sh <<'EOF'
if [[ "$@" = *-nostdinc* ]]; then
View graphen.nix
with import <nixpkgs> {};
let
mbedtlsVersion = "2.21.0";
mbedtls = fetchurl {
url = "https://github.com/ARMmbed/mbedtls/archive/mbedtls-${mbedtlsVersion}.tar.gz";
sha256 = "1f9dc0hpmp4g3l90wlk3glx5xl0hnnabmjagmr8fdbcnfl5r63ij";
};
mbedcryptoVersion = "3.1.0";
mbedcrypto = fetchurl {
url = "https://github.com/ARMmbed/mbed-crypto/archive/mbedcrypto-${mbedcryptoVersion}.tar.gz";
You can’t perform that action at this time.