added: options
added: dev env
This commit is contained in:
@@ -28,4 +28,8 @@ in
|
||||
};
|
||||
})
|
||||
cfg.directories);
|
||||
config.home.sessionVariables = mkIf (cfg.enable && cfg.endpoint != null) {
|
||||
SSH_CD_API = cfg.endpoint;
|
||||
};
|
||||
config.home.packages = mkIf cfg.enable [ cfg.package ];
|
||||
}
|
||||
|
@@ -16,11 +16,14 @@
|
||||
};
|
||||
};
|
||||
endpointOption = mkOption {
|
||||
type = types.str;
|
||||
type = with types; nullOr str;
|
||||
description = "API endpoint url";
|
||||
default = "https://pki.shimun.net";
|
||||
};
|
||||
|
||||
packageOption = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.ssh-cert-dist;
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
@@ -28,6 +31,7 @@ in
|
||||
services.ssh-cert-dist = {
|
||||
enable = mkEnableOption "ssh-cert-dist";
|
||||
endpoint = endpointOption;
|
||||
package = packageOption;
|
||||
directories = mkOption {
|
||||
type = with types; attrsOf (submodule directoryModule);
|
||||
default = { };
|
||||
@@ -35,6 +39,7 @@ in
|
||||
};
|
||||
programs.ssh-cert-dist = {
|
||||
enable = mkEnableOption "ssh-cert-dist client";
|
||||
package = packageOption;
|
||||
endpoint = endpointOption;
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user