assert hostname exists
This commit is contained in:
parent
4edd18ad6c
commit
fe7ea07235
1 changed files with 1 additions and 0 deletions
|
@ -31,6 +31,7 @@ rec {
|
||||||
configHost = if builtins.stringLength configHostname > 0 then configHostname else hostname;
|
configHost = if builtins.stringLength configHostname > 0 then configHostname else hostname;
|
||||||
hostStr = lib.strings.optionalString (builtins.stringLength hostname > 0) "@${hostname}";
|
hostStr = lib.strings.optionalString (builtins.stringLength hostname > 0) "@${hostname}";
|
||||||
in
|
in
|
||||||
|
assert lib.assertMsg (builtins.stringLength configHost > 0) "either configHostname or hostname need to exist";
|
||||||
{
|
{
|
||||||
name = "${user}${hostStr}";
|
name = "${user}${hostStr}";
|
||||||
value = inputs.home-manager.lib.homeManagerConfiguration {
|
value = inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
|
|
Loading…
Reference in a new issue