From b321b7f39f572dd5992ba6694ae5698a151a8fd5 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 27 Apr 2016 11:46:01 +0200 Subject: mkIf --- custom/uucp.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'custom/uucp.nix') diff --git a/custom/uucp.nix b/custom/uucp.nix index ea6f2eef..d4597260 100644 --- a/custom/uucp.nix +++ b/custom/uucp.nix @@ -81,9 +81,8 @@ rec { }; }; - config = { + config = mkIf config.services.uucp.enable { environment.etc."uucp/config" = { - enable = config.services.uucp.enable; text = '' spool ${config.services.uucp.spoolDir} lockdir ${config.services.uucp.lockDir} @@ -96,9 +95,9 @@ rec { ''; }; - users.users."uucp" = optional config.services.uucp.enable config.services.uucp.sshUser; + users.users."uucp" = config.services.uucp.sshUser; - system.activationScripts."uucp-sshconfig" = optional config.services.uucp.enable '' + system.activationScripts."uucp-sshconfig" = '' mkdir -p ${config.users.users."uucp".home}/.ssh cp ${builtins.toFile "ssh-config" config.services.uucp.sshConfig} ${config.users.users."uucp".home}/.ssh/config ''; -- cgit v1.2.3