Rebuilt nixes
This commit is contained in:
1 parent
185f4ae975
commit
fc26270df4
5 files changed
+331
-342
No files matched your search
@@ -1,16 +1,14 @@
|
||||
{ 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}
|
||||
'';
|
||||
systemd.user.services.endScript = lib.mkIf scriptExists {
|
||||
description = "Run end script after Home Manager";
|
||||
wantedBy = [ ]; # Not needed for user services
|
||||
after = [
|
||||
"home-manager-activate.service"
|
||||
"graphical-session.target" # If using a graphical session
|
||||
];
|
||||
wantedBy = [ "default.target" ]; # This is redundant for user services
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = yes;
|
||||
ExecStart = "${scriptPath}";
|
||||
};
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user