mirror of
https://github.com/gburd/nix-config.git
synced 2024-09-09 11:26:12 +00:00
26 lines
550 B
Nix
26 lines
550 B
Nix
![]() |
{ config, pkgs, lib, ... }:
|
||
|
let
|
||
|
cfg = config.programs.xpo;
|
||
|
package = pkgs.xpo;
|
||
|
in
|
||
|
{
|
||
|
options.programs.xpo = {
|
||
|
enable = lib.mkEnableOption "xpo";
|
||
|
|
||
|
defaultServer = lib.mkOption {
|
||
|
default = null;
|
||
|
type = with lib.types; nullOr str;
|
||
|
description = ''
|
||
|
Default SSH server/endpoint to use when tunneling.
|
||
|
'';
|
||
|
};
|
||
|
};
|
||
|
|
||
|
config = lib.mkIf cfg.enable {
|
||
|
home = {
|
||
|
packages = [ package ];
|
||
|
sessionVariables.XPO_SERVER = lib.optionalString (cfg.defaultServer != null) cfg.defaultServer;
|
||
|
};
|
||
|
};
|
||
|
}
|