nix-config/modules/scripts/datepath.nix
Oliver Davies c80ebf9355
All checks were successful
/ check (push) Successful in 1m53s
Add datepath script
Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
2025-09-24 23:40:15 +01:00

26 lines
468 B
Nix

{ 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}))
];
};
}