From d9c681752d53b1c4d6888c2b5b10e2982d6503b3 Mon Sep 17 00:00:00 2001 From: maralorn Date: Mon, 16 Jan 2023 04:26:37 +0100 Subject: [PATCH] Various formattings --- apps/kassandra/backend/backend.cabal | 10 +- apps/kassandra/common-config.dhall | 6 +- apps/kassandra/frontend/frontend.cabal | 4 +- apps/kassandra/kassandra/kassandra.cabal | 6 +- apps/kassandra/standalone/standalone.cabal | 10 +- apps/kassandra/weeder.dhall | 12 +- apps/logfeed/logfeed.cabal | 9 +- apps/nixpkgs-bot/nixpkgs-bot.cabal | 2 +- apps/wizards-dialog/wizards-dialog.cabal | 35 +- flake.nix | 2 + home-manager/machines.nix | 2 +- home-manager/roles/kassandra/backend.dhall | 2 +- home-manager/roles/kassandra/types.dhall | 1440 ++++++++++---------- home-manager/roles/status-script.hs | 1 + 14 files changed, 803 insertions(+), 738 deletions(-) diff --git a/apps/kassandra/backend/backend.cabal b/apps/kassandra/backend/backend.cabal index 64770dfe..ae852450 100644 --- a/apps/kassandra/backend/backend.cabal +++ b/apps/kassandra/backend/backend.cabal @@ -58,7 +58,7 @@ library import: common-config hs-source-dirs: src - if impl(ghcjs -any) + if impl(ghcjs) buildable: False build-depends: @@ -66,16 +66,16 @@ library , async , base , containers - , dhall , data-default-class + , dhall , frontend - , say , kassandra , network-simple , obelisk-backend , obelisk-route - , password >=2.0.1.0 + , password >=2.0.1.0 , relude + , say , snap-core , standalone , stm @@ -93,7 +93,7 @@ executable backend main-is: main.hs hs-source-dirs: src-bin - if impl(ghcjs -any) + if impl(ghcjs) buildable: False build-depends: diff --git a/apps/kassandra/common-config.dhall b/apps/kassandra/common-config.dhall index eba7382b..1020dded 100644 --- a/apps/kassandra/common-config.dhall +++ b/apps/kassandra/common-config.dhall @@ -13,6 +13,8 @@ let extensions = , "FlexibleContexts" , "FlexibleInstances" , "GADTs" + , "GeneralizedNewtypeDeriving" + , "ImportQualifiedPost" , "LambdaCase" , "MultiParamTypeClasses" , "NamedFieldPuns" @@ -54,8 +56,8 @@ in '' -- BEGIN dhall generated common configuration -- generate with: dhall text --file common-config.dhall license-file: LICENSE - author: Malte Brandy - maintainer: malte.brandy@maralorn.de + author: maralorn + maintainer: mail@maralorn.de build-type: Simple extra-source-files: CHANGELOG.md diff --git a/apps/kassandra/frontend/frontend.cabal b/apps/kassandra/frontend/frontend.cabal index 07cc5a75..79fe9348 100644 --- a/apps/kassandra/frontend/frontend.cabal +++ b/apps/kassandra/frontend/frontend.cabal @@ -74,6 +74,7 @@ library , optics-th , reflex , reflex-dom + , relude , scientific , taskwarrior , text @@ -81,7 +82,6 @@ library , time , unordered-containers , uuid - , relude exposed-modules: Frontend @@ -101,4 +101,4 @@ executable frontend , reflex-dom ghc-options: -threaded - mixins: base hiding (Prelude) + mixins: base hiding (Prelude) diff --git a/apps/kassandra/kassandra/kassandra.cabal b/apps/kassandra/kassandra/kassandra.cabal index 07c1086f..24457990 100644 --- a/apps/kassandra/kassandra/kassandra.cabal +++ b/apps/kassandra/kassandra/kassandra.cabal @@ -5,14 +5,15 @@ version: 0.1.0.0 -- BEGIN dhall generated common configuration -- generate with: dhall text --file common-config.dhall license-file: LICENSE -author: Malte Brandy -maintainer: malte.brandy@maralorn.de +author: maralorn +maintainer: mail@maralorn.de build-type: Simple extra-source-files: CHANGELOG.md common common-config default-extensions: AllowAmbiguousTypes + BlockArguments ConstraintKinds DataKinds DeriveAnyClass @@ -24,6 +25,7 @@ common common-config FlexibleInstances GADTs GeneralizedNewtypeDeriving + ImportQualifiedPost LambdaCase MultiParamTypeClasses NamedFieldPuns diff --git a/apps/kassandra/standalone/standalone.cabal b/apps/kassandra/standalone/standalone.cabal index 973ef648..b88b6166 100644 --- a/apps/kassandra/standalone/standalone.cabal +++ b/apps/kassandra/standalone/standalone.cabal @@ -5,8 +5,8 @@ version: 0.1.0.0 -- BEGIN dhall generated common configuration -- generate with: dhall text --file common-config.dhall license-file: LICENSE -author: Malte Brandy -maintainer: malte.brandy@maralorn.de +author: maralorn +maintainer: mail@maralorn.de build-type: Simple extra-source-files: CHANGELOG.md @@ -24,6 +24,7 @@ common common-config FlexibleContexts FlexibleInstances GADTs + ImportQualifiedPost LambdaCase MultiParamTypeClasses NamedFieldPuns @@ -78,11 +79,11 @@ library , either , filepath , filepattern - , iCalendar >=0.4 + , iCalendar >=0.4 , kassandra , network-simple , nonempty-containers - , password >=2.0.1.0 + , password >=2.0.1.0 , paths , reflex , reflex-dom @@ -109,4 +110,5 @@ executable kassandra2 , base , kassandra , standalone + ghc-options: -threaded diff --git a/apps/kassandra/weeder.dhall b/apps/kassandra/weeder.dhall index 079a7a02..f8e85ae1 100644 --- a/apps/kassandra/weeder.dhall +++ b/apps/kassandra/weeder.dhall @@ -1 +1,11 @@ -{ roots = [ "^Standalone.standalone$", "^Main.main$", "^Backend.backend$", "^Frontend.frontend$", "^Prelude.makeLabels$", "^Kassandra.Debug.log", "Kassandra.ReflexUtil" ], type-class-roots = True } +{ roots = + [ "^Standalone.standalone\$" + , "^Main.main\$" + , "^Backend.backend\$" + , "^Frontend.frontend\$" + , "^Prelude.makeLabels\$" + , "^Kassandra.Debug.log" + , "Kassandra.ReflexUtil" + ] +, type-class-roots = True +} diff --git a/apps/logfeed/logfeed.cabal b/apps/logfeed/logfeed.cabal index 81df9082..90366034 100644 --- a/apps/logfeed/logfeed.cabal +++ b/apps/logfeed/logfeed.cabal @@ -5,7 +5,6 @@ cabal-version: >=1.10 name: logfeed version: 0.1.0.0 - author: maralorn maintainer: mail@maralorn.de @@ -41,20 +40,20 @@ executable mail2rss base , containers , errors + , exceptions , extra - , feed >=1.3.0.0 + , feed >=1.3.0.0 , filepattern , lens , megaparsec , notmuch + , optparse-applicative , purebred-email , relude , say , string-interpolate + , tagsoup , text , time - , optparse-applicative - , exceptions - , tagsoup default-language: Haskell2010 diff --git a/apps/nixpkgs-bot/nixpkgs-bot.cabal b/apps/nixpkgs-bot/nixpkgs-bot.cabal index 5ca30311..8e8b330c 100644 --- a/apps/nixpkgs-bot/nixpkgs-bot.cabal +++ b/apps/nixpkgs-bot/nixpkgs-bot.cabal @@ -26,6 +26,7 @@ common common-config FlexibleInstances GADTs GeneralizedNewtypeDeriving + ImportQualifiedPost LambdaCase MultiParamTypeClasses NamedFieldPuns @@ -38,7 +39,6 @@ common common-config TypeApplications TypeFamilies UndecidableInstances - ImportQualifiedPost build-depends: , aeson-schemas diff --git a/apps/wizards-dialog/wizards-dialog.cabal b/apps/wizards-dialog/wizards-dialog.cabal index e9ce9c24..840f9698 100644 --- a/apps/wizards-dialog/wizards-dialog.cabal +++ b/apps/wizards-dialog/wizards-dialog.cabal @@ -20,40 +20,43 @@ build-type: Simple extra-source-files: CHANGELOG.md library - ghc-options: -Wall + default-extensions: ImportQualifiedPost + ghc-options: -Wall exposed-modules: Dialog + -- other-extensions: build-depends: - base >=4.13 + ansi-terminal + , base >=4.13 , haskeline - , wizards - , ansi-terminal + , process + , relude , text , witch - , relude - , process + , wizards -- hs-source-dirs: - default-language: Haskell2010 + default-language: Haskell2010 executable hotkeys - main-is: Main.hs + default-extensions: ImportQualifiedPost + main-is: Main.hs + ghc-options: -Wall - ghc-options: -Wall -- other-extensions: build-depends: - base >=4.13 - , aeson >= 2.0.1.0 - , haskeline - , daemons + aeson >=2.0.1.0 , ansi-terminal - , text - , relude + , base >=4.13 + , daemons + , haskeline , process + , relude + , text , witch , wizards , wizards-dialog , yaml -- hs-source-dirs: - default-language: Haskell2010 + default-language: Haskell2010 diff --git a/flake.nix b/flake.nix index 2f43cda0..3749133b 100644 --- a/flake.nix +++ b/flake.nix @@ -46,6 +46,8 @@ statix.enable = true; fourmolu.enable = true; shellcheck.enable = true; + cabal-fmt.enable = true; + dhall-format.enable = true; }; }; }; diff --git a/home-manager/machines.nix b/home-manager/machines.nix index 3fa45833..35d473ab 100644 --- a/home-manager/machines.nix +++ b/home-manager/machines.nix @@ -71,7 +71,7 @@ let ./roles/mpd.nix ./roles/pythia.nix ./roles/research.nix - ./roles/night-shutdown.nix + # ./roles/night-shutdown.nix ./roles/tinkering.nix ./roles/wallpaper.nix ./roles/zettelkasten.nix diff --git a/home-manager/roles/kassandra/backend.dhall b/home-manager/roles/kassandra/backend.dhall index ec11884a..82c787fc 100644 --- a/home-manager/roles/kassandra/backend.dhall +++ b/home-manager/roles/kassandra/backend.dhall @@ -4,7 +4,7 @@ in { users = toMap { maralorn = { filterTag = "" , passwordHash = - "$argon2id$v=19$m=65536,t=2,p=1$2capLVJQQBvndRxOKIVogQ==$wCGgmPx4yVyr+nMM9fWCtn1aPvi3uZDvpdhX85GuIxU=" + "\$argon2id\$v=19\$m=65536,t=2,p=1\$2capLVJQQBvndRxOKIVogQ==\$wCGgmPx4yVyr+nMM9fWCtn1aPvi3uZDvpdhX85GuIxU=" , userConfig = { localBackend = types.LocalBackend.TaskwarriorBackend diff --git a/home-manager/roles/kassandra/types.dhall b/home-manager/roles/kassandra/types.dhall index 1affa0c3..79c19a5c 100644 --- a/home-manager/roles/kassandra/types.dhall +++ b/home-manager/roles/kassandra/types.dhall @@ -1,279 +1,50 @@ -{ -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 - | DefinitionElementWidget : - { name : Text - , definitionElement : - < ConfigList : - { name : Text, limit : Optional Natural } - | ListElement : - { item : - < TaskwarriorTask : { uuid : Text } - | AdHocTask : { description : Text } - | HabiticaTask : - { task : < HabiticaDaily | HabiticaTodo > - } - | Mail : { id : Text } - > - } - | 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 } - | ChildrenList : { uuid : Text } - | DependenciesList : { uuid : Text } - | HabiticaList : - { list : < HabiticaDailys | HabiticaTodos > } - | Mails - > - } +{ StandaloneAccount = + < RemoteAccount : + { backend : + Optional + { url : Text + , user : Text + , password : + < Prompt + | Password : { plaintext : Text } + | PasswordCommand : { command : Text } > - , configuredLists : - List - { name : Text - , list : - List - < ConfigList : { name : Text, limit : Optional Natural } - | ListElement : - { item : - < TaskwarriorTask : { uuid : Text } - | AdHocTask : { description : Text } - | HabiticaTask : - { task : < HabiticaDaily | HabiticaTodo > } - | Mail : { id : Text } - > - } - | 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 } - | ChildrenList : { uuid : Text } - | DependenciesList : { uuid : Text } - | HabiticaList : - { list : < HabiticaDailys | HabiticaTodos > } - | Mails - > - } - , uiFeatures : - { sortInTag : Bool - , treeOption : < NoTree | PartOfTree | DependsTree > - } - } + } } - } ->, -BackendConfig = { users : - List - { mapKey : Text - , mapValue : - { 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 - | DefinitionElementWidget : - { name : Text - , definitionElement : - < ConfigList : - { name : Text, limit : Optional Natural } - | ListElement : - { item : - < TaskwarriorTask : { uuid : Text } - | AdHocTask : { description : Text } - | HabiticaTask : - { task : - < HabiticaDaily | HabiticaTodo > - } - | Mail : { id : Text } - > - } - | 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 } - | ChildrenList : { uuid : Text } - | DependenciesList : { uuid : Text } - | HabiticaList : - { list : < HabiticaDailys | HabiticaTodos > - } - | Mails - > - } + | 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 } > - , configuredLists : - List - { name : Text - , list : - List + , 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 + | DefinitionElementWidget : + { name : Text + , definitionElement : < ConfigList : { name : Text, limit : Optional Natural } | ListElement : @@ -331,172 +102,86 @@ BackendConfig = { users : { list : < HabiticaDailys | HabiticaTodos > } | Mails > - } - , uiFeatures : - { sortInTag : Bool - , treeOption : < NoTree | PartOfTree | DependsTree > + } + > + , configuredLists : + List + { name : Text + , list : + List + < ConfigList : + { name : Text, limit : Optional Natural } + | ListElement : + { item : + < TaskwarriorTask : { uuid : Text } + | AdHocTask : { description : Text } + | HabiticaTask : + { task : + < HabiticaDaily | HabiticaTodo > + } + | Mail : { id : Text } + > + } + | 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 } + | ChildrenList : { uuid : Text } + | DependenciesList : { uuid : Text } + | HabiticaList : + { list : < HabiticaDailys | HabiticaTodos > } + | Mails + > } - } - } - , filterTag : Text - } - } -}, -Widget = < SearchWidget -| DefinitionElementWidget : - { name : Text - , definitionElement : - < ConfigList : { name : Text, limit : Optional Natural } - | ListElement : - { item : - < TaskwarriorTask : { uuid : Text } - | AdHocTask : { description : Text } - | HabiticaTask : { task : < HabiticaDaily | HabiticaTodo > } - | Mail : { id : Text } - > + , uiFeatures : + { sortInTag : Bool + , treeOption : < NoTree | PartOfTree | DependsTree > + } + } } - | 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 } - | ChildrenList : { uuid : Text } - | DependenciesList : { uuid : Text } - | HabiticaList : { list : < HabiticaDailys | HabiticaTodos > } - | Mails - > - } ->, -NamedListQuery = { name : Text -, list : - List - < ConfigList : { name : Text, limit : Optional Natural } - | ListElement : - { item : - < TaskwarriorTask : { uuid : Text } - | AdHocTask : { description : Text } - | HabiticaTask : { task : < HabiticaDaily | HabiticaTodo > } - | Mail : { id : Text } - > - } - | 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 } - | 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 : + } + > +, BackendConfig = + { users : + List + { mapKey : Text + , mapValue : + { passwordHash : Text + , userConfig : { localBackend : < TaskwarriorBackend : { taskRcPath : Optional Text @@ -667,280 +352,639 @@ StandaloneConfig = { backends : } } } + , filterTag : Text } - > - } -}, -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 - | DefinitionElementWidget : - { name : Text - , definitionElement : - < ConfigList : { name : Text, limit : Optional Natural } - | ListElement : - { item : - < TaskwarriorTask : { uuid : Text } - | AdHocTask : { description : Text } - | HabiticaTask : - { task : < HabiticaDaily | HabiticaTodo > } - | Mail : { id : Text } + } + } +, Widget = + < SearchWidget + | DefinitionElementWidget : + { name : Text + , definitionElement : + < ConfigList : { name : Text, limit : Optional Natural } + | ListElement : + { item : + < TaskwarriorTask : { uuid : Text } + | AdHocTask : { description : Text } + | HabiticaTask : { task : < HabiticaDaily | HabiticaTodo > } + | Mail : { id : Text } + > + } + | QueryList : + { query : + List + < HasProperty : + { property : + < DescriptionMatches : { filter : Text } + | ParentBlocked + | Blocked + | Waiting + | Pending + | Completed + | Deleted + | IsParent + | OnList + | HasTag : { tag : Text } + | HasParent > } - | QueryList : - { query : + | HasntProperty : + { property : + < DescriptionMatches : { filter : Text } + | ParentBlocked + | Blocked + | Waiting + | Pending + | Completed + | Deleted + | IsParent + | OnList + | HasTag : { tag : Text } + | HasParent + > + } + > + } + | TagList : { name : Text } + | ChildrenList : { uuid : Text } + | DependenciesList : { uuid : Text } + | HabiticaList : { list : < HabiticaDailys | HabiticaTodos > } + | Mails + > + } + > +, NamedListQuery = + { name : Text + , list : + List + < ConfigList : { name : Text, limit : Optional Natural } + | ListElement : + { item : + < TaskwarriorTask : { uuid : Text } + | AdHocTask : { description : Text } + | HabiticaTask : { task : < HabiticaDaily | HabiticaTodo > } + | Mail : { id : Text } + > + } + | 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 } + | 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 - < 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 + < SearchWidget + | DefinitionElementWidget : + { name : Text + , definitionElement : + < ConfigList : + { name : Text + , limit : Optional Natural + } + | ListElement : + { item : + < TaskwarriorTask : + { uuid : Text } + | AdHocTask : + { description : Text } + | HabiticaTask : + { task : + < HabiticaDaily + | HabiticaTodo + > + } + | Mail : { id : Text } + > + } + | 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 } + | ChildrenList : { uuid : Text } + | DependenciesList : { uuid : Text } + | HabiticaList : + { list : + < HabiticaDailys + | HabiticaTodos + > + } + | Mails > } > + , configuredLists : + List + { name : Text + , list : + List + < ConfigList : + { name : Text + , limit : Optional Natural + } + | ListElement : + { item : + < TaskwarriorTask : + { uuid : Text } + | AdHocTask : + { description : Text } + | HabiticaTask : + { task : + < HabiticaDaily + | HabiticaTodo + > + } + | Mail : { id : Text } + > + } + | 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 } + | ChildrenList : { uuid : Text } + | DependenciesList : { uuid : Text } + | HabiticaList : + { list : + < HabiticaDailys | HabiticaTodos > + } + | Mails + > + } + , uiFeatures : + { sortInTag : Bool + , treeOption : + < NoTree | PartOfTree | DependsTree > + } } - | TagList : { name : Text } - | ChildrenList : { uuid : Text } - | DependenciesList : { uuid : Text } - | HabiticaList : - { list : < HabiticaDailys | HabiticaTodos > } - | Mails - > + } } > - , configuredLists : - List - { name : Text - , list : - List - < ConfigList : { name : Text, limit : Optional Natural } - | ListElement : - { item : - < TaskwarriorTask : { uuid : Text } - | AdHocTask : { description : Text } - | HabiticaTask : - { task : < HabiticaDaily | HabiticaTodo > } - | Mail : { id : Text } - > - } - | 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 } - | 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 } - > - } -| 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 } -| ChildrenList : { uuid : Text } -| DependenciesList : { uuid : Text } -| HabiticaList : { list : < HabiticaDailys | HabiticaTodos > } -| Mails ->, -ListQuery = List - < ConfigList : { name : Text, limit : Optional Natural } - | ListElement : - { item : - < TaskwarriorTask : { uuid : Text } - | AdHocTask : { description : Text } - | HabiticaTask : { task : < HabiticaDaily | HabiticaTodo > } - | Mail : { id : Text } - > - } - | 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 } - | ChildrenList : { uuid : Text } - | DependenciesList : { uuid : Text } - | HabiticaList : { list : < HabiticaDailys | HabiticaTodos > } - | Mails - >, -RemoteBackend = { url : Text -, user : Text -, password : +, PasswordConfig = < Prompt | Password : { plaintext : Text } | PasswordCommand : { command : Text } > -}, -ListItem = < TaskwarriorTask : { uuid : Text } -| AdHocTask : { description : Text } -| HabiticaTask : { task : < HabiticaDaily | HabiticaTodo > } -| Mail : { id : 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 + | DefinitionElementWidget : + { name : Text + , definitionElement : + < ConfigList : + { name : Text, limit : Optional Natural } + | ListElement : + { item : + < TaskwarriorTask : { uuid : Text } + | AdHocTask : { description : Text } + | HabiticaTask : + { task : < HabiticaDaily | HabiticaTodo > + } + | Mail : { id : Text } + > + } + | 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 } + | ChildrenList : { uuid : Text } + | DependenciesList : { uuid : Text } + | HabiticaList : + { list : < HabiticaDailys | HabiticaTodos > } + | Mails + > + } + > + , configuredLists : + List + { name : Text + , list : + List + < ConfigList : { name : Text, limit : Optional Natural } + | ListElement : + { item : + < TaskwarriorTask : { uuid : Text } + | AdHocTask : { description : Text } + | HabiticaTask : + { task : < HabiticaDaily | HabiticaTodo > } + | Mail : { id : Text } + > + } + | 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 } + | 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 } + > + } + | 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 } + | ChildrenList : { uuid : Text } + | DependenciesList : { uuid : Text } + | HabiticaList : { list : < HabiticaDailys | HabiticaTodos > } + | Mails + > +, ListQuery = + List + < ConfigList : { name : Text, limit : Optional Natural } + | ListElement : + { item : + < TaskwarriorTask : { uuid : Text } + | AdHocTask : { description : Text } + | HabiticaTask : { task : < HabiticaDaily | HabiticaTodo > } + | Mail : { id : Text } + > + } + | 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 } + | 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 } + > } diff --git a/home-manager/roles/status-script.hs b/home-manager/roles/status-script.hs index c0ee4dff..1fc956f4 100644 --- a/home-manager/roles/status-script.hs +++ b/home-manager/roles/status-script.hs @@ -1,5 +1,6 @@ {-# LANGUAGE BlockArguments #-} {-# LANGUAGE ExtendedDefaultRules #-} +{-# LANGUAGE ImportQualifiedPost #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-}