Files
nixos/henrovnix_ok/end_script.nix
T
2026-03-04 19:04:00 +01:00

19 lines
567 B
Nix

{ lib, config, pkgs, flakeRoot ... }:
let
scriptPath = flakeRoot + "/assets/scripts/end_script.sh";
scriptExists = lib.fileExists scriptPath;
in
{
systemd.user.services.endScript = lib.mkIf scriptExists {
description = "Run end script after Home Manager";
wantedBy = [ "multi-user.target" ];
after = [ "home-manager-activate.service" ];
serviceConfig.Type = "oneshot";
script = ''
echo "Flake root: ${flakeRoot}" >> /tmp/flake_root.log
echo "Script path: ${scriptPath}" >> /tmp/script_path.log
${scriptPath}
'';
};
}