home/nushell: Generate ls colours based on scheme

This commit is contained in:
Mikael Voss 2024-09-27 22:14:00 +02:00
parent 9b4d8ee4b6
commit f19b37aa66
No known key found for this signature in database

View file

@ -302,8 +302,14 @@ in {
programs.nushell = {
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 {
LS_COLORS: r#'${ls-colours}'#
PROMPT_COMMAND: {
let dir = match (do --ignore-shell-errors { $env.PWD | path relative-to $nu.home-path }) {
null => $env.PWD