summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorDomen Kožar <domen@dev.si>2014-02-04 16:32:50 +0100
committerDomen Kožar <domen@dev.si>2014-02-04 16:33:01 +0100
commite1b206b4a9c895e6684fc948b1526d8759e54328 (patch)
treed32e5cd38982854c6d59f076c06bc36699742118 /nixos
parent77451661d49ae6046a782857ff1200f5e8980a67 (diff)
downloadnixlib-e1b206b4a9c895e6684fc948b1526d8759e54328.tar
nixlib-e1b206b4a9c895e6684fc948b1526d8759e54328.tar.gz
nixlib-e1b206b4a9c895e6684fc948b1526d8759e54328.tar.bz2
nixlib-e1b206b4a9c895e6684fc948b1526d8759e54328.tar.lz
nixlib-e1b206b4a9c895e6684fc948b1526d8759e54328.tar.xz
nixlib-e1b206b4a9c895e6684fc948b1526d8759e54328.tar.zst
nixlib-e1b206b4a9c895e6684fc948b1526d8759e54328.zip
clarify rename error messages
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/rename.nix10
1 files changed, 6 insertions, 4 deletions
diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix
index 6ff5277cf9ca..15e05a3d675d 100644
--- a/nixos/modules/rename.nix
+++ b/nixos/modules/rename.nix
@@ -12,18 +12,20 @@ let
     visible = true;
   };
 
+  # warn option was renamed
   obsolete = from: to: rename {
     inherit from to;
     name = "Obsolete name";
-    use = x: builtins.trace "Obsolete option `${showOption from}' is used instead of `${showOption to}'." x;
-    define = x: builtins.trace "Obsolete option `${showOption from}' is defined instead of `${showOption to}'." x;
+    use = x: builtins.trace "Obsolete option `${showOption from}' is used. It was renamed to `${showOption to}'." x;
+    define = x: builtins.trace "Obsolete option `${showOption from}' is used. It was renamed to  `${showOption to}'." x;
   };
 
+  # abort if deprecated option is used
   deprecated = from: to: rename {
     inherit from to;
     name = "Deprecated name";
-    use = x: abort "Deprecated option `${showOption from}' is used instead of `${showOption to}'.";
-    define = x: abort "Deprecated option `${showOption from}' is defined instead of `${showOption to}'.";
+    use = x: abort "Deprecated option `${showOption from}' is used. It was renamed to `${showOption to}'.";
+    define = x: abort "Deprecated option `${showOption from}' is used. It was renamed to  `${showOption to}'.";
   };
 
   showOption = concatStringsSep ".";