1
0
Fork 0

Track kassandra config

This commit is contained in:
Malte Brandy 2021-04-26 04:43:01 +02:00
parent 8fdd2f7c7d
commit 93661d6a80
No known key found for this signature in database
GPG key ID: 226A2D41EF5378C9
6 changed files with 673 additions and 0 deletions

View file

@ -82,6 +82,7 @@ in
./roles/mpclient.nix
./roles/on-my-machine.nix
./roles/desktop
./roles/kassandra.nix
./roles/git-sign.nix
./roles/laptop.nix
./roles/mail.nix
@ -132,6 +133,7 @@ in
./roles/weechat
./roles/headless-mpd.nix
./roles/mail.nix
./roles/kassandra.nix
./roles/mail2rss.nix
./roles/taskwarrior.nix
./roles/vdirsyncer.nix

View file

@ -0,0 +1,9 @@
{ ... }: {
home.file = {
"kassandra-config" = {
target = ".config/kassandra";
source = ./kassandra;
recursive = true;
};
};
}

View file

@ -0,0 +1,25 @@
let types = ./types.dhall
in { users = toMap
{ maralorn =
{ filterTag = ""
, passwordHash =
"$argon2id$v=19$m=65536,t=2,p=1$2capLVJQQBvndRxOKIVogQ==$wCGgmPx4yVyr+nMM9fWCtn1aPvi3uZDvpdhX85GuIxU="
, userConfig =
{ localBackend =
types.LocalBackend.TaskwarriorBackend
{ createHooksOnStart = True
, hookListenPort =
types.PortConfig.PortRange { min = 40000, max = 50000 }
, hookSuffix = "kassandra"
, removeHooksOnExit = True
, taskBin = None Text
, taskConfig = [] : List types.TaskwarriorOption
, taskDataPath = None Text
, taskRcPath = None Text
}
, uiConfig = ./uiConfig.dhall
}
}
}
}

View file

@ -0,0 +1,44 @@
let types = ./types.dhall
in { backends =
[ { name = "default local backend"
, backend =
types.StandaloneAccount.LocalAccount
{ userConfig =
{ localBackend =
types.LocalBackend.TaskwarriorBackend
{ createHooksOnStart = True
, hookListenPort =
types.PortConfig.PortRange
{ min = 40000, max = 50000 }
, hookSuffix = "kassandra"
, removeHooksOnExit = True
, taskBin = None Text
, taskConfig = [] : List types.TaskwarriorOption
, taskDataPath = None Text
, taskRcPath = None Text
}
, uiConfig = ./uiConfig.dhall
}
}
}
, { name = "tasks.maralorn.de"
, backend =
types.StandaloneAccount.RemoteAccount
{ backend = Some
{ url = "https://tasks.maralorn.de"
, user = "maralorn"
, password =
types.PasswordConfig.PasswordCommand
{ command = "pass de/maralorn/tasks.maralorn.de/maralorn"
}
}
}
}
, { name = "Dynamic Backend"
, backend =
types.StandaloneAccount.RemoteAccount
{ backend = None types.RemoteBackend }
}
]
}

View file

@ -0,0 +1,528 @@
{
StandaloneAccount = < RemoteAccount :
{ backend :
Optional
{ url : Text
, user : Text
, password :
< Prompt
| Password : { plaintext : Text }
| PasswordCommand : { command : Text }
>
}
}
| LocalAccount :
{ userConfig :
{ localBackend :
< TaskwarriorBackend :
{ taskRcPath : Optional Text
, taskDataPath : Optional Text
, taskConfig : List { name : Text, value : Text }
, taskBin : Optional Text
, hookListenPort :
< Port : { port : Natural }
| PortRange : { min : Natural, max : Natural }
>
, hookSuffix : Text
, createHooksOnStart : Bool
, removeHooksOnExit : Bool
}
| GitBackend :
{ directoryPath : Text
, commit : Bool
, configureMerge : Bool
, createIfMissing : Bool
, origin : Optional Text
, pushOnWrite : Bool
, watchFiles : Bool
, pullTimerSeconds : Optional Natural
}
>
, uiConfig :
{ viewList :
List
< SearchWidget
| ConfigListWidget : { name : Text, limit : Optional Natural }
>
, configuredLists :
List
{ name : Text
, list :
< QueryList :
{ query :
List
< HasProperty :
{ property :
< DescriptionMatches : { filter : Text }
| ParentBlocked
| Blocked
| Waiting
| Pending
| Completed
| Deleted
| IsParent
| OnList
| HasTag : { tag : Text }
| HasParent
>
}
| HasntProperty :
{ property :
< DescriptionMatches : { filter : Text }
| ParentBlocked
| Blocked
| Waiting
| Pending
| Completed
| Deleted
| IsParent
| OnList
| HasTag : { tag : Text }
| HasParent
>
}
>
}
| TagList : { name : Text }
| DefinitionList :
{ elements :
List
< ConfigList :
{ name : Text, limit : Optional Natural }
| ListElement :
{ item :
< TaskwarriorTask : { uuid : Text }
| AdHocTask : { description : Text }
| HabiticaTask :
{ task :
< HabiticaDaily | HabiticaTodo >
}
| Mail : { id : Text }
>
}
>
}
| ChildrenList : { uuid : Text }
| DependenciesList : { uuid : Text }
| HabiticaList :
{ list : < HabiticaDailys | HabiticaTodos > }
| Mails
>
}
, uiFeatures :
{ sortInTag : Bool
, treeOption : < NoTree | PartOfTree | DependsTree >
}
}
}
}
>,
Widget = < SearchWidget | ConfigListWidget : { name : Text, limit : Optional Natural } >,
NamedListQuery = { name : Text
, list :
< QueryList :
{ query :
List
< HasProperty :
{ property :
< DescriptionMatches : { filter : Text }
| ParentBlocked
| Blocked
| Waiting
| Pending
| Completed
| Deleted
| IsParent
| OnList
| HasTag : { tag : Text }
| HasParent
>
}
| HasntProperty :
{ property :
< DescriptionMatches : { filter : Text }
| ParentBlocked
| Blocked
| Waiting
| Pending
| Completed
| Deleted
| IsParent
| OnList
| HasTag : { tag : Text }
| HasParent
>
}
>
}
| TagList : { name : Text }
| DefinitionList :
{ elements :
List
< ConfigList : { name : Text, limit : Optional Natural }
| ListElement :
{ item :
< TaskwarriorTask : { uuid : Text }
| AdHocTask : { description : Text }
| HabiticaTask :
{ task : < HabiticaDaily | HabiticaTodo > }
| Mail : { id : Text }
>
}
>
}
| ChildrenList : { uuid : Text }
| DependenciesList : { uuid : Text }
| HabiticaList : { list : < HabiticaDailys | HabiticaTodos > }
| Mails
>
},
LocalBackend = < TaskwarriorBackend :
{ taskRcPath : Optional Text
, taskDataPath : Optional Text
, taskConfig : List { name : Text, value : Text }
, taskBin : Optional Text
, hookListenPort :
< Port : { port : Natural }
| PortRange : { min : Natural, max : Natural }
>
, hookSuffix : Text
, createHooksOnStart : Bool
, removeHooksOnExit : Bool
}
| GitBackend :
{ directoryPath : Text
, commit : Bool
, configureMerge : Bool
, createIfMissing : Bool
, origin : Optional Text
, pushOnWrite : Bool
, watchFiles : Bool
, pullTimerSeconds : Optional Natural
}
>,
TreeOption = < NoTree | PartOfTree | DependsTree >,
PortConfig = < Port : { port : Natural } | PortRange : { min : Natural, max : Natural } >,
TaskwarriorOption = { name : Text, value : Text },
StandaloneConfig = { backends :
List
{ name : Text
, backend :
< RemoteAccount :
{ backend :
Optional
{ url : Text
, user : Text
, password :
< Prompt
| Password : { plaintext : Text }
| PasswordCommand : { command : Text }
>
}
}
| LocalAccount :
{ userConfig :
{ localBackend :
< TaskwarriorBackend :
{ taskRcPath : Optional Text
, taskDataPath : Optional Text
, taskConfig : List { name : Text, value : Text }
, taskBin : Optional Text
, hookListenPort :
< Port : { port : Natural }
| PortRange : { min : Natural, max : Natural }
>
, hookSuffix : Text
, createHooksOnStart : Bool
, removeHooksOnExit : Bool
}
| GitBackend :
{ directoryPath : Text
, commit : Bool
, configureMerge : Bool
, createIfMissing : Bool
, origin : Optional Text
, pushOnWrite : Bool
, watchFiles : Bool
, pullTimerSeconds : Optional Natural
}
>
, uiConfig :
{ viewList :
List
< SearchWidget
| ConfigListWidget :
{ name : Text, limit : Optional Natural }
>
, configuredLists :
List
{ name : Text
, list :
< QueryList :
{ query :
List
< HasProperty :
{ property :
< DescriptionMatches :
{ filter : Text }
| ParentBlocked
| Blocked
| Waiting
| Pending
| Completed
| Deleted
| IsParent
| OnList
| HasTag : { tag : Text }
| HasParent
>
}
| HasntProperty :
{ property :
< DescriptionMatches :
{ filter : Text }
| ParentBlocked
| Blocked
| Waiting
| Pending
| Completed
| Deleted
| IsParent
| OnList
| HasTag : { tag : Text }
| HasParent
>
}
>
}
| TagList : { name : Text }
| DefinitionList :
{ elements :
List
< ConfigList :
{ name : Text
, limit : Optional Natural
}
| ListElement :
{ item :
< TaskwarriorTask :
{ uuid : Text }
| AdHocTask :
{ description : Text }
| HabiticaTask :
{ task :
< HabiticaDaily
| HabiticaTodo
>
}
| Mail : { id : Text }
>
}
>
}
| ChildrenList : { uuid : Text }
| DependenciesList : { uuid : Text }
| HabiticaList :
{ list : < HabiticaDailys | HabiticaTodos >
}
| Mails
>
}
, uiFeatures :
{ sortInTag : Bool
, treeOption : < NoTree | PartOfTree | DependsTree >
}
}
}
}
>
}
},
PasswordConfig = < Prompt
| Password : { plaintext : Text }
| PasswordCommand : { command : Text }
>,
AccountConfig = { passwordHash : Text
, userConfig :
{ localBackend :
< TaskwarriorBackend :
{ taskRcPath : Optional Text
, taskDataPath : Optional Text
, taskConfig : List { name : Text, value : Text }
, taskBin : Optional Text
, hookListenPort :
< Port : { port : Natural }
| PortRange : { min : Natural, max : Natural }
>
, hookSuffix : Text
, createHooksOnStart : Bool
, removeHooksOnExit : Bool
}
| GitBackend :
{ directoryPath : Text
, commit : Bool
, configureMerge : Bool
, createIfMissing : Bool
, origin : Optional Text
, pushOnWrite : Bool
, watchFiles : Bool
, pullTimerSeconds : Optional Natural
}
>
, uiConfig :
{ viewList :
List
< SearchWidget
| ConfigListWidget : { name : Text, limit : Optional Natural }
>
, configuredLists :
List
{ name : Text
, list :
< QueryList :
{ query :
List
< HasProperty :
{ property :
< DescriptionMatches : { filter : Text }
| ParentBlocked
| Blocked
| Waiting
| Pending
| Completed
| Deleted
| IsParent
| OnList
| HasTag : { tag : Text }
| HasParent
>
}
| HasntProperty :
{ property :
< DescriptionMatches : { filter : Text }
| ParentBlocked
| Blocked
| Waiting
| Pending
| Completed
| Deleted
| IsParent
| OnList
| HasTag : { tag : Text }
| HasParent
>
}
>
}
| TagList : { name : Text }
| DefinitionList :
{ elements :
List
< ConfigList :
{ name : Text, limit : Optional Natural }
| ListElement :
{ item :
< TaskwarriorTask : { uuid : Text }
| AdHocTask : { description : Text }
| HabiticaTask :
{ task :
< HabiticaDaily | HabiticaTodo >
}
| Mail : { id : Text }
>
}
>
}
| ChildrenList : { uuid : Text }
| DependenciesList : { uuid : Text }
| HabiticaList : { list : < HabiticaDailys | HabiticaTodos > }
| Mails
>
}
, uiFeatures :
{ sortInTag : Bool
, treeOption : < NoTree | PartOfTree | DependsTree >
}
}
}
, filterTag : Text
},
DefinitionElement = < ConfigList : { name : Text, limit : Optional Natural }
| ListElement :
{ item :
< TaskwarriorTask : { uuid : Text }
| AdHocTask : { description : Text }
| HabiticaTask : { task : < HabiticaDaily | HabiticaTodo > }
| Mail : { id : Text }
>
}
>,
ListQuery = < QueryList :
{ query :
List
< HasProperty :
{ property :
< DescriptionMatches : { filter : Text }
| ParentBlocked
| Blocked
| Waiting
| Pending
| Completed
| Deleted
| IsParent
| OnList
| HasTag : { tag : Text }
| HasParent
>
}
| HasntProperty :
{ property :
< DescriptionMatches : { filter : Text }
| ParentBlocked
| Blocked
| Waiting
| Pending
| Completed
| Deleted
| IsParent
| OnList
| HasTag : { tag : Text }
| HasParent
>
}
>
}
| TagList : { name : Text }
| DefinitionList :
{ elements :
List
< ConfigList : { name : Text, limit : Optional Natural }
| ListElement :
{ item :
< TaskwarriorTask : { uuid : Text }
| AdHocTask : { description : Text }
| HabiticaTask : { task : < HabiticaDaily | HabiticaTodo > }
| Mail : { id : Text }
>
}
>
}
| ChildrenList : { uuid : Text }
| DependenciesList : { uuid : Text }
| HabiticaList : { list : < HabiticaDailys | HabiticaTodos > }
| Mails
>,
RemoteBackend = { url : Text
, user : Text
, password :
< Prompt
| Password : { plaintext : Text }
| PasswordCommand : { command : Text }
>
},
ListItem = < TaskwarriorTask : { uuid : Text }
| AdHocTask : { description : Text }
| HabiticaTask : { task : < HabiticaDaily | HabiticaTodo > }
| Mail : { id : Text }
>
}

View file

@ -0,0 +1,65 @@
let types = ./types.dhall
let Prelude = https://prelude.dhall-lang.org/package.dhall
let confWid =
\(name : Text) ->
types.Widget.ConfigListWidget { name, limit = None Natural }
let listElement =
\(el : types.ListItem) ->
types.DefinitionElement.ListElement { item = el }
let simpleTask =
\(desc : Text) ->
listElement (types.ListItem.AdHocTask { description = desc })
let defList =
\(name : Text) ->
\(list : List types.DefinitionElement) ->
{ name, list = types.ListQuery.DefinitionList { elements = list } }
let defSimpleList =
\(name : Text) ->
\(list : List Text) ->
defList
name
(Prelude.List.map Text types.DefinitionElement simpleTask list)
in { configuredLists =
[ { name = "Task Baum", list = types.ListQuery.TagList { name = "root" } }
, defSimpleList
"Orga Routine"
[ "Maintenance"
, "Kassandra 1 Dialog"
, "Inbox sortieren"
, "Tasks in Taskbaum einsortieren"
, "Tagesagenda für morgen mit Taglisten"
, "Habitica kontrollieren"
, "Await checken"
]
, defSimpleList "Wochen Routine" [ "Projekte durchgehen" ]
, defSimpleList
"Tee kochen"
[ "Wasser filtern"
, "Wasser kochen"
, "Wasser aufgießen"
, "Teebeutel entnehmen"
, "Neues Wasser filtern"
]
, defList
"Morgen Routine"
[ simpleTask "Wiegen"
, simpleTask "Podcast anmachen"
, simpleTask "Anziehen"
, types.DefinitionElement.ConfigList
{ name = "Tee kochen", limit = None Natural }
, simpleTask "Zähne Putzen"
, simpleTask "Rasieren"
, simpleTask "Frühstücken"
]
]
, uiFeatures = { sortInTag = False, treeOption = types.TreeOption.NoTree }
, viewList =
[ confWid "Task Baum", confWid "Orga Routine", confWid "Morgen Routine" ]
}