mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-04-28 18: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/" ];
|
documentation = [ "https://docs.archivebox.io/" ];
|
||||||
path = with pkgs;
|
path = with pkgs;
|
||||||
[ ripgrep coreutils ] ++ pkgSet ++ [ config.programs.git.package ];
|
[ ripgrep coreutils ] ++ pkgSet ++ [ config.programs.git.package ];
|
||||||
|
preStart = ''
|
||||||
|
mkdir -p ${lib.escapeShellArg cfg.archivePath}
|
||||||
|
'';
|
||||||
script = ''
|
script = ''
|
||||||
echo "${lib.concatStringsSep "\n" value.links}" \
|
echo "${lib.concatStringsSep "\n" value.links}" \
|
||||||
| archivebox add ${lib.concatStringsSep " " value.extraArgs}
|
| archivebox add ${lib.concatStringsSep " " value.extraArgs}
|
||||||
@ -123,10 +126,6 @@ in {
|
|||||||
SystemCallErrorNumber = "EPERM";
|
SystemCallErrorNumber = "EPERM";
|
||||||
WorkingDirectory = cfg.archivePath;
|
WorkingDirectory = cfg.archivePath;
|
||||||
};
|
};
|
||||||
unitConfig = {
|
|
||||||
AssertPathIsReadWrite = cfg.archivePath;
|
|
||||||
AssertPathIsDirectory = cfg.archivePath;
|
|
||||||
};
|
|
||||||
}) cfg.jobs)
|
}) cfg.jobs)
|
||||||
|
|
||||||
(lib.mkIf cfg.webserver.enable {
|
(lib.mkIf cfg.webserver.enable {
|
||||||
@ -135,6 +134,9 @@ in {
|
|||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
documentation = [ "https://docs.archivebox.io/" ];
|
documentation = [ "https://docs.archivebox.io/" ];
|
||||||
wantedBy = [ "graphical-session.target" ];
|
wantedBy = [ "graphical-session.target" ];
|
||||||
|
preStart = ''
|
||||||
|
mkdir -p ${lib.escapeShellArg cfg.archivePath}
|
||||||
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${pkgs.archivebox}/bin/archivebox server localhost:${
|
ExecStart = "${pkgs.archivebox}/bin/archivebox server localhost:${
|
||||||
toString cfg.webserver.port
|
toString cfg.webserver.port
|
||||||
@ -154,10 +156,6 @@ in {
|
|||||||
SystemCallErrorNumber = "EPERM";
|
SystemCallErrorNumber = "EPERM";
|
||||||
WorkingDirectory = cfg.archivePath;
|
WorkingDirectory = cfg.archivePath;
|
||||||
};
|
};
|
||||||
unitConfig = {
|
|
||||||
AssertPathIsReadWrite = cfg.archivePath;
|
|
||||||
AssertPathIsDirectory = cfg.archivePath;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
@ -166,10 +166,6 @@ in {
|
|||||||
SystemCallFilter = "@system-service";
|
SystemCallFilter = "@system-service";
|
||||||
SystemCallErrorNumber = "EPERM";
|
SystemCallErrorNumber = "EPERM";
|
||||||
};
|
};
|
||||||
unitConfig = {
|
|
||||||
AssertPathIsReadWrite = cfg.archivePath;
|
|
||||||
AssertPathIsDirectory = cfg.archivePath;
|
|
||||||
};
|
|
||||||
}) cfg.jobs;
|
}) cfg.jobs;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -144,10 +144,6 @@ in {
|
|||||||
SystemCallFilter = "@system-service";
|
SystemCallFilter = "@system-service";
|
||||||
SystemCallErrorNumber = "EPERM";
|
SystemCallErrorNumber = "EPERM";
|
||||||
};
|
};
|
||||||
unitConfig = {
|
|
||||||
AssertPathIsReadWrite = cfg.archivePath;
|
|
||||||
AssertPathIsDirectory = cfg.archivePath;
|
|
||||||
};
|
|
||||||
}) cfg.jobs;
|
}) cfg.jobs;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user