Switch to a systemd unit file to remove the need for home-manager.
This commit is contained in:
parent
83eaba357f
commit
f667c9daa6
@ -116,11 +116,6 @@ in
|
||||
let
|
||||
cfg = config.me.install.file;
|
||||
install_file_targets = filter (target: config.me.install.file."${target}".enable) (attrNames cfg);
|
||||
in
|
||||
{
|
||||
home.activation = {
|
||||
installFiles = home-manager.lib.hm.dag.entryAfter [ "writeBoundary" ] (
|
||||
let
|
||||
install_commands = builtins.map (
|
||||
target:
|
||||
let
|
||||
@ -135,8 +130,25 @@ in
|
||||
''
|
||||
) install_file_targets;
|
||||
in
|
||||
(lib.strings.concatStringsSep "\n" install_commands)
|
||||
);
|
||||
{
|
||||
systemd.services.me-install-file = {
|
||||
enable = true;
|
||||
description = "me-install-file";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
wants = [ "multi-user.target" ];
|
||||
after = [ "multi-user.target" ];
|
||||
# path = with pkgs; [
|
||||
# zfs
|
||||
# ];
|
||||
unitConfig.DefaultDependencies = "no";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = "yes";
|
||||
};
|
||||
script = (lib.strings.concatStringsSep "\n" install_commands);
|
||||
# preStop = ''
|
||||
# rm -f /home/talexander/.docker/config.json
|
||||
# '';
|
||||
};
|
||||
}
|
||||
))
|
||||
|
Loading…
x
Reference in New Issue
Block a user