mirror of
https://github.com/nix-community/home-manager
synced 2025-02-17 05:35:06 +01:00
todoman: add todoman module
Adds Mikilio as maintainer for new module for todoman a standards-based task manager based on iCalendar Apply suggestions from code review Co-authored-by: Robert Helgesson <robert@rycee.net> Update modules/programs/todoman.nix Co-authored-by: Robert Helgesson <robert@rycee.net>
This commit is contained in:
parent
f2c5ba5e72
commit
6f6587cbf6
3 changed files with 69 additions and 0 deletions
|
@ -424,6 +424,12 @@
|
||||||
github = "mainrs";
|
github = "mainrs";
|
||||||
githubId = 5113257;
|
githubId = 5113257;
|
||||||
};
|
};
|
||||||
|
mikilio = {
|
||||||
|
name = "mikilio";
|
||||||
|
email = "official.mikilio+dev@gmail.com";
|
||||||
|
github = "mikilio";
|
||||||
|
githubId = 86004375;
|
||||||
|
};
|
||||||
kmaasrud = {
|
kmaasrud = {
|
||||||
name = "Knut Magnus Aasrud";
|
name = "Knut Magnus Aasrud";
|
||||||
email = "km@aasrud.com";
|
email = "km@aasrud.com";
|
||||||
|
|
|
@ -236,6 +236,7 @@ let
|
||||||
./programs/tmate.nix
|
./programs/tmate.nix
|
||||||
./programs/tmux.nix
|
./programs/tmux.nix
|
||||||
./programs/tofi.nix
|
./programs/tofi.nix
|
||||||
|
./programs/todoman.nix
|
||||||
./programs/topgrade.nix
|
./programs/topgrade.nix
|
||||||
./programs/translate-shell.nix
|
./programs/translate-shell.nix
|
||||||
./programs/urxvt.nix
|
./programs/urxvt.nix
|
||||||
|
|
62
modules/programs/todoman.nix
Normal file
62
modules/programs/todoman.nix
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
cfg = config.programs.todoman;
|
||||||
|
|
||||||
|
format = pkgs.formats.keyValue { };
|
||||||
|
|
||||||
|
in {
|
||||||
|
|
||||||
|
meta.maintainers = [ hm.maintainers.mikilio ];
|
||||||
|
|
||||||
|
options.programs.todoman = {
|
||||||
|
enable = lib.mkEnableOption "todoman";
|
||||||
|
|
||||||
|
glob = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "*";
|
||||||
|
description = ''
|
||||||
|
The glob expansion which matches all directories relevant.
|
||||||
|
'';
|
||||||
|
example = "*/*";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig = mkOption {
|
||||||
|
type = types.lines;
|
||||||
|
default = "";
|
||||||
|
description = ''
|
||||||
|
Text for configuration of todoman.
|
||||||
|
The syntax is Python.
|
||||||
|
|
||||||
|
See [docs](`https://todoman.readthedocs.io/en/stable/man.html#id5`).
|
||||||
|
for the full list of options.
|
||||||
|
'';
|
||||||
|
example = ''
|
||||||
|
date_format = "%Y-%m-%d";
|
||||||
|
time_format = "%H:%M";
|
||||||
|
default_list = "Personal";
|
||||||
|
default_due = 48;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
assertions = [{
|
||||||
|
assertion = config.accounts.calendar ? basePath;
|
||||||
|
message = ''
|
||||||
|
A base directory for calendars must be specified via
|
||||||
|
`accounts.calendar.basePath` to generate config for todoman
|
||||||
|
'';
|
||||||
|
}];
|
||||||
|
|
||||||
|
home.packages = [ pkgs.todoman ];
|
||||||
|
|
||||||
|
xdg.configFile."todoman/config.py".text = lib.concatLines [
|
||||||
|
''path = "${config.accounts.calendar.basePath}/${cfg.glob}"''
|
||||||
|
cfg.config
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue