mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 22:32:58 +03:00
ssm-agent: fix bad user declaration
This commit is contained in:
parent
046c6a7038
commit
0d417929bf
@ -29,8 +29,6 @@ in {
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.services.ssm-agent = {
|
||||
users.extraUsers.ssm-user = {};
|
||||
|
||||
inherit (cfg.package.meta) description;
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
@ -43,5 +41,26 @@ in {
|
||||
RestartSec = "15min";
|
||||
};
|
||||
};
|
||||
|
||||
# Add user that Session Manager needs, and give it sudo.
|
||||
# This is consistent with Amazon Linux 2 images.
|
||||
security.sudo.extraRules = [
|
||||
{
|
||||
users = [ "ssm-user" ];
|
||||
commands = [
|
||||
{
|
||||
command = "ALL";
|
||||
options = [ "NOPASSWD" ];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
# On Amazon Linux 2 images, the ssm-user user is pretty much a
|
||||
# normal user with its own group. We do the same.
|
||||
users.groups.ssm-user = {};
|
||||
users.users.ssm-user = {
|
||||
isNormalUser = true;
|
||||
group = "ssm-user";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user