Compare commits
No commits in common. "f0b30d4b8d883e29e9c1d9f2b266691fa01a4964" and "9ea29fce3ff17155b5ac9ba1df097f772236e886" have entirely different histories.
f0b30d4b8d
...
9ea29fce3f
8 changed files with 168 additions and 31 deletions
1
.envrc
Normal file
1
.envrc
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
jj git fetch
|
||||||
|
|
@ -170,13 +170,9 @@
|
||||||
"net.core.wmem_max_default" = 67108864;
|
"net.core.wmem_max_default" = 67108864;
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.nvidia-container-toolkit.enable = true;
|
|
||||||
virtualisation.docker = {
|
virtualisation.docker = {
|
||||||
daemon.settings = {
|
daemon.settings = {
|
||||||
features = {
|
features.buildkit = true;
|
||||||
buildkit = true;
|
|
||||||
cdi = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
enable = true;
|
enable = true;
|
||||||
# storageDriver =
|
# storageDriver =
|
||||||
|
|
|
||||||
36
flake.lock
generated
36
flake.lock
generated
|
|
@ -169,11 +169,11 @@
|
||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1778551011,
|
"lastModified": 1778169829,
|
||||||
"narHash": "sha256-woJV7tJwwzjR0xWDNuGpwMENe/OEMAdSGg+nqWs9tUE=",
|
"narHash": "sha256-p9CY3iCpTIzIDAnGv6cp+/ckRqs1G5wFSZcUtiEaM6Y=",
|
||||||
"owner": "helix-editor",
|
"owner": "helix-editor",
|
||||||
"repo": "helix",
|
"repo": "helix",
|
||||||
"rev": "8c41b11607924f7584b77c8a6e6b16439a2f559f",
|
"rev": "7d92fbdadf3cdadd5d0d1e27c234c10b74c6613c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -210,11 +210,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1778681890,
|
"lastModified": 1778144356,
|
||||||
"narHash": "sha256-RK4sTgei29wBzLu+e4ljeixKutWhbMygFsdxdFKpZOU=",
|
"narHash": "sha256-dGM+QCstz/DyLB68+JK5GWyMx4QSqmOJEVgZmy63d/g=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "7654d90b94bab7eba3a52fd6f73b3f5a4c544fa2",
|
"rev": "e4419d3123b780d5f4c0bceeace450424387638c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -288,11 +288,11 @@
|
||||||
},
|
},
|
||||||
"nixos": {
|
"nixos": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1778430510,
|
"lastModified": 1778003029,
|
||||||
"narHash": "sha256-Ti+ZBvW6yrWWAg2szExVTwCd4qOJ3KlVr1tFHfyfi8Q=",
|
"narHash": "sha256-q/nkKLDtHIyLjZpKhWk3cSK5IYsFqtMd6UtXF3ddjgA=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "8fd9daa3db09ced9700431c5b7ad0e8ba199b575",
|
"rev": "0c88e1f2bdb93d5999019e99cb0e61e1fe2af4c5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -319,11 +319,11 @@
|
||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1778593042,
|
"lastModified": 1778143761,
|
||||||
"narHash": "sha256-xYGrSg6354UK2K4WSQd4+TfyvfqmvFbSY+ZtGQUXK0c=",
|
"narHash": "sha256-lkesY6x2X2qxlqLM7CT2iM/0rP2JB7fruPN3h8POXmI=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "9bd7c80d43e258aaa607d83b43661df11444d808",
|
"rev": "3bcaa367d4c550d687a17ac792fd5cda214ee871",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -427,11 +427,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1778443072,
|
"lastModified": 1777954456,
|
||||||
"narHash": "sha256-zi7/fsqM/kFdNuED//4WOCUtezGtKKqRNORjMvfwjnA=",
|
"narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "da5ad661ba4e5ef59ba743f0d112cbc30e474f32",
|
"rev": "549bd84d6279f9852cae6225e372cc67fb91a4c1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -501,11 +501,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1778585655,
|
"lastModified": 1778218381,
|
||||||
"narHash": "sha256-yfxy9aTlIgU2Z36H8cJURgYLgjT4qvFeOzoAC/HXcKM=",
|
"narHash": "sha256-mhxT7KkmM0h/vgr84o2p6gkzm21b5/dCnIMVKaoXU+I=",
|
||||||
"owner": "0xc000022070",
|
"owner": "0xc000022070",
|
||||||
"repo": "zen-browser-flake",
|
"repo": "zen-browser-flake",
|
||||||
"rev": "42f41abcef13dc81c85407b57aa1fd1bde46e46c",
|
"rev": "ea79f20a194de74504821ab53e93c0cf92690f00",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,6 @@ in {
|
||||||
environment.shells = with pkgs; [nushell];
|
environment.shells = with pkgs; [nushell];
|
||||||
|
|
||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
nerd-fonts.iosevka-term
|
|
||||||
iosevka
|
iosevka
|
||||||
libertine
|
libertine
|
||||||
inconsolata
|
inconsolata
|
||||||
|
|
@ -177,8 +176,6 @@ in {
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
verbose = true;
|
verbose = true;
|
||||||
backupFileExtension = ".hm-bak";
|
backupFileExtension = ".hm-bak";
|
||||||
overwriteBackup = true;
|
users.tao = import ./tao/HOME.nix {inherit inputs pkgs lib config;};
|
||||||
extraSpecialArgs = {inherit inputs;};
|
|
||||||
users.tao = import ./tao/HOME.nix;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -140,8 +140,6 @@ in {
|
||||||
|
|
||||||
hr-seek = "yes";
|
hr-seek = "yes";
|
||||||
|
|
||||||
audio-device = "alsa";
|
|
||||||
|
|
||||||
hwdec = "auto";
|
hwdec = "auto";
|
||||||
vo = "gpu-next";
|
vo = "gpu-next";
|
||||||
|
|
||||||
|
|
|
||||||
146
users/tao/direnv/devenv.sh
Normal file
146
users/tao/direnv/devenv.sh
Normal file
|
|
@ -0,0 +1,146 @@
|
||||||
|
# shellcheck shell=bash
|
||||||
|
# adapted from https://github.com/nix-community/nix-direnv/blob/master/direnvrc
|
||||||
|
|
||||||
|
REQUIRED_DIRENV_VERSION="2.21.3"
|
||||||
|
|
||||||
|
_nix_direnv_preflight () {
|
||||||
|
if [[ -z "$direnv" ]]; then
|
||||||
|
printf '%s\n' "\$direnv environment variable was not defined. Was this script run inside direnv?"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z ${DEVENV_BIN:-} ]]; then
|
||||||
|
DEVENV_BIN=$(command -v devenv)
|
||||||
|
if [[ -z "${DEVENV_BIN}" ]]; then
|
||||||
|
log_error "command not found: devenv, see https://devenv.sh/getting-started/"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! has direnv_version || ! direnv_version "$REQUIRED_DIRENV_VERSION" 2>/dev/null; then
|
||||||
|
log_error "base direnv version is older than the required v$REQUIRED_DIRENV_VERSION."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
local layout_dir
|
||||||
|
layout_dir=$(direnv_layout_dir)
|
||||||
|
|
||||||
|
if [[ ! -d "$layout_dir" ]]; then
|
||||||
|
mkdir -p "$layout_dir"
|
||||||
|
fi
|
||||||
|
|
||||||
|
export DEVENV_DIRENVRC_VERSION=1
|
||||||
|
export DEVENV_DIRENVRC_ROLLING_UPGRADE=1
|
||||||
|
}
|
||||||
|
|
||||||
|
_nix_export_or_unset() {
|
||||||
|
local key=$1 value=$2
|
||||||
|
if [[ "$value" == __UNSET__ ]]; then
|
||||||
|
unset "$key"
|
||||||
|
else
|
||||||
|
export "$key=$value"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
_nix_import_env() {
|
||||||
|
local env=$1
|
||||||
|
|
||||||
|
# Note which environments are active, but make sure we don't repeat them
|
||||||
|
if [[ ! "''${DIRENV_ACTIVE-}" =~ (^|:)"$PWD"(:|$) ]]; then
|
||||||
|
export DIRENV_ACTIVE="$PWD:''${DIRENV_ACTIVE-}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
local old_nix_build_top=${NIX_BUILD_TOP:-__UNSET__}
|
||||||
|
local old_tmp=${TMP:-__UNSET__}
|
||||||
|
local old_tmpdir=${TMPDIR:-__UNSET__}
|
||||||
|
local old_temp=${TEMP:-__UNSET__}
|
||||||
|
local old_tempdir=${TEMPDIR:-__UNSET__}
|
||||||
|
local old_xdg_data_dirs=${XDG_DATA_DIRS:-}
|
||||||
|
eval "$env"
|
||||||
|
# `nix print-dev-env` will create a temporary directory and use it as TMPDIR
|
||||||
|
# We cannot rely on this directory being available at all times,
|
||||||
|
# as it may be garbage collected.
|
||||||
|
# Instead - just remove it immediately.
|
||||||
|
# Use recursive & force as it may not be empty.
|
||||||
|
if [[ -n "${NIX_BUILD_TOP+x}" && "$NIX_BUILD_TOP" == */nix-shell.* && -d "$NIX_BUILD_TOP" ]]; then
|
||||||
|
rm -rf "$NIX_BUILD_TOP"
|
||||||
|
fi
|
||||||
|
|
||||||
|
_nix_export_or_unset NIX_BUILD_TOP "$old_nix_build_top"
|
||||||
|
_nix_export_or_unset TMP "$old_tmp"
|
||||||
|
_nix_export_or_unset TMPDIR "$old_tmpdir"
|
||||||
|
_nix_export_or_unset TEMP "$old_temp"
|
||||||
|
_nix_export_or_unset TEMPDIR "$old_tempdir"
|
||||||
|
local new_xdg_data_dirs=${XDG_DATA_DIRS:-}
|
||||||
|
export XDG_DATA_DIRS=
|
||||||
|
local IFS=:
|
||||||
|
for dir in $new_xdg_data_dirs${old_xdg_data_dirs:+:}$old_xdg_data_dirs; do
|
||||||
|
dir="${dir%/}" # remove trailing slashes
|
||||||
|
if [[ :$XDG_DATA_DIRS: = *:$dir:* ]]; then
|
||||||
|
continue # already present, skip
|
||||||
|
fi
|
||||||
|
XDG_DATA_DIRS="$XDG_DATA_DIRS${XDG_DATA_DIRS:+:}$dir"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
nix_direnv_watch_file() {
|
||||||
|
log_error "nix_direnv_watch_file is deprecated. Use watch_file instead."
|
||||||
|
watch_file "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
_devenv_watches() {
|
||||||
|
local path=$1
|
||||||
|
local -n _watches=$2
|
||||||
|
if [[ -f "$path" ]]; then
|
||||||
|
while IFS= read -r file; do
|
||||||
|
file=$(printf "$file")
|
||||||
|
_watches+=("$file")
|
||||||
|
done < "$path"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
use_devenv() {
|
||||||
|
_nix_direnv_preflight
|
||||||
|
|
||||||
|
flake_expr="${1:-.}"
|
||||||
|
flake_dir="${flake_expr%#*}"
|
||||||
|
env_deps_path="$flake_dir/.devenv/input-paths.txt"
|
||||||
|
|
||||||
|
local default_watches
|
||||||
|
default_watches=(".envrc" "$HOME/.direnvrc" "$HOME/.config/direnv/direnvrc")
|
||||||
|
|
||||||
|
if [[ -d "$flake_dir" ]]; then
|
||||||
|
default_watches+=("$flake_dir/devenv.nix" "$flake_dir/devenv.lock" "$flake_dir/devenv.yaml" "$flake_dir/devenv.local.nix")
|
||||||
|
|
||||||
|
if [[ -f "$flake_dir/devenv.yaml" ]]; then
|
||||||
|
if ! devenv assemble; then
|
||||||
|
log_error "$(devenv version) failed to parse devenv.yaml, make sure to use version 0.6 or newer and fix the errors above."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Watch the default files.
|
||||||
|
# Even if evaluation fails, these files should still trigger a reload.
|
||||||
|
watch_file "${default_watches[@]}"
|
||||||
|
|
||||||
|
# Fetch and watch files that affect the env
|
||||||
|
local env_watches
|
||||||
|
_devenv_watches "$env_deps_path" env_watches
|
||||||
|
watch_file "${env_watches[@]}"
|
||||||
|
|
||||||
|
# Build the environment
|
||||||
|
local env
|
||||||
|
if ! env=$("${DEVENV_BIN}" print-dev-env); then
|
||||||
|
log_error "failed to build the devenv environment. devenv.nix may contain errors. see above."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Re-watch files that affect the env
|
||||||
|
local env_watches
|
||||||
|
_devenv_watches "$env_deps_path" env_watches
|
||||||
|
watch_file "${env_watches[@]}"
|
||||||
|
|
||||||
|
# Import the environment
|
||||||
|
_nix_import_env "$env"
|
||||||
|
}
|
||||||
|
|
@ -10,7 +10,6 @@ export alias follow = readlink -f
|
||||||
export alias p = pueue
|
export alias p = pueue
|
||||||
export alias snapper = snapper -c home
|
export alias snapper = snapper -c home
|
||||||
export alias zl = zellij
|
export alias zl = zellij
|
||||||
export alias wssh = wezterm ssh
|
|
||||||
|
|
||||||
export def today-iso [] { date now | format date %F }
|
export def today-iso [] { date now | format date %F }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
local config = {
|
local config = {
|
||||||
font = wezterm.font 'IosevkaTerm Nerd Font',
|
font = wezterm.font 'Iosevka',
|
||||||
color_scheme = 'GruvboxDarkHard',
|
color_scheme = 'GruvboxDarkHard',
|
||||||
window_decorations = "NONE",
|
window_decorations = "NONE",
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue