Compare commits
2 Commits
b6184937bf
...
12897de54f
| Author | SHA1 | Date | |
|---|---|---|---|
| 12897de54f | |||
| 41eddeaec7 |
+311
-291
File diff suppressed because it is too large
Load Diff
@@ -1457,6 +1457,26 @@ The configuration is done in the home manager section.
|
||||
|
||||
** Setting the config
|
||||
#+begin_src nix :tangle configuration/end_script.nix :noweb tangle :mkdirp yes
|
||||
{ lib, builtins, ... }:
|
||||
|
||||
let
|
||||
scriptPath = "/path/to/your/script";
|
||||
scriptExists = builtins.pathExists 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 = true;
|
||||
ExecStart = "${scriptPath}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
#+end_src
|
||||
|
||||
|
||||
@@ -1 +1,20 @@
|
||||
{ lib, builtins, ... }:
|
||||
|
||||
let
|
||||
scriptPath = "/path/to/your/script";
|
||||
scriptExists = builtins.pathExists 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 = true;
|
||||
ExecStart = "${scriptPath}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user