Skip to content

Instantly share code, notes, and snippets.

@mfenniak
mfenniak / immich.nix
Last active July 11, 2024 19:32
NixOS configuration for Immich, based upon upstream docker-compose.yml
{ config, ... }:
let
immichHost = "immich.example.com"; # TODO: put your immich domain name here
immichRoot = "/tank/immich"; # TODO: Tweak these to your desired storage locations
immichPhotos = "${immichRoot}/photos";
immichAppdataRoot = "${immichRoot}/appdata";
immichVersion = "release";
immichExternalVolume1 = "/tank/BackupData/Google Photos/someone@example.com"; # TODO: if external volumes are desired

Setting up qemu VM using nix flakes

Did you know that it is rather easy to setup a VM to test your NixOs configuration?

Create simple flake:

# flake.nix
{
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
@kconner
kconner / macOS Internals.md
Last active July 7, 2024 19:42
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

Karabiner layouts for symbols and navigation

Gavin Sinclair, January 2022

Introduction

I use Karabiner (configured with Gosu) to make advanced key mappings on my Apple computer. Karabiner allows you to create “layers”, perhaps simulating those on a programmable mechanical keyboard. I make good use of these layers to give me easy access (home-row or nearby) to all symbols and navigational controls, and even a numpad.

The motivation is to keep hand movement to a minimum. Decades of coding on standard keyboards has unfortunately left me with hand and wrist pain. I will soon enough own a small split keyboard which will force me to use layers to access symbols etc., so this Karabiner solution, which has evolved over months, is a training run for that.

@jmatsushita
jmatsushita / README
Last active July 16, 2024 10:30
Setup nix, nix-darwin and home-manager from scratch on an M1 Macbook Pro
###
### [2023-06-19] UPDATE: Just tried to use my instructions again on a fresh install and it failed in a number of places.
###. Not sure if I'll update this gist (though I realise it seems to still have some traffic), but here's a list of
###. things to watch out for:
### - Check out the `nix-darwin` instructions, as they have changed.
### - There's a home manager gotcha https://github.com/nix-community/home-manager/issues/4026
###
# I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs).
# So here's a minimal Gist which worked for me as an install on a new M1 Pro.
@manning-ncsa
manning-ncsa / Readme.rst
Created April 18, 2021 17:59
Syncthing deployment on Kubernetes

Syncthing Device for a Persistent Peer

Overview

Syncthing provides a way to share arbitrary numbers of files between any number of people without the need for a central server. It is a peer-to-peer (P2P) application that automagically syncs files in the background. This deployment app launches a Syncthing "device" (Persistent Peer) that offers a high-availability peer for members of a team to include in their file shares.

For example, imagine there are three people in a team who want to share various folders with each other during the course of their work. They can accomplish this with Syncthing using only their three workstations, by exchanging Device IDs and sharing the folders. However, what if one person modifies or adds a file while the other two are offline, and then that person goes offline before the other two come online? In that event, they would not receive the update. This is where a Persistent Peer is helpful, because in

@sxiii
sxiii / readme.md
Created March 4, 2021 19:40
How to launch games via Proton from CLI (useful for debug)

How to launch games via Proton from CLI (useful for debug)

In just 2 steps

First. Run this:

export STEAM_COMPAT_DATA_PATH=~/.local/share/Steam/steamapps/compatdata

Second. Now in the same terminal, run your game (this example: Raft)

~/.local/share/Steam/steamapps/common/Proton\ 5.13/proton run ~/.local/share/Steam/steamapps/common/Raft/Raft.exe

@chrisanthropic
chrisanthropic / nixos-raspi4.md
Last active March 12, 2024 13:39
NixOS + Raspi4

Download the image builder

  • git clone git@github.com:Robertof/nixos-docker-sd-image-builder.git
  • cd nixos-docker-sd-image-builder

Configure for Raspi4

  • modify /config/rpi4/default.nix to increase size of boot partition
    • this step is optional but I ran out of space in /boot pretty quickly with the default setting since I'm still learning and rebuilding a lot. Let's leave some room for trial & error.
    • sdImage.firmwareSize = 1024;
  • modify /config/sd-image.nix
  • ./rpi3 becomes ./rpi4
@ruanbekker
ruanbekker / tree_style_tab_firefox.md
Created November 28, 2019 06:18
Hide Native Tabs with Tree Style Tabs for Firefox
@arolle
arolle / README.md
Created July 13, 2018 06:58
Notes in the Terminal like in Notational Velocity

Notes in the Terminal like in Notational Velocity

The way that Notational Velocity allows to manage your notes is genious, but only available to macOS users. That software presents a list of your notes next to the editable preview of a the selected note and a powerful full-text search filters the list of notes. As all the notes are stored as plain text files they can easily synchronized. This article presents an alternative note managing tool that works for major operating systems, is free and open source.

The setup combines ranger and ones' favourite