97 lines
2.4 KiB
Nix
97 lines
2.4 KiB
Nix
{ config, pkgs, lib, ... }:
|
|
with lib;
|
|
with types;
|
|
let
|
|
mkMagicMergeOption = { description ? "", example ? { }, default ? { }, apply ? id, ... }:
|
|
mkOption {
|
|
inherit example description default apply;
|
|
type = with lib.types;
|
|
let
|
|
valueType = nullOr
|
|
(oneOf [
|
|
bool
|
|
int
|
|
float
|
|
str
|
|
(attrsOf valueType)
|
|
(listOf valueType)
|
|
]) // {
|
|
description = "bool, int, float or str";
|
|
emptyValue.value = { };
|
|
};
|
|
in
|
|
valueType;
|
|
};
|
|
|
|
|
|
taskwarrior-tui = pkgs.legacy_2311.taskwarrior-tui;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
# bugwarrior (a bit fiddly)
|
|
imports = [{
|
|
options.bugwarrior.config = mkMagicMergeOption {
|
|
type = attrs;
|
|
default = { };
|
|
};
|
|
|
|
config = {
|
|
home.file.".config/bugwarrior/bugwarrior.toml".source = (pkgs.formats.toml { }).generate "bugwarriorrc.toml" config.bugwarrior.config;
|
|
# todo : before deleting this, put it in logseq
|
|
|
|
home.packages = [
|
|
(pkgs.python3Packages.bugwarrior.overrideAttrs (old: {
|
|
version = "develop";
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "ralphbean";
|
|
repo = "bugwarrior";
|
|
rev = "eb19a702a698f9c8c3ce2a1fe41f35872d9ae398";
|
|
sha256 = "sha256-Geon+ddE58WJ10L4unotzvmZj1Ye0yjZHVQgrR2YWgE=";
|
|
};
|
|
propagatedBuildInputs = old.propagatedBuildInputs ++ [
|
|
pkgs.python3Packages.pydantic
|
|
pkgs.python3Packages.tomli
|
|
pkgs.python3Packages.email-validator
|
|
pkgs.python3Packages.packaging
|
|
];
|
|
}))
|
|
];
|
|
|
|
};
|
|
|
|
}];
|
|
|
|
home.packages = with pkgs;
|
|
[
|
|
|
|
taskwarrior
|
|
taskwarrior-tui
|
|
|
|
timewarrior
|
|
tasksh
|
|
taskwarrior-hooks
|
|
(pkgs.writeShellScriptBin "tsak" ''${pkgs.taskwarrior}/bin/task "$@"'')
|
|
|
|
unstable.vit
|
|
(pkgs.writers.writeBashBin "active" "${taskwarrior-tui}/bin/taskwarrior-tui -r active")
|
|
(pkgs.writers.writeBashBin "todo" "${taskwarrior-tui}/bin/taskwarrior-tui -r todo")
|
|
|
|
(pkgs.writers.writeBashBin "calendar" ''
|
|
${pkgs.taskwarrior}/bin/task calendar
|
|
${pkgs.taskwarrior}/bin/task calendar_report
|
|
'')
|
|
|
|
# todo : belongs to calendar.nix
|
|
vdirsyncer
|
|
khal
|
|
(pkgs.writers.writeBashBin "kalendar" ''
|
|
${pkgs.vdirsyncer}/bin/vdirsyncer sync
|
|
${pkgs.khal}/bin/ikhal
|
|
'')
|
|
|
|
];
|
|
|
|
|
|
}
|