Ban root passwords from HQ

这个提交包含在:
Ehmry - 2020-01-26 17:36:24 +01:00
父节点 ed3670aeba
当前提交 83c0090ab9
共有 1 个文件被更改,包括 4 次插入0 次删除

查看文件

@ -32,6 +32,7 @@ let
cfg = config.c3d2;
in {
imports = [ ./users ];
@ -118,6 +119,9 @@ in {
# Configuration specific to this machine
assertions = [
{ assertion = cfg.isInHq -> (config.users.users.root.password == null);
message = "Root passwords not allowed in HQ";
}
{
assertion = let
check = hostName: hostName == config.networking.hostName;