2018-09-08 10:46:25 +00: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 12:34:50 +00: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 10:46:25 +00:00
|
|
|
}
|