aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-11-23 10:30:42 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-11-23 10:30:42 +0100
commitcefd09e90e3c4c59ba1b38e7f296ab2a3dd55b14 (patch)
treed510f564275866f4c670f5ae3edf3ee915edb57e
parenttests(flake): Hook up to the flake's check and package attributes (diff)
downloadnixos-config-cefd09e90e3c4c59ba1b38e7f296ab2a3dd55b14.zip
fix(modules/taskwarrior): Provide an enable option
Diffstat (limited to '')
-rw-r--r--flake/nixosConfigurations/common.nix1
-rw-r--r--modules/by-name/ta/taskwarrior/module.nix14
2 files changed, 13 insertions, 2 deletions
diff --git a/flake/nixosConfigurations/common.nix b/flake/nixosConfigurations/common.nix
index f2df9957..9208b461 100644
--- a/flake/nixosConfigurations/common.nix
+++ b/flake/nixosConfigurations/common.nix
@@ -107,6 +107,7 @@
imv.enable = true;
less.enable = true;
lf.enable = true;
+ taskwarrior.enable = true;
zathura.enable = true;
zsh.enable = true;
};
diff --git a/modules/by-name/ta/taskwarrior/module.nix b/modules/by-name/ta/taskwarrior/module.nix
index ff1569af..0a942820 100644
--- a/modules/by-name/ta/taskwarrior/module.nix
+++ b/modules/by-name/ta/taskwarrior/module.nix
@@ -1,10 +1,20 @@
-{...}: {
+{
+ lib,
+ config,
+ ...
+}: let
+ cfg = config.soispha.programs.taskwarrior;
+in {
+ options.soispha.programs.taskwarrior = {
+ enable = lib.mkEnableOption "taskwarrior-secrets";
+ };
+
# HACK: Migrating the whole `taskwarrior` setup is right now unrealistic, as the module is
# tightly coupled with the `firefox` module, and `neorg` script.
# But to work around the fact that setting the `age` secrets in the legacy module is
# impossible, this module was created as work-around until the `taskwarrior` module can
# be fully migrated. <2024-10-18>
- config = {
+ config = lib.mkIf cfg.enable {
age.secrets = {
taskserverPrivate = {
file = ./secrets/private.key;