From 937e85df03e2cf8bc2c0daafc68b2b2782ddbcec Mon Sep 17 00:00:00 2001 From: Benedikt Rips Date: Wed, 24 Jun 2026 15:52:17 +0200 Subject: [PATCH] home: check `username` being non-empty through its type --- modules/home-environment.nix | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/modules/home-environment.nix b/modules/home-environment.nix index 5fd05ab06..9732cdfbf 100644 --- a/modules/home-environment.nix +++ b/modules/home-environment.nix @@ -184,7 +184,7 @@ in options = { home.username = mkOption { - type = types.str; + type = types.nonEmptyStr; defaultText = literalExpression '' "$USER" for state version < 20.09, undefined for state version ≥ 20.09 @@ -578,13 +578,6 @@ in }; config = { - assertions = [ - { - assertion = config.home.username != ""; - message = "Username could not be determined"; - } - ]; - warnings = let hmRelease = config.home.version.release;