2018-09-08 12:46:25 +02:00
|
|
|
{config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
options.state = lib.mkOption {
|
|
|
|
type = lib.types.listOf lib.types.str;
|
|
|
|
description = "state which is currently scattered on the machine";
|
|
|
|
default = [];
|
|
|
|
};
|
2018-09-24 14:34:50 +02:00
|
|
|
|
|
|
|
config.system.activationScripts.state = lib.optionalString (config.state != []) ''
|
|
|
|
cat << EOF
|
|
|
|
This machine is burdened with state:
|
|
|
|
${lib.concatMapStringsSep "\n" (d: "* ${d}") config.state}
|
|
|
|
EOF
|
|
|
|
'';
|
2018-09-08 12:46:25 +02:00
|
|
|
}
|