configuration: use fileContents

Instead of emulating it with 'readFile'
This commit is contained in:
Bruno BELANYI 2021-02-01 16:24:38 +01:00
parent 81a08e7d98
commit 89db21792c

View file

@ -2,7 +2,7 @@
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help). # and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
imports = imports =
@ -84,7 +84,7 @@
transmission = { transmission = {
enable = true; enable = true;
username = "Ambroisie"; username = "Ambroisie";
password = pkgs.lib.removeSuffix "\n" (builtins.readFile ./secrets/transmission/password.txt); password = lib.fileContents ./secrets/transmission/password.txt;
}; };
}; };