Skip to content

Instantly share code, notes, and snippets.

View jackyliu16's full-sized avatar
😅
Damned, control freak

OneDragon424 jackyliu16

😅
Damned, control freak
View GitHub Profile
@hnaderi
hnaderi / reset-nix-proxy.sh
Created August 21, 2023 14:45
Set temporary proxy for nix-daemon
#!/usr/bin/env bash
rm /run/systemd/system/nix-daemon.service.d/proxy-override.conf
systemctl daemon-reload
systemctl restart nix-daemon
@giuseppe998e
giuseppe998e / nixos-btrfs-tmpfs.md
Last active February 6, 2026 19:17
Install NixOS with BTRFS and IN-RAM root

Install NixOS with BTRFS and IN-RAM root

1. Format and partition the hard drive

  1. Create the GPT partition table
    • $ parted /dev/sdX mklabel gpt
  2. Create the UEFI FAT32 partition (which will be /dev/sdXY)
    • $ parted /dev/sdX mkpart esp fat32 1MiB 512MiB
    • $ parted /dev/sdX set 1 esp on
    • $ parted /dev/sdX set 1 boot on
  • $ mkfs.fat -F 32 -n UEFI /dev/sdXY
@luochen1990
luochen1990 / shell.nix
Created February 14, 2022 08:49
(示例) 在 NixOS 中构建可用 pip 的 python 隔离环境
#!/usr/bin/env nix-shell
#! nix-shell shell.nix
{ pkgs ? import <nixpkgs> {} }:
(pkgs.buildFHSUserEnv {
name = "devbox";
targetPkgs = pkgs: (with pkgs; [
python38
python38Packages.pip
@iwalpola
iwalpola / stm32_gpio_reg.md
Last active January 27, 2026 10:33
STM32 GPIO registers cheatsheet