nix-config/modules/home-manager/xpo.nix
Greg Burd f3fd89af54
A fork of Misterio77 and his standard template.
Many thangs to the hard work and generous availability of:
git@github.com:Misterio77/nix-config.git
2023-09-15 10:53:38 -04:00

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;
};
};
}