Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
parent
4f53f5de75
commit
c80ebf9355
1 changed files with 26 additions and 0 deletions
26
modules/scripts/datepath.nix
Normal file
26
modules/scripts/datepath.nix
Normal 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}))
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue