fork/home-manager

git clone https://git.julia.blue/fork/home-manager

Avimitinlsd: allow user to configure colors835465e8

master
1010 B44 linesraw
1{ config, lib, pkgs, ... }:
2
3with lib;
4
5{
6  config = {
7    programs.lsd = {
8      enable = true;
9      enableAliases = false;
10      settings = {
11        date = "relative";
12        blocks = [ "date" "size" "name" ];
13        layout = "oneline";
14        sorting.dir-grouping = "first";
15        ignore-globs = [ ".git" ".hg" ".bsp" ];
16      };
17      colors = {
18        date = {
19          day-old = "green";
20          older = "dark_green";
21        };
22        size = {
23          none = "grey";
24          small = "grey";
25          medium = "yellow";
26          large = "dark_yellow";
27        };
28      };
29    };
30
31    test.stubs.lsd = { };
32
33    nmt.script = ''
34      assertFileExists home-files/.config/lsd/config.yaml
35      assertFileExists home-files/.config/lsd/colors.yaml
36      assertFileContent \
37        home-files/.config/lsd/config.yaml \
38        ${./example-settings-expected.yaml}
39      assertFileContent \
40        home-files/.config/lsd/colors.yaml \
41        ${./example-colors-expected.yaml}
42    '';
43  };
44}