nixos/atop: Never enable setuidWrapper by default, rename service/timer enabling options
This commit is contained in:
parent
8f3d2e5c3b
commit
b87c366046
|
@ -52,7 +52,7 @@ in
|
||||||
|
|
||||||
setuidWrapper.enable = mkOption {
|
setuidWrapper.enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = cfg.netatop.enable || cfg.atopgpu.enable;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to install a setuid wrapper for Atop. This is required to use some of
|
Whether to install a setuid wrapper for Atop. This is required to use some of
|
||||||
the features as non-root user (e.g.: ipc information, netatop, atopgpu).
|
the features as non-root user (e.g.: ipc information, netatop, atopgpu).
|
||||||
|
@ -60,7 +60,7 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
atopsvc.enable = mkOption {
|
atopService.enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -68,7 +68,7 @@ in
|
||||||
long-term analysis.
|
long-term analysis.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
atopRotate.enable = mkOption {
|
atopRotateTimer.enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -76,7 +76,7 @@ in
|
||||||
daily to make sure the data files are rotate.
|
daily to make sure the data files are rotate.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
atopacct.enable = mkOption {
|
atopacctService.enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -133,11 +133,11 @@ in
|
||||||
{
|
{
|
||||||
inherit packages;
|
inherit packages;
|
||||||
services =
|
services =
|
||||||
mkService cfg.atopsvc.enable "atop"
|
mkService cfg.atopService.enable "atop"
|
||||||
// mkService cfg.atopacct.enable "atopacct"
|
// mkService cfg.atopacctService.enable "atopacct"
|
||||||
// mkService cfg.netatop.enable "netatop"
|
// mkService cfg.netatop.enable "netatop"
|
||||||
// mkService cfg.atopgpu.enable "atopgpu";
|
// mkService cfg.atopgpu.enable "atopgpu";
|
||||||
timers = mkTimer cfg.atopRotate.enable "atop-rotate";
|
timers = mkTimer cfg.atopRotateTimer.enable "atop-rotate";
|
||||||
};
|
};
|
||||||
security.wrappers =
|
security.wrappers =
|
||||||
lib.mkIf cfg.setuidWrapper.enable { atop = { source = "${atop}/bin/atop"; }; };
|
lib.mkIf cfg.setuidWrapper.enable { atop = { source = "${atop}/bin/atop"; }; };
|
||||||
|
|
Loading…
Reference in a new issue