17 lines
479 B
Nix
17 lines
479 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 = lib.mkDefault []; # Empty list to avoid automatic enablement
|
|
after = [ "home-manager-activate.service" ];
|
|
serviceConfig.Type = "oneshot";
|
|
script = ''
|
|
${scriptPath}
|
|
'';
|
|
};
|
|
}
|