Skip to content

Instantly share code, notes, and snippets.

@Quince-Pie
Quince-Pie / fish_prompt.fish
Created March 15, 2025 01:00
`nix shell` Indicator for Fish
function fish_prompt
# Add nix shell indicator if we're in one
set -l nix_indicator ""
set -l sub_by 3
if set -q ZELLIJ
set sub_by (math $sub_by + 1)
end
if test $SHLVL -ge $sub_by
set -l nix_level (math $SHLVL - $sub_by)
if test $nix_level -gt 0
@Quince-Pie
Quince-Pie / osx_nfs.md
Created September 17, 2024 00:37
OSX Mounting NFS Volume

MacOS NFS Mount Instruction

Doing nfs through fstab seem to be incosistent, especially after waking up from sleep.

An alternative is using automount:

  • In /etc/auto_master add:
/Volumes/mnt auto_nfs
@Quince-Pie
Quince-Pie / doasedit.fish
Created January 21, 2024 12:24
doasedit in Fish shell
function doasedit -d "A sudoedit alternative for doas"
set -l filename $argv[1]
if test -z "$filename"
echo "Usage: doasedit <file>"
return 1
end
set -l ext (path extension $argv[1])
set -l editor $EDITOR
if test -z "$editor"
@Quince-Pie
Quince-Pie / flake.nix
Last active October 11, 2023 05:53
Flake Template: Flexible C Development Environments with LLVM16 and GCC 13
{
description = "Flexible C Development Environments with LLVM16 and GCC 13";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];