Add datepath script
All checks were successful
/ check (push) Successful in 1m53s

Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
Oliver Davies 2025-09-24 23:40:15 +01:00
parent 4f53f5de75
commit c80ebf9355

View file

@ -0,0 +1,26 @@
{ withSystem, ... }:
let
name = "datepath";
in
{
perSystem =
{ pkgs, ... }:
{
packages.${name} = pkgs.writeShellApplication {
inherit name;
runtimeInputs = with pkgs; [ coreutils ];
text = ''date "+%4Y/%m/%d" "-d ''${*:-now}"'';
};
};
flake.modules.homeManager.base =
{ pkgs, ... }:
{
home.packages = [
(withSystem pkgs.system (psArgs: psArgs.config.packages.${name}))
];
};
}