mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-04-22 06:19:11 +00:00
profiles/services: remove path assertions
It was supposed to create the directory if it wasn't found which is self-defeating. In any case, it will still fail if the directory is in the way of an unmounted device.
This commit is contained in:
parent
4708d7acc2
commit
a916d78f09
@ -104,6 +104,9 @@ in {
|
||||
documentation = [ "https://docs.archivebox.io/" ];
|
||||
path = with pkgs;
|
||||
[ ripgrep coreutils ] ++ pkgSet ++ [ config.programs.git.package ];
|
||||
preStart = ''
|
||||
mkdir -p ${lib.escapeShellArg cfg.archivePath}
|
||||
'';
|
||||
script = ''
|
||||
echo "${lib.concatStringsSep "\n" value.links}" \
|
||||
| archivebox add ${lib.concatStringsSep " " value.extraArgs}
|
||||
@ -123,10 +126,6 @@ in {
|
||||
SystemCallErrorNumber = "EPERM";
|
||||
WorkingDirectory = cfg.archivePath;
|
||||
};
|
||||
unitConfig = {
|
||||
AssertPathIsReadWrite = cfg.archivePath;
|
||||
AssertPathIsDirectory = cfg.archivePath;
|
||||
};
|
||||
}) cfg.jobs)
|
||||
|
||||
(lib.mkIf cfg.webserver.enable {
|
||||
@ -135,6 +134,9 @@ in {
|
||||
after = [ "network.target" ];
|
||||
documentation = [ "https://docs.archivebox.io/" ];
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
preStart = ''
|
||||
mkdir -p ${lib.escapeShellArg cfg.archivePath}
|
||||
'';
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.archivebox}/bin/archivebox server localhost:${
|
||||
toString cfg.webserver.port
|
||||
@ -154,10 +156,6 @@ in {
|
||||
SystemCallErrorNumber = "EPERM";
|
||||
WorkingDirectory = cfg.archivePath;
|
||||
};
|
||||
unitConfig = {
|
||||
AssertPathIsReadWrite = cfg.archivePath;
|
||||
AssertPathIsDirectory = cfg.archivePath;
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
|
@ -166,10 +166,6 @@ in {
|
||||
SystemCallFilter = "@system-service";
|
||||
SystemCallErrorNumber = "EPERM";
|
||||
};
|
||||
unitConfig = {
|
||||
AssertPathIsReadWrite = cfg.archivePath;
|
||||
AssertPathIsDirectory = cfg.archivePath;
|
||||
};
|
||||
}) cfg.jobs;
|
||||
};
|
||||
}
|
||||
|
@ -144,10 +144,6 @@ in {
|
||||
SystemCallFilter = "@system-service";
|
||||
SystemCallErrorNumber = "EPERM";
|
||||
};
|
||||
unitConfig = {
|
||||
AssertPathIsReadWrite = cfg.archivePath;
|
||||
AssertPathIsDirectory = cfg.archivePath;
|
||||
};
|
||||
}) cfg.jobs;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user