Replaced 'builtins.readFile' with 'lib.fileContents'.

This commit is contained in:
Kevin Baensch 2019-04-14 18:35:37 +02:00
parent a3929a8ec5
commit 097981466e
4 changed files with 5 additions and 6 deletions

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ config, lib, pkgs, ... }:
{
nix = {
@ -9,7 +9,7 @@
extraOptions = ''
build-timeout = 86400 # 24 hours
'';
binaryCachePublicKeys = [ (builtins.readFile /secret/hydra_cache.pub) ];
binaryCachePublicKeys = [ (lib.fileContents /secret/hydra_cache.pub) ];
trustedBinaryCaches = [
"https://cache.nixos.org"
"https://cache.ophanim.de"

View file

@ -2,9 +2,8 @@
with lib;
# hint: use 'echo -n' so there is no newline char in the hostName file
let
machinePath = (builtins.toPath ("/etc/nixos/machines/" + (builtins.readFile /secret/hostName)));
machinePath = (builtins.toPath ("/etc/nixos/machines/" + (fileContents /secret/hostName)));
machineConf = machinePath + "/configuration.nix";
machineOpts = machinePath + "/options.nix";
in {

View file

@ -9,7 +9,7 @@ mkIf (elem "mailserver" config.machine.services) {
domains = [ config.machine.domain ];
loginAccounts = {
"derped@${config.machine.domain}" = {
hashedPassword = (builtins.readFile /secret/derped.mail);
hashedPassword = (fileContents /secret/derped.mail);
};
};
# Use Let's Encrypt certificates. Note that this needs to set up a stripped

View file

@ -3,7 +3,7 @@
with lib;
let
giteapwd = if config.services.gitea.enable then (builtins.readFile /secret/gitea) else "";
giteapwd = if config.services.gitea.enable then (fileContents /secret/gitea) else "";
in mkIf (elem "mariaDB" config.machine.services) {
services.mysql = {
enable = true;