config

NixOS config
Log | Files | Refs | README | LICENSE

client.nix (449B) - Raw


      1 {
      2   lib,
      3   config,
      4   pkgs,
      5   ...
      6 }:
      7 let
      8   cfg = config.mj.services.ssh8022.client;
      9 in
     10 {
     11   options.mj.services.ssh8022.client = with lib.types; {
     12     enable = lib.mkEnableOption "Enable ssh8022 client";
     13     keyfile = lib.mkOption { type = str; };
     14   };
     15 
     16   config = lib.mkIf cfg.enable {
     17     programs.ssh.extraConfig = ''
     18       Host fra1-c.jakstys.lt jakstys.lt
     19         ProxyCommand ${pkgs.spiped}/bin/spipe -t %h:8022 -k ${cfg.keyfile}
     20     '';
     21   };
     22 }