@@ -66,6 +66,9 @@ let
6666 user root
6767 group root
6868
69+ [munin*]
70+ env.UPDATE_STATSFILE /var/lib/munin/munin-update.stats
71+
6972 ${nodeCfg.extraPluginConfig}
7073 '';
7174
@@ -226,13 +229,20 @@ in
226229 };
227230
228231 disabledPlugins = mkOption {
229− default = [];
232+ # TODO: figure out why Munin isn't writing the log file and fix it.
233+ # In the meantime this at least suppresses a useless graph full of
234+ # NaNs in the output.
235+ default = [ "munin_stats" ];
230236 type = with types; listOf string;
231237 description = ''
232238 Munin plugins to disable, even if
233239 <literal>munin-node-configure --suggest</literal> tries to enable
234240 them. To disable a wildcard plugin, use an actual wildcard, as in
235241 the example.
242+
243+ munin_stats is disabled by default as it tries to read
244+ <literal>/var/log/munin/munin-update.log</literal> for timing
245+ information, and the NixOS build of Munin does not write this file.
236246 '';
237247 example = [ "diskstats" "zfs_usage_*" ];
238248 };
@@ -312,6 +322,7 @@ in
312322 description = "Munin monitoring user";
313323 group = "munin";
314324 uid = config.ids.uids.munin;
325+ home = "/var/lib/munin";
315326 }];
316327
317328 users.groups = [{