summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2016-04-27 11:46:01 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2016-04-27 11:46:01 +0200
commitb321b7f39f572dd5992ba6694ae5698a151a8fd5 (patch)
treee6ade681173c0764a4d1af21600076d30e054375
parent9832c9d44903bdcc56aa580895b3413d1e5307f8 (diff)
downloadnixos-b321b7f39f572dd5992ba6694ae5698a151a8fd5.tar
nixos-b321b7f39f572dd5992ba6694ae5698a151a8fd5.tar.gz
nixos-b321b7f39f572dd5992ba6694ae5698a151a8fd5.tar.bz2
nixos-b321b7f39f572dd5992ba6694ae5698a151a8fd5.tar.xz
nixos-b321b7f39f572dd5992ba6694ae5698a151a8fd5.zip
mkIf
-rw-r--r--custom/uucp.nix7
1 files changed, 3 insertions, 4 deletions
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 {
81 }; 81 };
82 }; 82 };
83 83
84 config = { 84 config = mkIf config.services.uucp.enable {
85 environment.etc."uucp/config" = { 85 environment.etc."uucp/config" = {
86 enable = config.services.uucp.enable;
87 text = '' 86 text = ''
88 spool ${config.services.uucp.spoolDir} 87 spool ${config.services.uucp.spoolDir}
89 lockdir ${config.services.uucp.lockDir} 88 lockdir ${config.services.uucp.lockDir}
@@ -96,9 +95,9 @@ rec {
96 ''; 95 '';
97 }; 96 };
98 97
99 users.users."uucp" = optional config.services.uucp.enable config.services.uucp.sshUser; 98 users.users."uucp" = config.services.uucp.sshUser;
100 99
101 system.activationScripts."uucp-sshconfig" = optional config.services.uucp.enable '' 100 system.activationScripts."uucp-sshconfig" = ''
102 mkdir -p ${config.users.users."uucp".home}/.ssh 101 mkdir -p ${config.users.users."uucp".home}/.ssh
103 cp ${builtins.toFile "ssh-config" config.services.uucp.sshConfig} ${config.users.users."uucp".home}/.ssh/config 102 cp ${builtins.toFile "ssh-config" config.services.uucp.sshConfig} ${config.users.users."uucp".home}/.ssh/config
104 ''; 103 '';