mirror of
https://github.com/gburd/nix-config.git
synced 2024-11-14 16:36:24 +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;
|
|
};
|
|
};
|
|
}
|