clock-rs: add module

clock-rs is a modern, digital clock that effortlessly runs in your terminal
This commit is contained in:
Oughie 2025-02-01 22:25:43 +01:00 committed by Austin Horstman
parent ac21ae3716
commit 14eda3db4e
8 changed files with 154 additions and 0 deletions

View file

@ -0,0 +1,42 @@
{ pkgs, ... }:
{
config = {
programs.clock-rs = {
enable = true;
settings = {
general = {
color = "magenta";
interval = 250;
blink = true;
bold = true;
};
position = {
horizontal = "start";
vertical = "end";
};
date = {
fmt = "%A, %B %d, %Y";
use_12h = true;
utc = true;
hide_seconds = true;
};
};
};
nmt.script =
let
configDir =
if pkgs.stdenv.isDarwin then
"home-files/Library/Application Support/clock-rs"
else
"home-files/.config/clock-rs";
in
''
assertFileExists "${configDir}/conf.toml"
assertFileContent "${configDir}/conf.toml" \
${./example-settings-expected.toml}
'';
};
}