move taskwarrior to home-manager

This commit is contained in:
Ingolf Wagner 2024-05-24 10:54:21 +02:00
parent e105d2c306
commit 9601fd454d
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
7 changed files with 51 additions and 47 deletions

View file

@ -1352,11 +1352,11 @@
},
"private_assets": {
"locked": {
"lastModified": 1715197334,
"narHash": "sha256-8rVZd6msm8rvU49XdAmj0rN/ZRBo/tk72RI+k49PitI=",
"lastModified": 1716540670,
"narHash": "sha256-l51flTaxl5I5WgVMc511W4kbmLGr6Fq8ZD7p1BYqCWM=",
"ref": "main",
"rev": "0ec2e8c4fbc36151811f5b9e68f59cdccc5a26eb",
"revCount": 21,
"rev": "1dfb86abb2177269ebd2a74f01959fe0e2a50e8b",
"revCount": 22,
"type": "git",
"url": "ssh://forgejo@git.ingolf-wagner.de/palo/nixos-private-assets.git"
},

View file

@ -17,7 +17,6 @@ with lib;
./pass.nix
./steam.nix
./suspend.nix
./taskwarrior.nix
./vscode.nix
./wayland.nix
./xorg

View file

@ -6,14 +6,15 @@
./editor.nix
./git.nix
./gpg.nix
./hyperland.nix
./i3.nix
./packages
./ssh.nix
./stylix.nix
./taskwarrior.nix
./tmux.nix
./yubikey.nix
./zellij.nix
./hyperland.nix
];
home.stateVersion = "22.11";

View file

@ -84,6 +84,7 @@ with lib;
gojq
jq
ijq
miller
# nomad
unstable.nomad

View file

@ -30,47 +30,20 @@ let
in
{
options.components.gui.taskwarrior.enable = mkOption {
type = bool;
default = config.components.gui.enable;
};
options.components.gui.taskwarrior.config = mkMagicMergeOption {
# bugwarrior (a bit fiddly)
imports = [{
options.bugwarrior.config = mkMagicMergeOption {
type = attrs;
default = { };
};
config = mkIf (config.components.gui.taskwarrior.enable) {
environment.systemPackages = with pkgs; [
taskwarrior
taskwarrior-tui
timewarrior
miller
tasksh
(pkgs.writeShellScriptBin "tsak" ''${pkgs.taskwarrior}/bin/task "$@"'')
(pkgs.writers.writeBashBin "calendar" ''
${pkgs.taskwarrior}/bin/task calendar
${pkgs.taskwarrior}/bin/task calendar_report
'')
unstable.vit
(pkgs.writers.writeBashBin "active" "${taskwarrior-tui}/bin/taskwarrior-tui -r active")
(pkgs.writers.writeBashBin "todo" "${taskwarrior-tui}/bin/taskwarrior-tui -r todo")
taskwarrior-hooks
vdirsyncer
khal
(pkgs.writers.writeBashBin "kalendar" ''
${pkgs.vdirsyncer}/bin/vdirsyncer sync
${pkgs.khal}/bin/ikhal
'')
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
(python3Packages.bugwarrior.overrideAttrs (old: {
home.packages = [
(pkgs.python3Packages.bugwarrior.overrideAttrs (old: {
version = "develop";
src = pkgs.fetchFromGitHub {
owner = "ralphbean";
@ -79,18 +52,47 @@ in
sha256 = "sha256-Geon+ddE58WJ10L4unotzvmZj1Ye0yjZHVQgrR2YWgE=";
};
propagatedBuildInputs = old.propagatedBuildInputs ++ [
python3Packages.pydantic
python3Packages.tomli
python3Packages.email-validator
python3Packages.packaging
pkgs.python3Packages.pydantic
pkgs.python3Packages.tomli
pkgs.python3Packages.email-validator
pkgs.python3Packages.packaging
];
}))
];
#home-manager.users.mainUser.home.file.".config/bugwarrior/bugwarriorrc".source = ./bugwarriorc.ini;
#home-manager.users.mainUser.home.file.".config/bugwarrior/bugwarriorrc".source = (pkgs.formats.toml { }).generate "bugwarriorrc.toml" config.components.gui.taskwarrior.config;
home-manager.users.mainUser.home.file.".config/bugwarrior/bugwarrior.toml".source = (pkgs.formats.toml { }).generate "bugwarriorrc.toml" config.components.gui.taskwarrior.config;
};
}];
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
'')
];
}

View file

@ -35,11 +35,11 @@
components.monitor.opentelemetry.exporter.endpoint = "10.100.0.1:4317"; # orbi
#components.monitor.opentelemetry.exporter.debug = "logs";
home-manager.users.mainUser.home.sessionPath = [ "$HOME/.timewarrior/scripts" ];
sops.secrets.yubikey_u2fAuthFile = { };
components.gui.taskwarrior.config = {
home-manager.users.mainUser.home.sessionPath = [ "$HOME/.timewarrior/scripts" ];
home-manager.users.mainUser.bugwarrior.config = {
general = {
targets = [ "terranix" "my_github" ];
log_level = "INFO";

View file

@ -43,11 +43,12 @@
components.monitor.opentelemetry.exporter.endpoint = "10.100.0.1:4317"; # orbi
components.monitor.exporters.zfs.enable = false;
home-manager.users.mainUser.home.sessionPath = [ "$HOME/.timewarrior/scripts" ];
sops.secrets.yubikey_u2fAuthFile = { };
components.gui.taskwarrior.config = {
home-manager.users.mainUser.home.sessionPath = [ "$HOME/.timewarrior/scripts" ];
home-manager.users.mainUser.bugwarrior.config = {
general = {
targets = [ "terranix" "my_github" ];
log_level = "INFO";