diff options
Diffstat (limited to 'custom')
| -rw-r--r-- | custom/uucp.nix | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/custom/uucp.nix b/custom/uucp.nix index ef10c3ca..458e0e07 100644 --- a/custom/uucp.nix +++ b/custom/uucp.nix | |||
| @@ -16,9 +16,7 @@ let | |||
| 16 | port ${name} | 16 | port ${name} |
| 17 | chat "" | 17 | chat "" |
| 18 | protocol e | 18 | protocol e |
| 19 | ''; | 19 | command-path ${concatStringsSep " " config.services.uucp.commandPath} |
| 20 | permissions = set: name: let commands = set."${name}"; in '' | ||
| 21 | MACHINE=${name} COMMANDS=${concatStringsSep ":" commands} | ||
| 22 | ''; | 20 | ''; |
| 23 | in { | 21 | in { |
| 24 | options = { | 22 | options = { |
| @@ -50,12 +48,19 @@ in { | |||
| 50 | }; | 48 | }; |
| 51 | 49 | ||
| 52 | remoteNodes = mkOption { | 50 | remoteNodes = mkOption { |
| 53 | type = types.attrsOf (types.listOf types.str); | 51 | type = types.listOf types.str; |
| 54 | default = {}; | 52 | default = {}; |
| 55 | description = '' | 53 | description = '' |
| 56 | Ports to set up | 54 | Ports to set up |
| 57 | Names will probably need to be configured in sshConfig | 55 | Names will probably need to be configured in sshConfig |
| 58 | Values are permitted commands | 56 | ''; |
| 57 | }; | ||
| 58 | |||
| 59 | commandPath = mkOption { | ||
| 60 | type = types.listOf types.path; | ||
| 61 | default = [ "${pkgs.rmail}/bin" ]; | ||
| 62 | description = '' | ||
| 63 | Command search path for all systems | ||
| 59 | ''; | 64 | ''; |
| 60 | }; | 65 | }; |
| 61 | 66 | ||
| @@ -158,9 +163,6 @@ in { | |||
| 158 | environment.etc."uucp/sys" = { | 163 | environment.etc."uucp/sys" = { |
| 159 | text = concatStringsSep "\n" (map sysSpec (builtins.attrNames config.services.uucp.remoteNodes)); | 164 | text = concatStringsSep "\n" (map sysSpec (builtins.attrNames config.services.uucp.remoteNodes)); |
| 160 | }; | 165 | }; |
| 161 | environment.etc."uucp/Permissions" = { | ||
| 162 | text = concatStringsSep "\n" (map (permissions config.services.uucp.remoteNodes) (builtins.attrNames config.services.uucp.remoteNodes)); | ||
| 163 | }; | ||
| 164 | 166 | ||
| 165 | security.setuidOwners = map (p: {program = p; owner = "root"; group = "root"; setuid = true; setgid = false;}) ["uucico" "uuxqt" "cu" "uucp" "uuname" "uustat" "uux"]; | 167 | security.setuidOwners = map (p: {program = p; owner = "root"; group = "root"; setuid = true; setgid = false;}) ["uucico" "uuxqt" "cu" "uucp" "uuname" "uustat" "uux"]; |
| 166 | 168 | ||
