ma state.mod: put activation logic into module
This commit is contained in:
parent
1cdf1b0b64
commit
a85433255b
|
@ -6,4 +6,11 @@
|
||||||
description = "state which is currently scattered on the machine";
|
description = "state which is currently scattered on the machine";
|
||||||
default = [];
|
default = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
config.system.activationScripts.state = lib.optionalString (config.state != []) ''
|
||||||
|
cat << EOF
|
||||||
|
This machine is burdened with state:
|
||||||
|
${lib.concatMapStringsSep "\n" (d: "* ${d}") config.state}
|
||||||
|
EOF
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue