refactor: simplify source control
This commit is contained in:
+3
-28
@@ -1,10 +1,5 @@
|
||||
{ lib, ... }:
|
||||
let
|
||||
sourceControlScopeType = lib.types.enum [
|
||||
"personal"
|
||||
"work"
|
||||
];
|
||||
|
||||
emailProviderType = lib.types.enum [
|
||||
"mxrouting"
|
||||
"office365"
|
||||
@@ -26,21 +21,6 @@ let
|
||||
type = lib.mkOption {
|
||||
type = emailProviderType;
|
||||
};
|
||||
|
||||
scope = lib.mkOption {
|
||||
type = lib.types.nullOr sourceControlScopeType;
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
sourceControlAccountType = lib.types.submodule (
|
||||
{ ... }:
|
||||
{
|
||||
options.projectScope = lib.mkOption {
|
||||
type = sourceControlScopeType;
|
||||
default = "personal";
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -72,11 +52,6 @@ let
|
||||
default = { };
|
||||
};
|
||||
|
||||
sourceControl = lib.mkOption {
|
||||
type = sourceControlAccountType;
|
||||
default = { };
|
||||
};
|
||||
|
||||
primaryEmail = lib.mkOption {
|
||||
type = lib.types.nullOr emailType;
|
||||
description = "Derived primary email entry for this user.";
|
||||
@@ -133,7 +108,7 @@ let
|
||||
);
|
||||
|
||||
sourceControlMachineKeyType = lib.types.submodule (
|
||||
{ ... }:
|
||||
{ name, ... }:
|
||||
{
|
||||
options = {
|
||||
publicKey = lib.mkOption {
|
||||
@@ -142,8 +117,8 @@ let
|
||||
};
|
||||
|
||||
privateKeyPath = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
type = lib.types.str;
|
||||
default = "~/.ssh/id_${name}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user