summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2016-04-27 11:52:08 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2016-04-27 11:52:08 +0200
commitcb3ebc4ce8aa370b5d463afc0dc69f4821dd064f (patch)
tree12b9415d7b8555ad8eea3e2185659135b92a1910
parente014f7c46775a635250e2fe1f6d1bf68ada9bd45 (diff)
downloadnixos-cb3ebc4ce8aa370b5d463afc0dc69f4821dd064f.tar
nixos-cb3ebc4ce8aa370b5d463afc0dc69f4821dd064f.tar.gz
nixos-cb3ebc4ce8aa370b5d463afc0dc69f4821dd064f.tar.bz2
nixos-cb3ebc4ce8aa370b5d463afc0dc69f4821dd064f.tar.xz
nixos-cb3ebc4ce8aa370b5d463afc0dc69f4821dd064f.zip
portSpecs
-rw-r--r--custom/uucp.nix14
1 files changed, 13 insertions, 1 deletions
diff --git a/custom/uucp.nix b/custom/uucp.nix
index 5b6d32b3..a457cca7 100644
--- a/custom/uucp.nix
+++ b/custom/uucp.nix
@@ -2,7 +2,15 @@
2 2
3with lib; 3with lib;
4 4
5{ 5let
6 portSpec = name: ''
7 port ${name}
8 type pipe
9 protocol e
10 reliable true
11 command ${pkgs.openssh}/bin/ssh -x -o batchmode=yes ${name}
12 '';
13in {
6 options = { 14 options = {
7 services.uucp = { 15 services.uucp = {
8 enable = mkOption { 16 enable = mkOption {
@@ -102,5 +110,9 @@ with lib;
102 mkdir -p ${config.users.users."uucp".home}/.ssh 110 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 111 cp ${builtins.toFile "ssh-config" config.services.uucp.sshConfig} ${config.users.users."uucp".home}/.ssh/config
104 ''; 112 '';
113
114 environment.etc."uucp/port" = {
115 text = concatStringsSep "\n" portSpec config.services.uucp.remoteNodes;
116 };
105 }; 117 };
106} 118}