summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@gmail.com>2023-03-26 23:53:03 +0200
committerSandro Jäckel <sandro.jaeckel@gmail.com>2023-04-01 00:48:45 +0200
commitf542f318ccae8d4e2ad3418e936cf2f148a71c83 (patch)
tree85af11cbc17ff2e64637dc9ded5fb9389b0cc97d /modules
parent73b1787f2b628e8a161ef1c2031b969d09bd01de (diff)
wsl-conf: warn when networking.extraHosts has no effect
Diffstat (limited to 'modules')
-rw-r--r--modules/wsl-conf.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/wsl-conf.nix b/modules/wsl-conf.nix
index 4985ca7..0058f29 100644
--- a/modules/wsl-conf.nix
+++ b/modules/wsl-conf.nix
@@ -85,9 +85,10 @@ with lib; {
environment.etc."wsl.conf".text = generators.toINI { } config.wsl.wslConf;
- warnings = (optional (config.wsl.wslConf.boot.systemd && !config.wsl.nativeSystemd)
- "systemd is enabled in wsl.conf, but wsl.nativeSystemd is not enabled. Unless you did this on purpos, this WILL make your system UNBOOTABLE!"
- );
+ warnings = optional (config.wsl.wslConf.boot.systemd && !config.wsl.nativeSystemd)
+ "systemd is enabled in wsl.conf, but wsl.nativeSystemd is not enabled. Unless you did this on purpose, this WILL make your system UNBOOTABLE!"
+ ++ optional (config.wsl.wslConf.network.generateHosts && config.networking.extraHosts != "")
+ "networking.extraHosts has no effect if wsl.wslConf.network.generateHosts is true.";
};