1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 19:49:45 +01:00
home-manager/tests/modules/programs/taskwarrior/taskwarrior.nix
x10an14 e361373b5f
taskwarrior: make .taskrc writable (#2761)
This is achieved by generating the Home Manager configuration
file as `~/.config/task/home-manager-taskrc`, and including that
file into ~/.config/task/taskrc.

Fixes #2360

Co-authored-by: mainrs <5113257+mainrs@users.noreply.github.com>
Co-authored-by: Nicolas Berbiche <nicolas@normie.dev>
2022-04-07 13:29:53 -04:00

40 lines
973 B
Nix

{ config, lib, pkgs, ... }:
with lib;
{
config = {
programs.taskwarrior = {
enable = true;
colorTheme = "dark-violets-256";
dataLocation = "/some/data/location";
config = {
urgency.user.tag.next.coefficient = 42.42;
urgency.blocked.coefficient = -42;
};
extraConfig = ''
include /my/stuff
urgency.user.tag.test.coefficient=-42.42
'';
};
test.stubs.taskwarrior = { };
nmt.script = ''
assertFileExists home-files/.config/task/home-manager-taskrc
assertFileContent home-files/.config/task/home-manager-taskrc ${
pkgs.writeText "taskwarrior.home-conf.expected" ''
data.location=/some/data/location
include dark-violets-256.theme
urgency.blocked.coefficient=-42
urgency.user.tag.next.coefficient=42.420000
include /my/stuff
urgency.user.tag.test.coefficient=-42.42
''
}
'';
};
}