Skip to content

Instantly share code, notes, and snippets.

@infinisil
Created August 5, 2018 16:42
Show Gist options
  • Save infinisil/bd6f0bb7242815acf1df9d64f0aa9832 to your computer and use it in GitHub Desktop.
Save infinisil/bd6f0bb7242815acf1df9d64f0aa9832 to your computer and use it in GitHub Desktop.
diff --git a/nixos/modules/system/activation/activation-script.nix b/nixos/modules/system/activation/activation-script.nix
index c563614caaa..2c2f2073226 100644
--- a/nixos/modules/system/activation/activation-script.nix
+++ b/nixos/modules/system/activation/activation-script.nix
@@ -8,7 +8,13 @@ let
addAttributeName = mapAttrs (a: v: v // {
text = ''
#### Activation script snippet ${a}:
- ${v.text}
+ ${a}(){
+ ${v.text}
+ }
+
+ if !${a}; then
+ echo "Activation script snippet ${a} failed"
+ fi
'';
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment