17 lines
351 B
Nix
17 lines
351 B
Nix
{ lib, config, pkgs, ... }:
|
|
let
|
|
script = pkgs.writeShellScriptBin "startScript" ''
|
|
#!${pkgs.bash}/bin/bash
|
|
set -euo pipefail
|
|
TIMESTAMP_FILE="~/timestamp.txt"
|
|
date +"%Y-%m-%d %H:%M:%S" > "$TIMESTAMP_FILE"
|
|
'';
|
|
in
|
|
{
|
|
system.activationScripts.startScript = lib.mkIf true {
|
|
text = ''
|
|
${script}/bin/startScript
|
|
'';
|
|
};
|
|
}
|