Skip to content

Instantly share code, notes, and snippets.

View sorki's full-sized avatar
🦊
Tying the Knots

Sorki sorki

🦊
Tying the Knots
View GitHub Profile
boot.kernel.sysctl = {
"net.ipv4.conf.all.forwarding" = true;
"net.ipv6.conf.all.forwarding" = true;
};
@sorki
sorki / ircbride.nix
Created November 26, 2023 17:01
ircbridge example
services.ircbridge = {
enable = true;
instances = {
staging.irc = {
nick = "ircbridge";
host = "localhost";
port = 6666;
channels = [
"#bottest"
];
@sorki
sorki / rmq.nix
Created November 26, 2023 16:53
rabbit
services.rabbitmq = {
enable = true;
configItems = {
"heartbeat" = "6";
"tcp_listen_options.keepalive" = "true";
"tcp_listen_options.send_timeout" = "1500"; # default is 15000
"management.tcp.ip" = "127.0.0.1";
"management.tcp.port" = "15672";
};
plugins = [ "rabbitmq_management" ];
@sorki
sorki / libvirt.nix
Created May 11, 2022 13:13
libvirt with statically configured bridge
# Module for configuring libvirt with static NixOS networking
# instead of using libvirt managed bridge.
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.virtualisation.libvirtd.networking;
v6Enabled = cfg.ipv6.network != null;
v6PLen = toInt (elemAt (splitString "/" cfg.ipv6.network) 1);
@sorki
sorki / displaced.hs
Created April 23, 2022 13:44
Displace implicit function
import Prelude
import Control.Applicative (pure)
import Graphics.Implicit
import Graphics.Implicit.Definitions
import Graphics.Implicit.Primitives
displaced
:: (Object obj vec)
=> (vec -> Double)
-> obj
@sorki
sorki / clxc.nix
Created December 20, 2021 10:55
nix-build '<nixpkgs/nixos>' -I nixos-config=clxc.nix -A config.system.build.tarball
{
imports = [
<nixpkgs/nixos/modules/virtualisation/lxc-container.nix>
];
nixpkgs = {
crossSystem.system = "armv7l-linux";
overlays = [
];
};
@sorki
sorki / ff.nix
Created July 27, 2021 09:36
FirejailedFox
{ config, pkgs, lib, ... }:
{
nixpkgs.overlays = [
(self: super: {
firejailedFirefox = super.stdenv.mkDerivation rec {
name = "firejailed-firefox-desktop-item";
dontBuild = true;
unpackPhase = "true";
desktopItem = super.makeDesktopItem {
@sorki
sorki / config.el
Created April 14, 2021 17:28
ledger-mode with hledger
(setq ledger-mode-should-check-version nil
ledger-report-links-in-register nil
ledger-report-auto-width nil
ledger-report-use-native-highlighting nil
ledger-binary-path "hledger")
@sorki
sorki / log.txt
Created February 23, 2021 13:21
NIX_PATH=nixpkgs=$( pwd ) nix-build nixos/tests/qemu-guest-agent.nix
starting VDE switch for network 1
running the VM test script
starting all VMs
machine: starting vm
machine # Formatting '/build/vm-state-machine/machine.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=536870912 lazy_refcounts=off refcount_bits=16
machine: QEMU running (pid 10)
(0.04 seconds)
machine: waiting for the X11 server
machine: waiting for the VM to finish booting
machine # c[?7lSeaBIOS (version rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org)
@sorki
sorki / bt.txt
Created February 23, 2021 08:28
lool dump
[root@vmlool:~]# coredumpctl debug
PID: 1775 (kit_spare_001)
UID: 997 (lool)
GID: 998 (lool)
Signal: 6 (ABRT)
Timestamp: Mon 2021-02-22 22:17:43 CET (5s ago)
Command Line: /run/wrappers/bin/loolforkit --losubpath=lo --systemplate=/var/lib/lool/systemplate --lotemplate=/var/lib/lool/lotemplate --childroot=/var/lib/lool/child-roots/ --clientport=9980 --masterport=loolwsd-dPpP0Kk9 --rlimits=limit_virt_mem_mb:0;limit_stack_mem_kb:8000;limit_file_size_mb:0;limit_num_open_files:0 --version
Executable: /nix/store/xy9ddi8gxdsqpd0vrrfx0ld1l4pagh3s-libreoffice-online-7.0.1.1/bin/loolforkit
Control Group: /system.slice/loolwsd.service
Unit: loolwsd.service