1
0
mirror of https://github.com/kmein/niveum synced 2026-03-18 11:01:07 +01:00

improvement: use lib.strings.fileContents wherever possible

This commit is contained in:
Kierán Meinhardt
2019-09-11 07:33:27 +02:00
parent 890da6c00d
commit ddb465367e
4 changed files with 10 additions and 12 deletions

View File

@@ -1,8 +1,8 @@
{ pkgs, lib, ... }:
let
eduroam = {
identity = lib.strings.removeSuffix "\n" (builtins.readFile <shared-secrets/eduroam/identity>);
password = lib.strings.removeSuffix "\n" (builtins.readFile <shared-secrets/eduroam/password>);
identity = lib.strings.fileContents <shared-secrets/eduroam/identity>;
password = lib.strings.fileContents <shared-secrets/eduroam/password>;
};
eduroamAuth = ''
key_mgmt=WPA-EAP

View File

@@ -1,6 +1,4 @@
{ config, pkgs, lib, ... }:
let inherit (import <lib> { inherit lib; }) strip;
in
{
environment.systemPackages = [
pkgs.notmuch
@@ -27,7 +25,7 @@ in
};
msmtp.enable = true;
notmuch.enable = true;
passwordCommand = "echo '${strip (builtins.readFile <shared-secrets/eduroam/password>)}'";
passwordCommand = "echo '${lib.strings.fileContents <shared-secrets/eduroam/password>}'";
offlineimap = {
enable = true;
postSyncHookCommand = "notmuch new";

View File

@@ -6,7 +6,7 @@
enable = true;
user = "kmein";
host = "192.168.178.28";
key = lib.strings.removeSuffix "\n" (builtins.readFile <shared-secrets/traadfri.key>);
key = lib.strings.fileContents <shared-secrets/traadfri.key>;
rooms = {
bedroom = 131074;
corridor = 131076;