Modularize teams sops yazi
This commit is contained in:
parent
7730cbef59
commit
c73cb37278
75 changed files with 3023 additions and 3573 deletions
|
|
@ -1,5 +1,4 @@
|
|||
{ lib, config, options, pkgs, ... }:
|
||||
{
|
||||
{ lib, config, options, pkgs, ... }: {
|
||||
options.mods.git = {
|
||||
username = lib.mkOption {
|
||||
default = "DashieTM";
|
||||
|
|
@ -16,29 +15,40 @@
|
|||
ssh_config = lib.mkOption {
|
||||
default = ''
|
||||
Host github.com
|
||||
${if (config.sops.secrets?hub.path) then "IdentityFile ${config.sops.secrets.hub.path}" else ""}
|
||||
${
|
||||
if (config.sops.secrets ? hub.path) then
|
||||
"IdentityFile ${config.sops.secrets.hub.path}"
|
||||
else
|
||||
""
|
||||
}
|
||||
Host gitlab.com
|
||||
${if (config.sops.secrets?lab.path) then "IdentityFile ${config.sops.secrets.lab.path}" else ""}
|
||||
${
|
||||
if (config.sops.secrets ? lab.path) then
|
||||
"IdentityFile ${config.sops.secrets.lab.path}"
|
||||
else
|
||||
""
|
||||
}
|
||||
Host dashie.org
|
||||
${if (config.sops.secrets?dashie.path) then "IdentityFile ${config.sops.secrets.dashie.path}" else ""}
|
||||
${
|
||||
if (config.sops.secrets ? dashie.path) then
|
||||
"IdentityFile ${config.sops.secrets.dashie.path}"
|
||||
else
|
||||
""
|
||||
}
|
||||
'';
|
||||
example = '''';
|
||||
example = "";
|
||||
type = lib.types.lines;
|
||||
description = "ssh configuration (keys for git)";
|
||||
};
|
||||
};
|
||||
config = (lib.optionalAttrs (options?programs.git && options?home.file) {
|
||||
config = (lib.optionalAttrs (options ? programs.git && options ? home.file) {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = config.mods.git.username;
|
||||
userEmail = config.mods.git.email;
|
||||
extraConfig = {
|
||||
merge = {
|
||||
tool = "nvimdiff";
|
||||
};
|
||||
diff = {
|
||||
tool = "nvimdiff";
|
||||
};
|
||||
merge = { tool = "nvimdiff"; };
|
||||
diff = { tool = "nvimdiff"; };
|
||||
};
|
||||
};
|
||||
home.file.".ssh/config".text = config.mods.git.ssh_config;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue