depot/modules/systemd-extras/strict-mounts.nix

18 lines
493 B
Nix
Raw Permalink Normal View History

2023-08-23 19:03:02 +03:00
{ lib, ... }:
with lib;
{
options.systemd.services = mkOption {
type = with types; attrsOf (submodule ({ config, ... }: {
options.strictMounts = mkOption {
description = "Mount points which this service strictly depends on. What that means is up to other modules.";
type = with types; listOf path;
default = [];
};
config = mkIf (config.strictMounts != []) {
unitConfig.RequiresMountsFor = config.strictMounts;
};
}));
};
}