Skip to content

Instantly share code, notes, and snippets.

View punnie's full-sized avatar

Pedro Coelho punnie

View GitHub Profile
@punnie
punnie / Readme.md
Created December 21, 2023 00:17 — forked from techhazard/Readme.md
NixOS: PCI Passthrough

PCI Passthrough

Warning: unfinished (but successfull!)

I did PCI passthrough on Archlinux and Debian with the old PCI-stub method (this was pre-4.0 era). And later I did PCI passthrough on the 4.1+ kernels on Arch and Ubuntu (16.10 I think?).

This is my attempt at doing the same on Nixos.

Requirements

{
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
outputs = inputs@{ self, nixpkgs, ... }:
let
lib = nixpkgs.lib;
darwin = [ "x86_64-darwin" "aarch64-darwin" ];
linux = [ "x86_64-linux" "aarch64-linux" ];
allSystems = darwin ++ linux;
{
allowUnfree = true;
}
root = /Users/punnie/Library/Mobile Documents/iCloud~com~appsonthemove~beorg/Documents/org
root = /Users/punnie/Org
path = .
repeat = watch
auto = true
batch = true
;; -*- mode: emacs-lisp; lexical-binding: t -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Layer configuration:
This function should only modify configuration layer settings."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
;; `+distribution'. For now available distributions are `spacemacs-base'
BEGIN MESSAGE.
m4KxwBrmmQ4hBms lYc9x2LeKQtBnCa wKq0hUn5nPL25Yo w8RvaRJac8s3XT4
xThuF90DeBzOuLX cuO0BQI6xFDTCKq 6Xr2MZHgg7FCyZY V19LHxeHujCRNVU
ukDfDCK1IPf7n7W oaEmyuCkZNstdEL 2hl5p035ggsuK9U bE8q1rkPtWgQ7Ml
Inw9GyQv4OYvQVM r6h6gvogVBKmN8r JGUTK21.
END MESSAGE.

Text can be bold, italic, or strikethrough.

Link to another page.

There should be whitespace between paragraphs.

There should be whitespace between paragraphs. We recommend including a README, or a file with information about your project.

Header 1

This file has been truncated, but you can view the full file.
{
"A": {
"candidates": {
"Aveiro": {
"main": [
{
"biography": "",
"biography_source": "",
"is_lead_candidate": true,
"link_parlamento": "",

Hi every person in Palácio's IdeiaHub,

I'm Pedro Coelho, a software engineer with a desk in there somewhere. So great to meet you all!

Thought I'd take the chance to treat yourselves with a fantastic FIVE MINUTE EMAILING MULTIPLE PEOPLE WORKSHOP, in which I give you some great pointers about how to convey information to a group of people via email.

This mini tutorial is divided into convenient bite sized sections that you may peruse as you will.

1. What are those pesky email fields? To? CC? BCC? What BS!

@punnie
punnie / postgresql.conf
Last active July 10, 2018 15:21 — forked from davidblewett/postgresql.conf
ZFS & PostgreSQL replication
# The following are suggested values
# They should be set in all configs,
# so that if a secondary needs to be promoted
# it will be generating the correct WAL level
wal_level = hot_standby
archive_mode = on # allows archiving to be done
# (change requires restart)
archive_command = 'cp -f %p /data/pgsql/archive/%f </dev/null' # command to use to archive a logfile segment
max_wal_senders = 5 # max number of walsender processes
# (change requires restart)