add the checkmk agent and config
This commit is contained in:
parent
916f394cdf
commit
05459a50e1
6 changed files with 2348 additions and 0 deletions
22
checkmk-agent.nix
Normal file
22
checkmk-agent.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
agentcmd = "${ (pkgs.callPackage ./checkmk-agent/default.nix { }) }/bin/check_mk_agent.sshwrapper";
|
||||
in
|
||||
{
|
||||
users.users.mon = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
openssh.authorizedKeys.keys = [
|
||||
''restrict,command="${ agentcmd }" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGHkivi9Ye/Uj4ZQxrEfarSaz0iLF/XXhY/crNsLoDMu checkmk''
|
||||
];
|
||||
};
|
||||
security.sudo.extraRules = [ {
|
||||
users = [ "mon" ];
|
||||
commands = [ {
|
||||
command = agentcmd;
|
||||
options = [ "NOPASSWD" ];
|
||||
} ];
|
||||
}
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue