Skip to content

Instantly share code, notes, and snippets.

View JucaRei's full-sized avatar
:electron:
Focusing

JucaRei

:electron:
Focusing
View GitHub Profile
#Reference: https://www.smarthomebeginner.com/traefik-reverse-proxy-tutorial-for-docker
#Requirement: nano .env -> Set environmental variables: ${$USERDIR}, ${PUID}, ${PGID}, ${TZ}, ${DOMAINNAME}, ${CLOUDFLARE_EMAIL}, ${CLOUDFLARE_API_KEY}, ${HTTP_USERNAME}, ${HTTP_PASSWORD}, ${PLEX_CLAIM} etc. as explained in the reference.
version: "3.7"
services:
######### FRONTENDS ##########
# Traefik Reverse Proxy
traefik:

How to install nvidia-legacy-340xx-driver on Debian 12 Bookworm

This guide will show you how to download, compile and install the nvidia-legacy-340xx-driver on Debian 12. Some people install the driver directly from sid but this will mix packages from both stable and unstable which may create issues. It's recommended to update and upgrade your system before you start.

Step 1. Download the source code.

Install these packages.

sudo apt install build-essential fakeroot devscripts

You can manually download the source code from debian.org and go to Step 2 or continue with Step 1. Don't worry you won't be able to install packages from sid.
Add 'deb-src http://httpredir.debian.org/debian unstable main non-free contrib' to '/etc/apt/sources.list'.

@JucaRei
JucaRei / nixos-install.sh
Created February 3, 2024 04:13 — forked from kanashimia/nixos-install.sh
nixos unstable flake installation from nixos 20.09
#!/bin/sh
set -x
DEVICE=/dev/vda
SWAP_SIZE=2GiB
URI=github:kanashimia/nixos/module-refactor#personal-server
TYPE=legacy
trap "swapoff $DEVICE; umount /mnt/boot; umount /mnt; exit" INT
#!/usr/bin/env sh
# ____ _ _
#| __ ) _ _| |_| |_ __ _ _ __ ___
#| _ \| | | | __| __/ _` | '__/ __|
#| |_) | |_| | |_| || (_| | | \__ \
#|____/ \__,_|\__|\__\__,_|_| |___/
# _ _
# / \ _ __ ___| |__
@JucaRei
JucaRei / Readme.md
Created January 29, 2024 00:26 — forked from WhittlesJr/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

@JucaRei
JucaRei / README.md
Created January 12, 2024 02:23 — forked from matthewpi/README.md
Nix on Fedora

NixOS on Fedora

Please note that these instructions are not offically supported or condoned by Nix and are not guaranteed to always work, but from my testing everything seems to work perfectly fine.

These steps may not be required if NixOS/nix#2374 is resolved.

SELinux

These commands are required for both Fedora Workstation and Fedora Silverblue

@JucaRei
JucaRei / smb.conf
Created October 7, 2023 04:15 — forked from mafredri/smb.conf
Samba config for Open PS2 Loader (PlayStation 2)
# This setup works pretty well for OPL with a network link that travels through
# two UniFi switches and connects to a Samba server running inside Docker. The
# host OS is Debian with a ZFS filesystem and the container OS is also Debian.
# Latest Samba (4.11+).
[global]
# ======================
# General Samba settings
# ======================
log level = 1
@JucaRei
JucaRei / install-osx-high-sierra-command-line.sh
Created September 9, 2023 02:58 — forked from peacefixation/install-osx-high-sierra-command-line.sh
Install OS X High Sierra without converting to APFS file system
# create a USB installer
# https://support.apple.com/en-au/HT201372
Download the OS X High Sierra installer via the App Store, it will be installed into the /Applications directory
If it opens automatically, close it
Insert a USB stick (8GB+)
Run the following command where MyVolume is the name of the USB volume:
sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume
# boot the USB installer
@JucaRei
JucaRei / mpc-fade
Created September 8, 2023 20:24 — forked from Pablo1107/mpc-fade
A script to fade volume when toggling MPD via mpc based on lcpz's script.
#!/bin/sh
# A script to fade volume when toggling MPD via mpc
mpc=`which mpc`
SINKAPP="mpd"
SECS=2.0
sinks=$(pactl list sink-inputs)

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: