home/nushell: Generate ls colours based on scheme

This commit is contained in:
Mikael 2024-09-27 22:14:00 +02:00
parent 9b4d8ee4b6
commit f19b37aa66
Signed by: mikael
SSH key fingerprint: SHA256:21QyD2Meiot7jOUVitIR5YkGB/XuXdCvLW1hE6dsri0

View file

@ -302,8 +302,14 @@ in {
programs.nushell = { programs.nushell = {
enable = true; enable = true;
envFile.text = '' envFile.text = let
ls-colours = pkgs.runCommand "ls-colours" { } ''
${lib.getExe pkgs.vivid} generate catppuccin-mocha >$out
'' |> builtins.readFile;
in ''
load-env { load-env {
LS_COLORS: r#'${ls-colours}'#
PROMPT_COMMAND: { PROMPT_COMMAND: {
let dir = match (do --ignore-shell-errors { $env.PWD | path relative-to $nu.home-path }) { let dir = match (do --ignore-shell-errors { $env.PWD | path relative-to $nu.home-path }) {
null => $env.PWD null => $env.PWD