Compare commits

..

No commits in common. "f0b30d4b8d883e29e9c1d9f2b266691fa01a4964" and "0febca345b5f08b90db44f7bfc4385416a3dc5ef" have entirely different histories.

18 changed files with 244 additions and 174 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
jj git fetch

View file

@ -15,7 +15,6 @@
# }; # };
programs.qgroundcontrol.enable = true; programs.qgroundcontrol.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
chromium
claude-code claude-code
# keep-sorted start sticky_comments=no # keep-sorted start sticky_comments=no
# act # act
@ -158,25 +157,11 @@
services.udev.extraRules = '' services.udev.extraRules = ''
SUBSYSTEM == "tty", GROUP="dialout", ATTRS{interface}=="Black Magic GDB Server", SYMLINK+="ttyBmpGdb" SUBSYSTEM == "tty", GROUP="dialout", ATTRS{interface}=="Black Magic GDB Server", SYMLINK+="ttyBmpGdb"
SUBSYSTEM == "tty", GROUP="dialout", ATTRS{interface}=="Black Magic UART Port", SYMLINK+="ttyBmpTarg" SUBSYSTEM == "tty", GROUP="dialout", ATTRS{interface}=="Black Magic UART Port", SYMLINK+="ttyBmpTarg"
# mobili
KERNEL=="js[0-9]*", MODE="0666"
''; '';
boot.kernel.sysctl = {
"net.core.rmem_max" = 67108864;
"net.core.wmem_max" = 67108864;
"net.core.rmem_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 =

View file

@ -1,10 +1,4 @@
{ {pkgs, ...}: {
pkgs,
inputs,
...
}: let
pkgs-last-building = inputs.nixpkgs-last-building.legacyPackages.${pkgs.system};
in {
# aagl.url = "github:ezKEa/aagl-gtk-on-nix"; # aagl.url = "github:ezKEa/aagl-gtk-on-nix";
# aagl.inputs.nixpkgs.follows = "nixpkgs"; # aagl.inputs.nixpkgs.follows = "nixpkgs";
@ -15,27 +9,24 @@ in {
ui.enable = true; ui.enable = true;
}; };
environment.systemPackages = environment.systemPackages = with pkgs; [
(with pkgs-last-building; [ # keep-sorted start
# lutris # parsec-bin
]) # yuzu # nintendo can suck the shit out of my asshole
++ (with pkgs; [ easyeffects
# keep-sorted start gamemode
# parsec-bin graalvmPackages.graalvm-ce
# yuzu # nintendo can suck the shit out of my asshole heroic
easyeffects lutris
gamemode mangohud
graalvmPackages.graalvm-ce osu-lazer-bin
heroic prismlauncher
mangohud protonup-qt
osu-lazer-bin r2modman
prismlauncher temurin-jre-bin-17
protonup-qt wine
r2modman # keep-sorted end
temurin-jre-bin-17 ];
wine
# keep-sorted end
]);
networking.firewall.allowedTCPPorts = [25565]; networking.firewall.allowedTCPPorts = [25565];

View file

@ -5,7 +5,7 @@
type = "cifs"; type = "cifs";
mountConfig = { mountConfig = {
# Options = "noauto,noatime,async,users,rw,x-systemd.automount,credentials=${config.age.secrets.uwuraid.path},file_mode=0777,dir_mode=0777"; # Options = "noauto,noatime,async,users,rw,x-systemd.automount,credentials=${config.age.secrets.uwuraid.path},file_mode=0777,dir_mode=0777";
Options = "_netdev,noserverino,nounix,nobrl,noperm,noauto,noatime,async,users,rw,x-systemd.automount,x-systemd.requires=network-online.target,nofail,soft,credentials=${config.age.secrets.uwuraid.path},file_mode=0777,dir_mode=0777"; Options = "_netdev,noserverino,noauto,noatime,async,users,rw,x-systemd.automount,x-systemd.requires=network-online.target,nofail,soft,credentials=${config.age.secrets.uwuraid.path},file_mode=0777,dir_mode=0777";
}; };
}; };
in [ in [

114
flake.lock generated
View file

@ -30,12 +30,12 @@
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"lastModified": 1778179392, "lastModified": 1774669632,
"narHash": "sha256-W6zorvjBYbzMNvqKIqCdpDF4rq3gj50Xximl56YM9/I=", "narHash": "sha256-OHRHymsM6sX0B7Xjpvf3m49vTgKzJGukJhw/O1O5bj4=",
"rev": "efd54faa68be8cd777b5c28cab11e638998a0853", "rev": "2edae0b5150c83c07cf7b7e86e937ad956d78197",
"revCount": 416, "revCount": 410,
"type": "tarball", "type": "tarball",
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/determinate/0.1.416%2Brev-efd54faa68be8cd777b5c28cab11e638998a0853/019e03c3-8bbc-7443-bd6d-c787773c6154/source.tar.gz?rev=efd54faa68be8cd777b5c28cab11e638998a0853&revCount=416" "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/determinate/0.1.410%2Brev-2edae0b5150c83c07cf7b7e86e937ad956d78197/019d3291-0e4f-7484-aaae-6a10dd00f832/source.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
@ -45,37 +45,37 @@
"determinate-nixd-aarch64-darwin": { "determinate-nixd-aarch64-darwin": {
"flake": false, "flake": false,
"locked": { "locked": {
"narHash": "sha256-z4mCqKI3Qd6weuHrlfzGccJG0giym/VJhKv20ijRSs0=", "narHash": "sha256-T5PoERn2FTupvCwGmQhbYO/oQ0w+51nRn+0QRbnA9tg=",
"type": "file", "type": "file",
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.20.0/macOS" "url": "https://install.determinate.systems/determinate-nixd/tag/v3.17.2/macOS"
}, },
"original": { "original": {
"type": "file", "type": "file",
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.20.0/macOS" "url": "https://install.determinate.systems/determinate-nixd/tag/v3.17.2/macOS"
} }
}, },
"determinate-nixd-aarch64-linux": { "determinate-nixd-aarch64-linux": {
"flake": false, "flake": false,
"locked": { "locked": {
"narHash": "sha256-yW+VNepSRytzfanSssPMJPvwioCcmlZYaBX8++UFkAk=", "narHash": "sha256-T0iRt3f+2Q+KUU1VzdGiG6GluViuxuKr+bMG5eVtPO0=",
"type": "file", "type": "file",
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.20.0/aarch64-linux" "url": "https://install.determinate.systems/determinate-nixd/tag/v3.17.2/aarch64-linux"
}, },
"original": { "original": {
"type": "file", "type": "file",
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.20.0/aarch64-linux" "url": "https://install.determinate.systems/determinate-nixd/tag/v3.17.2/aarch64-linux"
} }
}, },
"determinate-nixd-x86_64-linux": { "determinate-nixd-x86_64-linux": {
"flake": false, "flake": false,
"locked": { "locked": {
"narHash": "sha256-+L102C3Hhkd1GlXmRm2eLTLsZKBxEvooiQZFqQRlBf0=", "narHash": "sha256-FDeJY4hugYM0+vB2rvKY8WpYgPNH7kNS0M082Rnk/CI=",
"type": "file", "type": "file",
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.20.0/x86_64-linux" "url": "https://install.determinate.systems/determinate-nixd/tag/v3.17.2/x86_64-linux"
}, },
"original": { "original": {
"type": "file", "type": "file",
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.20.0/x86_64-linux" "url": "https://install.determinate.systems/determinate-nixd/tag/v3.17.2/x86_64-linux"
} }
}, },
"disko": { "disko": {
@ -85,11 +85,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1777713215, "lastModified": 1773889306,
"narHash": "sha256-8GzXDOXckDWwST8TY5DbwYFjdvQLlP7K9CLSVx6iTTo=", "narHash": "sha256-PAqwnsBSI9SVC2QugvQ3xeYCB0otOwCacB1ueQj2tgw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "63b4e7e6cf75307c1d26ac3762b886b5b0247267", "rev": "5ad85c82cc52264f4beddc934ba57f3789f28347",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -169,11 +169,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1778551011, "lastModified": 1775012637,
"narHash": "sha256-woJV7tJwwzjR0xWDNuGpwMENe/OEMAdSGg+nqWs9tUE=", "narHash": "sha256-Now9n+9BD37KilctvSOy3GzAdvQLZtPfCcGnxmxtaig=",
"owner": "helix-editor", "owner": "helix-editor",
"repo": "helix", "repo": "helix",
"rev": "8c41b11607924f7584b77c8a6e6b16439a2f559f", "rev": "daac117bbb4348a496bdf851a9a5c1d9612a2938",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -210,11 +210,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1778681890, "lastModified": 1774991950,
"narHash": "sha256-RK4sTgei29wBzLu+e4ljeixKutWhbMygFsdxdFKpZOU=", "narHash": "sha256-kScKj3qJDIWuN9/6PMmgy5esrTUkYinrO5VvILik/zw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "7654d90b94bab7eba3a52fd6f73b3f5a4c544fa2", "rev": "f2d3e04e278422c7379e067e323734f3e8c585a7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -231,11 +231,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1777594677, "lastModified": 1774991950,
"narHash": "sha256-h90sHwoRJLRvaTpZroTvU2JRHDFj0czUafM8eqLe1RI=", "narHash": "sha256-kScKj3qJDIWuN9/6PMmgy5esrTUkYinrO5VvILik/zw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "899c08a15beae5da51a5cecd6b2b994777a948da", "rev": "f2d3e04e278422c7379e067e323734f3e8c585a7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -274,12 +274,12 @@
"nixpkgs-regression": "nixpkgs-regression" "nixpkgs-regression": "nixpkgs-regression"
}, },
"locked": { "locked": {
"lastModified": 1778177425, "lastModified": 1774642787,
"narHash": "sha256-oyHvP5HDRe59opmjTrq2ED9lh+R9FrHyaCGPPNfBqWM=", "narHash": "sha256-5pg3HyPEUj/AXXwOQAwyieyDx0c1/1rf7+EsOCa1rJM=",
"rev": "f0ccb960d3ad5bff28acd9cabf8bdef885b5d52f", "rev": "cb9989b5b2329842fd7a2586429351d1ede16d04",
"revCount": 25858, "revCount": 24851,
"type": "tarball", "type": "tarball",
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix-src/3.20.0/019e03bc-3f83-7833-aba3-b691ef4956c7/source.tar.gz" "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix-src/3.17.2/019d3110-f384-7933-a525-8f854039828f/source.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
@ -288,11 +288,11 @@
}, },
"nixos": { "nixos": {
"locked": { "locked": {
"lastModified": 1778430510, "lastModified": 1774799055,
"narHash": "sha256-Ti+ZBvW6yrWWAg2szExVTwCd4qOJ3KlVr1tFHfyfi8Q=", "narHash": "sha256-Tsq9BCz0q47ej1uFF39m4tuhcwru/ls6vCCJzutEpaw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8fd9daa3db09ced9700431c5b7ad0e8ba199b575", "rev": "107cba9eb4a8d8c9f8e9e61266d78d340867913a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -319,11 +319,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1778593042, "lastModified": 1774933469,
"narHash": "sha256-xYGrSg6354UK2K4WSQd4+TfyvfqmvFbSY+ZtGQUXK0c=", "narHash": "sha256-OrnCQeUO2bqaWUl0lkDWyGWjKsOhtCyd7JSfTedQNUE=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "9bd7c80d43e258aaa607d83b43661df11444d808", "rev": "f4c4c2c0c923d7811ac2a63ccc154767e4195337",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -399,26 +399,26 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1773222311, "lastModified": 1761597516,
"narHash": "sha256-BHoB/XpbqoZkVYZCfXJXfkR+GXFqwb/4zbWnOr2cRcU=", "narHash": "sha256-wxX7u6D2rpkJLWkZ2E932SIvDJW8+ON/0Yy8+a5vsDU=",
"rev": "0590cd39f728e129122770c029970378a79d076a", "rev": "daf6dc47aa4b44791372d6139ab7b25269184d55",
"revCount": 909248, "revCount": 811874,
"type": "tarball", "type": "tarball",
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2511.909248%2Brev-0590cd39f728e129122770c029970378a79d076a/019ce32b-8ace-7339-b129-cceaa8dd10c6/source.tar.gz" "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.811874%2Brev-daf6dc47aa4b44791372d6139ab7b25269184d55/019a3494-3498-707e-9086-1fb81badc7fe/source.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
"url": "https://flakehub.com/f/NixOS/nixpkgs/0.2511" "url": "https://flakehub.com/f/NixOS/nixpkgs/0.2505"
} }
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1777826146, "lastModified": 1774273680,
"narHash": "sha256-wQ/iN5Zp5VIa3ebBibijPnLyKhor+xEbDy4d0goa9Zs=", "narHash": "sha256-a++tZ1RQsDb1I0NHrFwdGuRlR5TORvCEUksM459wKUA=",
"rev": "73c703c22422b8951895a960959dbbaca7296492", "rev": "fdc7b8f7b30fdbedec91b71ed82f36e1637483ed",
"revCount": 991389, "revCount": 968305,
"type": "tarball", "type": "tarball",
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nixpkgs-weekly/0.1.991389%2Brev-73c703c22422b8951895a960959dbbaca7296492/019df6c8-934b-7d40-b402-027bb5def30f/source.tar.gz" "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nixpkgs-weekly/0.1.968305%2Brev-fdc7b8f7b30fdbedec91b71ed82f36e1637483ed/019d1e65-315b-7c50-9232-ef9e46632115/source.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
@ -427,11 +427,11 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1778443072, "lastModified": 1774709303,
"narHash": "sha256-zi7/fsqM/kFdNuED//4WOCUtezGtKKqRNORjMvfwjnA=", "narHash": "sha256-D3Q07BbIA2KnTcSXIqqu9P586uWxN74zNoCH3h2ESHg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "da5ad661ba4e5ef59ba743f0d112cbc30e474f32", "rev": "8110df5ad7abf5d4c0f6fb0f8f978390e77f9685",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -465,11 +465,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1775358767, "lastModified": 1759631821,
"narHash": "sha256-f2eC+WIfhjevCPQILuV08i/kmKZzYZpUvkom/33VxCA=", "narHash": "sha256-V8A1L0FaU/aSXZ1QNJScxC12uP4hANeRBgI4YdhHeRM=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "20fd44bc663daa53a2575e01293e24e681d62244", "rev": "1d7cbdaad90f8a5255a89a6eddd8af24dc89cafe",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -501,11 +501,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1778585655, "lastModified": 1775021133,
"narHash": "sha256-yfxy9aTlIgU2Z36H8cJURgYLgjT4qvFeOzoAC/HXcKM=", "narHash": "sha256-JB0u0evfSlmNg9HdGDxtXjaCcdKUpFPdSAMGxvJo5Pw=",
"owner": "0xc000022070", "owner": "0xc000022070",
"repo": "zen-browser-flake", "repo": "zen-browser-flake",
"rev": "42f41abcef13dc81c85407b57aa1fd1bde46e46c", "rev": "4bf1a6837064486c4f573a9d500c4cf3c1c075c0",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -20,7 +20,7 @@
environment.plasma6.excludePackages = with pkgs; [ environment.plasma6.excludePackages = with pkgs; [
kdePackages.elisa kdePackages.elisa
kdePackages.konsole kdePackages.konsole
# kdePackages.gwenview kdePackages.gwenview
kdePackages.kate kdePackages.kate
# kdePackages.xwaylandvideobridge # kdePackages.xwaylandvideobridge
xterm xterm

View file

@ -32,7 +32,11 @@
format = "bcachefs"; format = "bcachefs";
mountOptions = [ mountOptions = [
"noatime" "noatime"
"compression=zstd"
"background_compression=zstd"
"discard" "discard"
# "fsck"
# "fix_errors"
]; ];
mountpoint = "/"; mountpoint = "/";
}; };

View file

@ -9,15 +9,11 @@
in { in {
users.users.tao.packages = users.users.tao.packages =
(with pkgs-last-building; [ (with pkgs-last-building; [
# oculante # https://nixpk.gs/pr-tracker.html?pr=502921 oculante # https://nixpk.gs/pr-tracker.html?pr=502921
]) ])
++ (with pkgs; [ ++ (with pkgs; [
feedr
sniffnet
oculante
# keep-sorted start sticky_comments=no # keep-sorted start sticky_comments=no
# android-tools # android-tools
# bottles
# boxxy # boxxy
# carapace # carapace
# davinci-resolve # davinci-resolve
@ -37,6 +33,7 @@ in {
aspellDicts.en aspellDicts.en
bitwarden-cli bitwarden-cli
bitwarden-desktop bitwarden-desktop
bottles
calibre calibre
darktable darktable
deluge deluge
@ -75,7 +72,6 @@ in {
tinymist tinymist
toastify toastify
typst typst
typstyle
usbutils usbutils
vial vial
wezterm wezterm
@ -95,11 +91,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
libertine
inconsolata
linux-libertine-g
# keep-sorted start # keep-sorted start
cooper-hewitt cooper-hewitt
ibm-plex ibm-plex
@ -177,8 +168,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;
}; };
} }

View file

@ -107,9 +107,6 @@ in {
enable = true; enable = true;
settings = { settings = {
remotes.origin.auto-track-bookmarks = "glob:*"; remotes.origin.auto-track-bookmarks = "glob:*";
aliases = {
"init" = ["git" "init"];
};
user = { user = {
name = "Tao Tien"; name = "Tao Tien";
email = "29749622+taotien@users.noreply.github.com"; email = "29749622+taotien@users.noreply.github.com";
@ -140,8 +137,6 @@ in {
hr-seek = "yes"; hr-seek = "yes";
audio-device = "alsa";
hwdec = "auto"; hwdec = "auto";
vo = "gpu-next"; vo = "gpu-next";
@ -171,7 +166,7 @@ in {
# extraConfig = lib.concatStrings (map builtins.readFile (map (x: ./nushell/extras/. + x) (map (x: "/" + x) (builtins.attrNames (builtins.readDir ./nushell/extras))))); # extraConfig = lib.concatStrings (map builtins.readFile (map (x: ./nushell/extras/. + x) (map (x: "/" + x) (builtins.attrNames (builtins.readDir ./nushell/extras)))));
plugins = with pkgs.nushellPlugins; [ plugins = with pkgs.nushellPlugins; [
# skim # skim
# desktop_notifications desktop_notifications
# highlight # highlight
# units # units
]; ];

146
users/tao/direnv/devenv.sh Normal file
View 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"
}

View file

@ -242,20 +242,14 @@
{ {
name = "typst"; name = "typst";
language-servers = ["tinymist"]; language-servers = ["tinymist"];
}
{
name = "typst";
text-width = 100; text-width = 100;
auto-format = true;
formatter = {
command = "typstyle";
};
} }
# keep-sorted end # keep-sorted end
]; ];
language-server = { language-server = {
nil = {
config = {
autoArchive = true;
};
};
deno-lsp = { deno-lsp = {
command = "deno"; command = "deno";
args = ["lsp"]; args = ["lsp"];
@ -317,9 +311,6 @@
}; };
}; };
}; };
# niv.config = {
# autoArchive = true;
# };
}; };
use-grammars.only = [ use-grammars.only = [
# keep-sorted start # keep-sorted start

View file

@ -1,7 +0,0 @@
export def "nu-complete docker start" [] {
docker ps --all --format json | from json --objects | select Names Image | rename value description
}
export extern "docker start" [
...recipe: string@"nu-complete docker start"
]

View file

@ -12,7 +12,6 @@ use tailscale.nu *
source completions-jj.nu source completions-jj.nu
source completions-just.nu source completions-just.nu
source completions-docker.nu
# External completer example # External completer example
# let carapace_completer = {|spans| # let carapace_completer = {|spans|
@ -768,12 +767,8 @@ $env.config = {
mkdir ($nu.data-dir | path join "vendor/autoload") mkdir ($nu.data-dir | path join "vendor/autoload")
starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu") starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu")
zoxide init nushell --no-cmd | save --force ~/.zoxide.nu
source ~/.zoxide.nu source ~/.zoxide.nu
export def --wrapped --env z [...rest] { export def --wrapped --env z [...rest] {
__zoxide_z ...$rest zo ...$rest
l l
} }
devenv hook nu | save --force ~/.cache/devenv/hook.nu
source ~/.cache/devenv/hook.nu

View file

@ -79,14 +79,10 @@ $env.NU_PLUGIN_DIRS = [
] ]
# To add entries to PATH (on Windows you might use Path), you can use the following pattern: # To add entries to PATH (on Windows you might use Path), you can use the following pattern:
# $env.PATH = ($env.PATH | split row (char esep)) $env.PATH = ($env.PATH | split row (char esep))
# $env.GOPATH = '/home/tao/.go' # $env.GOPATH = '/home/tao/.go'
# $env.CARAPACE_BRIDGES # $env.CARAPACE_BRIDGES
mkdir ~/.cache/carapace mkdir ~/.cache/carapace
# carapace _carapace nushell | save -f ~/.cache/carapace/init.nu # carapace _carapace nushell | save -f ~/.cache/carapace/init.nu
use std/util "path add"
path add ~/.cargo/bin/
path add ~/.local/bin/

View file

@ -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 }

View file

@ -13,7 +13,7 @@ export def check-mullvad [] {
} }
# switch to a specific exit node, or none # switch to a specific exit node, or none
export def te [exit_node: string = "", -n] { export def te [exit_node: string = ""] {
if ($exit_node | is-empty) and (ps | find deluge | is-not-empty) { if ($exit_node | is-empty) and (ps | find deluge | is-not-empty) {
print "stop summoning first!" print "stop summoning first!"
return false return false
@ -21,7 +21,7 @@ export def te [exit_node: string = "", -n] {
tailscale set --exit-node $exit_node tailscale set --exit-node $exit_node
if ($exit_node | is-not-empty) or not $n { if ($exit_node | is-not-empty) {
check-mullvad check-mullvad
} else { } else {
print "exit node set" print "exit node set"
@ -73,18 +73,11 @@ export def tr [] {
| return $in | return $in
} }
export def tw [] {
tailscale switch --list
| detect columns
| input list -d Tailnet
| get ID
| tailscale switch $in
}
export alias t = tailscale export alias t = tailscale
export alias ts = tailscale status export alias ts = tailscale status
export alias tu = tailscale up export alias tu = tailscale up
export alias td = tailscale down export alias td = tailscale down
export alias ta = tailscale exit-node suggest export alias ta = tailscale exit-node suggest
export alias tt = tailscale switch --list | detect columns | input list -d Tailnet | get ID | t switch $in
export alias wno = ssh root@whyfi "etherwake -i br-lan 04:42:1A:E7:62:C3" export alias wno = ssh root@whyfi "etherwake -i br-lan 04:42:1A:E7:62:C3"

View file

@ -1,5 +1,6 @@
local wezterm = require 'wezterm';
local config = { local config = {
font = wezterm.font 'IosevkaTerm Nerd Font', font = wezterm.font 'IBM Plex Mono',
color_scheme = 'GruvboxDarkHard', color_scheme = 'GruvboxDarkHard',
window_decorations = "NONE", window_decorations = "NONE",

View file

@ -29,18 +29,9 @@ in {
programs.kdeconnect.enable = true; programs.kdeconnect.enable = true;
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
libertine
inconsolata
linux-libertine-g
adwaita-fonts
# keep-sorted start
cooper-hewitt
ibm-plex
nerd-fonts.fira-code
noto-fonts-cjk-sans noto-fonts-cjk-sans
noto-fonts-cjk-serif noto-fonts-cjk-serif
noto-fonts-color-emoji noto-fonts-color-emoji
# keep-sorted end
]; ];
services.flatpak.enable = true; services.flatpak.enable = true;