21 lines
438 B
Nix
21 lines
438 B
Nix
{ lib, ... }:
|
|
|
|
let
|
|
scriptPath = "/path/to/your/script";
|
|
scriptExists = lib.fileExists scriptPath;
|
|
in
|
|
{
|
|
systemd.user.services.endScript = lib.mkIf scriptExists {
|
|
description = "Run end script after Home Manager";
|
|
after = [
|
|
"home-manager-activate.service"
|
|
"graphical-session.target"
|
|
];
|
|
serviceConfig = {
|
|
Type = "oneshot";
|
|
RemainAfterExit = yes;
|
|
ExecStart = "${scriptPath}";
|
|
};
|
|
};
|
|
}
|