files: remove mode option

This option was deprecated >1 month ago and is therefore removed as
per the corresponding news entry.
This commit is contained in:
Robert Helgesson 2017-12-11 15:14:45 +01:00
parent 040159c02f
commit 6764c26954
No known key found for this signature in database
GPG key ID: C3DB11069E65DC86
3 changed files with 2 additions and 48 deletions

View file

@ -49,19 +49,6 @@ in
})
];
warnings =
let
badFiles =
map (f: f.target)
(filter (f: f.mode != null)
(attrValues cfg));
badFilesStr = toString badFiles;
in
mkIf (badFiles != []) [
("The 'mode' field is deprecated for 'home.file', "
+ "use 'executable' instead: ${badFilesStr}")
];
# This verifies that the links we are about to create will not
# overwrite an existing file.
home.activation.checkLinkTargets = dagEntryBefore ["writeBoundary"] (
@ -215,8 +202,7 @@ in
nativeBuildInputs = [ pkgs.xlibs.lndir ];
# Symlink directories and files that have the right execute bit.
# Copy files that need their execute bit changed or use the
# deprecated 'mode' option.
# Copy files that need their execute bit changed.
buildCommand = ''
mkdir -p $out
@ -224,8 +210,7 @@ in
local source="$1"
local relTarget="$2"
local executable="$3"
local mode="$4" # For backwards compatibility.
local recursive="$5"
local recursive="$4"
# Figure out the real absolute path to the target.
local target
@ -245,8 +230,6 @@ in
else
ln -s "$source" "$target"
fi
elif [[ $mode ]]; then
install -m "$mode" "$source" "$target"
else
[[ -x $source ]] && isExecutable=1 || isExecutable=""
@ -283,7 +266,6 @@ in
"${if v.executable == null
then "inherit"
else builtins.toString v.executable}" \
"${builtins.toString v.mode}" \
"${builtins.toString v.recursive}"
'') cfg
);

View file

@ -69,17 +69,6 @@ in
'';
};
mode = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
The permissions to apply to the file.
</para><para>
DEPRECATED: use <varname>home.file.&lt;name?&gt;.executable</varname>
instead.
'';
};
executable = mkOption {
type = types.nullOr types.bool;
default = null;

View file

@ -416,23 +416,6 @@ in
'';
}
{
time = "2017-11-06T13:23:17+00:00";
condition = any (f: f.mode != null) (attrValues config.home.file);
message = ''
The
home.file.<name?>.mode
option is now deprecated. Please use
home.file.<name?>.executable
instead. The 'mode' option will be completely removed
December 6, 2017.
'';
}
{
time = "2017-11-12T00:18:59+00:00";
message = ''