Skip to content

Instantly share code, notes, and snippets.

View infinisil's full-sized avatar
🇯🇵
Vacationing

Silvan Mosberger infinisil

🇯🇵
Vacationing
  • Tweag
  • Switzerland
View GitHub Profile
{
services.nginx = {
enable = true;
virtualHosts."mac.infinisil.io" = {
locations."/" = {
proxyPass = "http://localhost:81";
};
};
};
}
#! /usr/bin/env nix-shell
#! nix-shell -Q -i bash -p teensy-loader-cli pass
password=$(pass MacBookAir | head -n 1)
result=$(nix-build --argstr PW1 "$password")
sudo teensy-loader-cli -mmcu=atmega32u4 -v -w "$result"/hex/*
src=$(nix-store -q --binding src "$result")
nix-store -q --roots "$src" | xargs rm
nix-store -q --referrers-closure "$src" | xargs nix-store --delete
with import <nixpkgs> {};
let
script = writeScript "test.hs" ''
#!/usr/bin/env runhaskell
import System.Environment
main = do
out <- getEnv "out"
writeFile out "test\n"
23996 23:03:27.891713 execve("/run/current-system/sw/bin/firefox", ["firefox"], [/* 68 vars */]) = 0
23996 23:03:27.892461 access("/etc/ld-nix.so.preload", R_OK) = -1 ENOENT (No such file or directory)
23996 23:03:27.892579 open("/run/opengl-driver/lib/tls/x86_64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
23996 23:03:27.892653 stat("/run/opengl-driver/lib/tls/x86_64", 0x7ffe05419170) = -1 ENOENT (No such file or directory)
23996 23:03:27.892710 open("/run/opengl-driver/lib/tls/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
23996 23:03:27.892775 stat("/run/opengl-driver/lib/tls", 0x7ffe05419170) = -1 ENOENT (No such file or directory)
23996 23:03:27.893240 open("/run/opengl-driver/lib/x86_64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
23996 23:03:27.893292 stat("/run/opengl-driver/lib/x86_64", 0x7ffe05419170) = -1 ENOENT (No such file or directory)
23996 23:03:27.893340 open("/run/opengl-driver/lib/libdl.so.2", O_RDONLY|O_CLOE
23:08:05.427582 execve("/run/current-system/sw/bin/firefox", ["firefox"], [/* 68 vars */]) = 0
23:08:05.428652 brk(NULL) = 0xb84000
23:08:05.428904 mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc7be662000
23:08:05.429151 access("/etc/ld-nix.so.preload", R_OK) = -1 ENOENT (No such file or directory)
23:08:05.429322 open("/run/opengl-driver/lib/tls/x86_64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
23:08:05.429506 stat("/run/opengl-driver/lib/tls/x86_64", 0x7ffdce1b2170) = -1 ENOENT (No such file or directory)
23:08:05.429683 open("/run/opengl-driver/lib/tls/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
23:08:05.429881 stat("/run/opengl-driver/lib/tls", 0x7ffdce1b2170) = -1 ENOENT (No such file or directory)
23:08:05.430030 open("/run/opengl-driver/lib/x86_64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
23:08:05.430205 stat("/run/opengl-driver/lib/x86_64", 0x7ffdce1b2170) = -1 ENOE
with import <nixpkgs> {};
cfg: ''
${lib.concatMapStringsSep "\n" (host: ''
Host ${host.alias}
HostName ${host.name}
${lib.optionalString (host?user) "User ${host.user}"}
${lib.optionalString (host?port) "Port ${host.port}"}
'') cfg.hosts}
''
{ config, pkgs, ... }:
# Custom packages
let
mozillaPkgsDir = (import <nixpkgs>{config={};}).fetchFromGitHub {
owner = "mozilla";
repo = "nixpkgs-mozilla";
rev = "1608d31f7e5b2415fb80b5d76f97c009507bc45f";
sha256 = "0mznf82k7bxpjyvigxvvwpmi6gvg3b30l58z36x192q2xxv47v1k";
fetchSubmodules = true;
{ config, pkgs, ... }:
# Custom packages
let
mozillaPkgsDir = (import <nixpkgs>{config={};}).fetchFromGitHub {
owner = "Infinisil";
repo = "nixpkgs-mozilla";
rev = "d13abfc71b2bbc6a6effda0b598c82b79c5e6512";
sha256 = "0panppfq354qgdq1hf8dimdmmfz36s85nfn4c6ila75icrsd1mx8";
fetchSubmodules = true;
{ config, pkgs, ... }:
# Custom packages
let
mozillaPkgsDir = (import <nixpkgs>{config={};}).fetchFromGitHub {
owner = "Infinisil";
repo = "nixpkgs-mozilla";
rev = "d13abfc71b2bbc6a6effda0b598c82b79c5e6512";
sha256 = "0panppfq354qgdq1hf8dimdmmfz36s85nfn4c6ila75icrsd1mx8";
fetchSubmodules = true;
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 447.1G 0 disk
├─sda1 8:1 0 200M 0 part
├─sda2 8:2 0 279.8G 0 part
├─sda3 8:3 0 619.9M 0 part
├─sda4 8:4 0 200M 0 part /boot
└─sda5 8:5 0 166.4G 0 part