Ban root passwords from HQ

Cette révision appartient à :
Emery Hemingway 2020-01-26 17:36:24 +01:00
Parent ed3670aeba
révision 83c0090ab9
1 fichiers modifiés avec 4 ajouts et 0 suppressions

Voir le fichier

@ -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;