Skip to content

Instantly share code, notes, and snippets.

View chrisanthropic's full-sized avatar

cbot chrisanthropic

View GitHub Profile
@chrisanthropic
chrisanthropic / configuration.nix
Last active May 25, 2020 21:39
nixos-raspi4-configuration.nix
{ config, libs, pkgs, ... }:
{
#################
## NixOS Version
#################
system.stateVersion = "20.03";
###########
## Imports
@chrisanthropic
chrisanthropic / nixos-raspi4.md
Last active August 14, 2024 17:01
NixOS + Raspi4

Download the image builder

  • git clone [email protected]: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
@chrisanthropic
chrisanthropic / gist:60ca50a799a20966d9a315e3f4bf303c
Created January 25, 2017 23:36
Bash code to create Plex Token
token=$(curl -H "Content-Length: 0" -H "X-Plex-Client-Identifier: PlexInTheCloud" -u "${plexUsername}":"${plexPassword}" -X POST https://my.plexapp.com/users/sign_in.xml | cut -d "\"" -s -f22 | tr -d '\n')
# Grab the Plex Section ID of our new TV show library
tvID=$(curl -H "X-Plex-Token: ${token}" http://127.0.0.1:32400/library/sections | grep "show" | grep "title=" | awk -F = '{print $6" "$7" "$8}' | sed 's/ art//g' | sed 's/title//g' | sed 's/type//g' | awk -F \" '{print "Section=\""$6"\" ID="$2}' | cut -d '"' -f2)
@chrisanthropic
chrisanthropic / ubooquity.conf
Created February 17, 2016 23:05
Ubooquity.conf for Synology
#/etc/init/ubooquity.conf
start on started httpd-user
stop on runlevel [06]
exec /var/packages/java7/target/jre/bin/java -Dfile.encoding=UTF-8 -jar -Xmx512m /var/packages/Ubooquity/Ubooquity.jar -port 2202 -webadmin -headless -workdir "/volume1/comics"