Configure bugwarrior
This commit is contained in:
parent
205f1729e8
commit
c0217e9970
Binary file not shown.
|
@ -22,6 +22,7 @@ imports = [
|
|||
./modules/unlock.nix
|
||||
./modules/weechat
|
||||
./modules/update_tasks.nix
|
||||
./modules/bugwarrior.nix
|
||||
./modules/habitask.nix
|
||||
../common
|
||||
# ./sort-mail.nix
|
||||
|
|
61
home-manager/modules/bugwarrior.nix
Normal file
61
home-manager/modules/bugwarrior.nix
Normal file
|
@ -0,0 +1,61 @@
|
|||
{ config, lib, pkgs , ... }:
|
||||
with lib;
|
||||
let
|
||||
inherit (config.m-0.private) me gitlab github;
|
||||
in {
|
||||
options.m-0.bugwarrior.enable = mkEnableOption "Sync tasks from issuetrackers";
|
||||
config = mkIf config.m-0.bugwarrior.enable {
|
||||
home.file.".config/bugwarrior/bugwarriorrc".text = ''
|
||||
[general]
|
||||
targets=cda_gitlab,github
|
||||
static_fields = priority, project
|
||||
|
||||
[cda_gitlab]
|
||||
service=gitlab
|
||||
gitlab.password=@oracle:eval:pass de/darmstadt/ccc/ldap
|
||||
gitlab.login=${me.user}
|
||||
gitlab.host=${gitlab.host}
|
||||
gitlab.token=${gitlab.token}
|
||||
gitlab.only_if_assigned=${me.user}
|
||||
gitlab.also_unassigned=True
|
||||
gitlab.default_priority= L
|
||||
gitlab.include_repos=cda/tasks, cda/chaos-darmstadt.de, cda/doku
|
||||
gitlab.include_regex=(vorstand|jali|${me.user})/.*,
|
||||
gitlab.description_template = {{gitlabnamespace}}/{{gitlabrepo}} {{gitlabtype[:1]}}#{{gitlabnumber}}: {{gitlabtitle}}
|
||||
gitlab.project_template =
|
||||
|
||||
[github]
|
||||
service=github
|
||||
github.login = ${me.user}
|
||||
github.username = ${me.user}
|
||||
github.token = ${github.token}
|
||||
github.description_template = {{githubrepo}} {{githubtype[:1]}}#{{githubnumber}}: {{githubtitle}}
|
||||
github.include_user_issues = False
|
||||
github.include_user_repos = False
|
||||
github.query = is:open involves:maralorn archived:false
|
||||
github.default_priority= L
|
||||
github.project_template =
|
||||
'';
|
||||
systemd.user = {
|
||||
services.bugwarrior = {
|
||||
Unit = {
|
||||
Description = "Run bugwarrior";
|
||||
};
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
Environment="PATH=${pkgs.taskwarrior}/bin:${pkgs.eventd}/bin:${pkgs.gnugrep}/bin";
|
||||
ExecStart="${pkgs.bugwarrior}/bin/bugwarrior-pull";
|
||||
};
|
||||
};
|
||||
timers.bugwarrior = {
|
||||
Timer = {
|
||||
OnCalendar = "hourly";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "timers.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
|
@ -55,6 +55,65 @@ config = mkIf config.m-0.taskwarrior.enable {
|
|||
uda.gen_name.label=generator name
|
||||
uda.gen_id.type=string
|
||||
uda.gen_id.label=generator id
|
||||
|
||||
# Bugwarrior UDAs
|
||||
uda.githubtitle.type=string
|
||||
uda.githubtitle.label=Github Title
|
||||
uda.githubbody.type=string
|
||||
uda.githubbody.label=Github Body
|
||||
uda.githubcreatedon.type=date
|
||||
uda.githubcreatedon.label=Github Created
|
||||
uda.githubupdatedat.type=date
|
||||
uda.githubupdatedat.label=Github Updated
|
||||
uda.githubmilestone.type=string
|
||||
uda.githubmilestone.label=Github Milestone
|
||||
uda.githubrepo.type=string
|
||||
uda.githubrepo.label=Github Repo Slug
|
||||
uda.githuburl.type=string
|
||||
uda.githuburl.label=Github URL
|
||||
uda.githubtype.type=string
|
||||
uda.githubtype.label=Github Type
|
||||
uda.githubnumber.type=numeric
|
||||
uda.githubnumber.label=Github Issue/PR #
|
||||
uda.githubuser.type=string
|
||||
uda.githubuser.label=Github User
|
||||
uda.gitlabtitle.type=string
|
||||
uda.gitlabtitle.label=Gitlab Title
|
||||
uda.gitlabdescription.type=string
|
||||
uda.gitlabdescription.label=Gitlab Description
|
||||
uda.gitlabcreatedon.type=date
|
||||
uda.gitlabcreatedon.label=Gitlab Created
|
||||
uda.gitlabupdatedat.type=date
|
||||
uda.gitlabupdatedat.label=Gitlab Updated
|
||||
uda.gitlabduedate.type=date
|
||||
uda.gitlabduedate.label=Gitlab Due Date
|
||||
uda.gitlabmilestone.type=string
|
||||
uda.gitlabmilestone.label=Gitlab Milestone
|
||||
uda.gitlaburl.type=string
|
||||
uda.gitlaburl.label=Gitlab URL
|
||||
uda.gitlabrepo.type=string
|
||||
uda.gitlabrepo.label=Gitlab Repo Slug
|
||||
uda.gitlabtype.type=string
|
||||
uda.gitlabtype.label=Gitlab Type
|
||||
uda.gitlabnumber.type=numeric
|
||||
uda.gitlabnumber.label=Gitlab Issue/MR #
|
||||
uda.gitlabstate.type=string
|
||||
uda.gitlabstate.label=Gitlab Issue/MR State
|
||||
uda.gitlabupvotes.type=numeric
|
||||
uda.gitlabupvotes.label=Gitlab Upvotes
|
||||
uda.gitlabdownvotes.type=numeric
|
||||
uda.gitlabdownvotes.label=Gitlab Downvotes
|
||||
uda.gitlabwip.type=numeric
|
||||
uda.gitlabwip.label=Gitlab MR Work-In-Progress Flag
|
||||
uda.gitlabauthor.type=string
|
||||
uda.gitlabauthor.label=Gitlab Author
|
||||
uda.gitlabassignee.type=string
|
||||
uda.gitlabassignee.label=Gitlab Assignee
|
||||
uda.gitlabnamespace.type=string
|
||||
uda.gitlabnamespace.label=Gitlab Namespace
|
||||
uda.gitlabweight.type=numeric
|
||||
uda.gitlabweight.label=Gitlab Weight
|
||||
# END Bugwarrior UDAs
|
||||
'';
|
||||
taskwarrior-on-add-hook = {
|
||||
target = ".task/hooks/on-add.eventd-notification";
|
||||
|
@ -71,7 +130,7 @@ config = mkIf config.m-0.taskwarrior.enable {
|
|||
command.append("-d")
|
||||
if type(value) == list:
|
||||
value = ', '.join(value)
|
||||
command.append(name+"='"+value+"'")
|
||||
command.append(name+"='"+str(value)+"'")
|
||||
subprocess.Popen(command)
|
||||
print(input_string)
|
||||
'';
|
||||
|
@ -95,8 +154,8 @@ config = mkIf config.m-0.taskwarrior.enable {
|
|||
value = new.get(name, "")
|
||||
command.append("-d")
|
||||
if type(value) == list:
|
||||
value = ', '.join(value)
|
||||
command.append(name+"='"+value+"'")
|
||||
value = ', '.join([str(item) for item in value])
|
||||
command.append(name+"='"+str(value)+"'")
|
||||
subprocess.Popen(command)
|
||||
print(input_string)
|
||||
'';
|
||||
|
|
|
@ -5,20 +5,6 @@ let
|
|||
in {
|
||||
options.m-0.update_tasks.enable = mkEnableOption "Update Tasks";
|
||||
config = mkIf config.m-0.update_tasks.enable {
|
||||
home.file.".config/bugwarrior/bugwarriorrc".text = ''
|
||||
[general]
|
||||
targets=cda_gitlab
|
||||
|
||||
[cda_gitlab]
|
||||
service=gitlab
|
||||
gitlab.password=@oracle:eval:pass de/darmstadt/ccc/ldap
|
||||
gitlab.login=${me.user}
|
||||
gitlab.host=${gitlab.host}
|
||||
gitlab.token=${gitlab.token}
|
||||
gitlab.only_if_assigned=${me.user}
|
||||
gitlab.only_if_author=${me.user}
|
||||
'';
|
||||
home.packages = [ pkgs.bugwarrior ];
|
||||
systemd.user = {
|
||||
services.update_tasks = {
|
||||
Unit = {
|
||||
|
|
|
@ -5,31 +5,33 @@ imports = [
|
|||
../../home-manager
|
||||
];
|
||||
|
||||
m-0.hostName = "apollo";
|
||||
m-0.laptop.enable = true;
|
||||
m-0.sleep-nag.enable = true;
|
||||
m-0.battery.enable = true;
|
||||
m-0.latex.enable = true;
|
||||
m-0.accounting = {
|
||||
m-0 = {
|
||||
hostName = "apollo";
|
||||
laptop.enable = true;
|
||||
sleep-nag.enable = true;
|
||||
battery.enable = true;
|
||||
latex.enable = true;
|
||||
accounting = {
|
||||
enable = true;
|
||||
config = builtins.readFile secret/jaliconfig.py;
|
||||
};
|
||||
m-0.graphical.enable = true;
|
||||
m-0.rustdev.enable = true;
|
||||
m-0.taskwarrior.enable = true;
|
||||
m-0.update_tasks.enable = true;
|
||||
m-0.eventd.enable = true;
|
||||
m-0.unlocker = [ {
|
||||
};
|
||||
graphical.enable = true;
|
||||
rustdev.enable = true;
|
||||
taskwarrior.enable = true;
|
||||
update_tasks.enable = true;
|
||||
eventd.enable = true;
|
||||
unlocker = [ {
|
||||
name = "hera";
|
||||
hostName = "hera.m-0.eu";
|
||||
pubKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCHkqWlFLtmIlTSKahr2PcL++K75YgfsSU6jwVYW5df3JCkowu/M16SIBxABxYSQrKej5uIz/OFCjqSxHJQ8D5wSYBvn2gYr/BbBcz4rfIJmZ55Od2jckaqlj/M8TtkuPPhsQG7S730vXxK5hbMT8iW5WWv8sIKY/WtaRbZOFMX/53WCLEHtnMu5zFJFWf92+mjIHSLyW8ggl1m525RUiaAfCge2vnuzIFq4kUqJxaWzxIvEWIncKWN10K/HMvdI+yOtbSen41uKedwSFhUFs3xHy1mJddYOrlcJQPt5zuuffZ/nTDVXMZoh5QNwg8ZlkkueVChaS1Y5STjb7cem1Mt";
|
||||
passPath = "eu/m-0/hera/disk";
|
||||
} ];
|
||||
m-0.mail = {
|
||||
} ];
|
||||
mail = {
|
||||
enable = true;
|
||||
boxes = with config.m-0.private.mail; [ private work work2 ];
|
||||
sendmail = with config.m-0.private.sendmail; [ private work work2 club club2 ];
|
||||
default = config.m-0.private.sendmail.private;
|
||||
};
|
||||
};
|
||||
home.packages = [
|
||||
(pkgs.writeShellScriptBin "maintenance" ''
|
||||
|
|
|
@ -10,6 +10,7 @@ m-0 = {
|
|||
hostName = "hera";
|
||||
taskwarrior.enable = true;
|
||||
habitask.enable = true;
|
||||
bugwarrior.enable = true;
|
||||
weechat = {
|
||||
enable = true;
|
||||
user = config.m-0.private.hackint.user;
|
||||
|
|
Loading…
Reference in a new issue