home: check username being non-empty through its type
This commit is contained in:
parent
c0b7cadd81
commit
937e85df03
1 changed files with 1 additions and 8 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue