nixos/modules/services/nixseperatedebuginfo.nix

20 lines
789 B
Nix
Raw Permalink Normal View History

2024-05-30 13:13:03 +08:00
inputs:
{
options.nixos.services.nixseparatedebuginfo = let inherit (inputs.lib) mkOption types; in mkOption
{
type = types.nullOr (types.submodule {});
2024-08-03 17:40:11 +08:00
default = if inputs.config.nixos.system.gui.enable then {} else null;
2024-05-30 13:13:03 +08:00
};
config =
let inherit (inputs.config.nixos.services) nixseparatedebuginfo; in inputs.lib.mkIf (nixseparatedebuginfo != {})
{
services.nixseparatedebuginfod.enable = true;
environment.persistence =
let inherit (inputs.config.nixos.system) impermanence; in inputs.lib.mkIf impermanence.enable
{
2024-05-30 13:48:07 +08:00
"${impermanence.nodatacow}".directories = let user = "nixseparatedebuginfod"; in
[{ directory = "/var/cache/nixseparatedebuginfod"; inherit user; group = user; mode = "0755"; }];
2024-05-30 13:13:03 +08:00
};
};
}