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

View file

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

View file

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

View file

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

View file

@ -30,38 +30,61 @@ let
in in
{ {
options.components.gui.taskwarrior.enable = mkOption {
type = bool;
default = config.components.gui.enable;
};
options.components.gui.taskwarrior.config = mkMagicMergeOption { # bugwarrior (a bit fiddly)
type = attrs; imports = [{
default = { }; options.bugwarrior.config = mkMagicMergeOption {
}; type = attrs;
default = { };
};
config = mkIf (config.components.gui.taskwarrior.enable) { 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
environment.systemPackages = with pkgs; [ 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
taskwarrior-tui taskwarrior-tui
timewarrior timewarrior
miller
tasksh tasksh
taskwarrior-hooks
(pkgs.writeShellScriptBin "tsak" ''${pkgs.taskwarrior}/bin/task "$@"'') (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.writers.writeBashBin "calendar" ''
${pkgs.taskwarrior}/bin/task calendar ${pkgs.taskwarrior}/bin/task calendar
${pkgs.taskwarrior}/bin/task calendar_report ${pkgs.taskwarrior}/bin/task calendar_report
'') '')
unstable.vit # todo : belongs to calendar.nix
(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 vdirsyncer
khal khal
(pkgs.writers.writeBashBin "kalendar" '' (pkgs.writers.writeBashBin "kalendar" ''
@ -69,28 +92,7 @@ in
${pkgs.khal}/bin/ikhal ${pkgs.khal}/bin/ikhal
'') '')
# todo : before deleting this, put it in logseq
(python3Packages.bugwarrior.overrideAttrs (old: {
version = "develop";
src = pkgs.fetchFromGitHub {
owner = "ralphbean";
repo = "bugwarrior";
rev = "eb19a702a698f9c8c3ce2a1fe41f35872d9ae398";
sha256 = "sha256-Geon+ddE58WJ10L4unotzvmZj1Ye0yjZHVQgrR2YWgE=";
};
propagatedBuildInputs = old.propagatedBuildInputs ++ [
python3Packages.pydantic
python3Packages.tomli
python3Packages.email-validator
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;
};
} }

View file

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

View file

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