diff --git a/modules/scripts/today.nix b/modules/scripts/today.nix new file mode 100644 index 00000000..1abbee1f --- /dev/null +++ b/modules/scripts/today.nix @@ -0,0 +1,26 @@ +{ withSystem, ... }: + +let + name = "today"; +in +{ + perSystem = + { pkgs, ... }: + { + packages.${name} = pkgs.writeShellApplication { + inherit name; + + runtimeInputs = with pkgs; [ coreutils ]; + + text = ''date "+%x"''; + }; + }; + + flake.modules.homeManager.base = + { pkgs, ... }: + { + home.packages = [ + (withSystem pkgs.system (psArgs: psArgs.config.packages.${name})) + ]; + }; +} diff --git a/modules/scripts/today2.nix b/modules/scripts/today2.nix new file mode 100644 index 00000000..90a76c59 --- /dev/null +++ b/modules/scripts/today2.nix @@ -0,0 +1,26 @@ +{ withSystem, ... }: + +let + name = "today2"; +in +{ + perSystem = + { pkgs, ... }: + { + packages.${name} = pkgs.writeShellApplication { + inherit name; + + runtimeInputs = with pkgs; [ coreutils ]; + + text = ''date "+%F"''; + }; + }; + + flake.modules.homeManager.base = + { pkgs, ... }: + { + home.packages = [ + (withSystem pkgs.system (psArgs: psArgs.config.packages.${name})) + ]; + }; +}