nix-config/modules/scripts/now.nix
Oliver Davies c79e19efe5
All checks were successful
/ check (push) Successful in 1m1s
Add now and hnow scripts
Based on ones in https://github.com/rwxrob/dot.
2025-09-03 21:02:06 +01:00

32 lines
592 B
Nix

{ withSystem, ... }:
let
name = "now";
in
{
perSystem =
{ pkgs, ... }:
{
packages.${name} = pkgs.writeShellApplication {
inherit name;
runtimeInputs = with pkgs; [ coreutils ];
text = ''
# Based on https://github.com/rwxrob/dot/blob/main/scripts/now.
out=$(date "+%A, %B %e, %Y, %R %Z")
echo "''${out// / }"
'';
};
};
flake.modules.homeManager.base =
{ pkgs, ... }:
{
home.packages = [
(withSystem pkgs.system (psArgs: psArgs.config.packages.${name}))
];
};
}