Compare commits

..

2 Commits

Author SHA1 Message Date
ec2089ab8d feat(machoke): add in-memory store 2026-09-02 08:39:05 -04:00
bf11f076b5 fix(fish): export Rust toolchain root 2026-09-02 08:38:56 -04:00
4 changed files with 5 additions and 14 deletions

View File

@@ -3,6 +3,8 @@ set -g fish_key_bindings fish_vi_key_bindings
set -gx EDITOR nvim
set -gx VISUAL nvim
# TODO: source this from a shell toolchain registry.
set -gx RUST_TOOLCHAIN_ROOT /nix/store/ph2z7wfzcxyrl1y0349dzcjkas3bifhw-rust-toolchain
# Render man pages through bat.
set -x MANROFFOPT "-c"

View File

@@ -9,11 +9,7 @@ let
cfg = config.modules.shell.fish;
user = config.user.name;
shortcuts = config.registry.shell-shortcut.${config.networking.hostName};
envVars = config.registry.env-var.${config.networking.hostName};
commandsOf = shortcuts: lib.mapAttrs (_name: shortcut: shortcut.command) shortcuts;
exportEnvVar = name: value: ''
set -gx ${name} ${lib.escapeShellArg value}
'';
in
{
options.modules.shell.fish = {
@@ -103,10 +99,7 @@ in
};
# Rendered by home-manager into ~/.config/fish/config.fish.
interactiveShellInit = lib.concatStringsSep "\n" (
(lib.mapAttrsToList exportEnvVar envVars)
++ [ (builtins.readFile ./config.fish) ]
);
interactiveShellInit = builtins.readFile ./config.fish;
};
};
};

View File

@@ -23,13 +23,13 @@ in
options.modules.shell.rust.enable = lib.mkEnableOption "Rust tools for the primary user's shell environment";
config = lib.mkIf cfg.enable {
registry.env-var.${config.networking.hostName}.RUST_TOOLCHAIN_ROOT = "${toolchain}";
home-manager.users.${user} = {
home.packages = [
toolchain
pkgs.rust-analyzer
];
home.sessionVariables.RUST_TOOLCHAIN_ROOT = "${toolchain}";
};
};
}

View File

@@ -1,4 +0,0 @@
{ lib, ... }:
{
type = lib.types.str;
}