Ban root passwords from HQ

This commit is contained in:
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;