mirror of
https://github.com/gburd/nix-config.git
synced 2024-11-20 10:36:25 +00:00
f3fd89af54
Many thangs to the hard work and generous availability of: git@github.com:Misterio77/nix-config.git
25 lines
550 B
Nix
25 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;
|
|
};
|
|
};
|
|
}
|