8ac5e011d6
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
36 lines
616 B
Nix
36 lines
616 B
Nix
# Global configuration for atop.
|
|
|
|
{ config, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
let cfg = config.programs.atop;
|
|
|
|
in
|
|
{
|
|
###### interface
|
|
|
|
options = {
|
|
|
|
programs.atop = {
|
|
|
|
settings = mkOption {
|
|
type = types.attrs;
|
|
default = {};
|
|
example = {
|
|
flags = "a1f";
|
|
interval = 5;
|
|
};
|
|
description = ''
|
|
Parameters to be written to <filename>/etc/atoprc</filename>.
|
|
'';
|
|
};
|
|
|
|
};
|
|
};
|
|
|
|
config = mkIf (cfg.settings != {}) {
|
|
environment.etc.atoprc.text =
|
|
concatStrings (mapAttrsToList (n: v: "${n} ${toString v}\n") cfg.settings);
|
|
};
|
|
}
|