17 lines
466 B
Nix
17 lines
466 B
Nix
{ config, pkgs, flakeRoot, lib, ... }:
|
|
let
|
|
scriptPath = flakeRoot + "/assets/scripts/end_script.sh";
|
|
scriptExists = builtins.pathExists scriptPath;
|
|
in
|
|
{
|
|
systemd.user.services.endScript = lib.mkIf scriptExists {
|
|
description = "Run end script after Home Manager";
|
|
wantedBy = [ "default.target" ]; # Enable the service
|
|
after = [ "home-manager-activate.service" ];
|
|
serviceConfig.Type = "oneshot";
|
|
script = ''
|
|
${scriptPath}
|
|
'';
|
|
};
|
|
}
|