blob: 3c5e9799ff5be0e0dff1fd480fd2aeb27f73105d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
{
config,
lib,
pkgs,
...
}: let
cfg = config.features.gui.desktops.niri.parts.iota-maker;
inboxDirectory = "~/Sync/vault/inbox";
in {
options.features.gui.desktops.niri.parts.iota-maker.enable = lib.mkEnableOption "iota maker";
config = lib.mkIf cfg.enable {
home.packages = [
(pkgs.writers.writeNuBin "iota-maker" ''
let iota_text = fuzzel -d -l 0 -p "" -x 8 -y 8 -w 40
let iota_name = date now | format date "%s"
let iota_path = ("${inboxDirectory}" + "/" + $iota_name + ".md") | path expand
$iota_text | save $iota_path
'')
];
};
}
|