add deploy-rs for remotely deploy nixos config
This commit is contained in:
parent
cf03484587
commit
ae7d74249b
15 changed files with 290 additions and 85 deletions
|
|
@ -35,22 +35,19 @@
|
|||
let
|
||||
cfg = config.youthlic.programs.git;
|
||||
in
|
||||
{
|
||||
programs.lazygit = {
|
||||
enable = true;
|
||||
};
|
||||
programs.gh = {
|
||||
enable = true;
|
||||
gitCredentialHelper.enable = true;
|
||||
settings = {
|
||||
git_protocol = "ssh";
|
||||
lib.mkMerge [
|
||||
{
|
||||
programs.lazygit = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
sops.secrets."git-credential" = {
|
||||
mode = "0640";
|
||||
};
|
||||
programs.git = lib.mkMerge [
|
||||
{
|
||||
programs.gh = {
|
||||
enable = true;
|
||||
gitCredentialHelper.enable = true;
|
||||
settings = {
|
||||
git_protocol = "ssh";
|
||||
};
|
||||
};
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userEmail = cfg.email;
|
||||
userName = cfg.name;
|
||||
|
|
@ -63,20 +60,23 @@
|
|||
};
|
||||
};
|
||||
lfs.enable = true;
|
||||
}
|
||||
(lib.mkIf cfg.encrypt-credential {
|
||||
extraConfig = {
|
||||
credential = {
|
||||
helper = "store --file=${config.sops.secrets."git-credential".path}";
|
||||
};
|
||||
};
|
||||
}
|
||||
(lib.mkIf (cfg.signKey != null) {
|
||||
programs.git.signing = {
|
||||
signByDefault = true;
|
||||
key = cfg.signKey;
|
||||
};
|
||||
})
|
||||
(lib.mkIf cfg.encrypt-credential {
|
||||
programs.git.extraConfig = {
|
||||
credential = {
|
||||
helper = "store --file=${config.sops.secrets."git-credential".path}";
|
||||
};
|
||||
})
|
||||
(lib.mkIf (cfg.signKey != null) {
|
||||
signing = {
|
||||
signByDefault = true;
|
||||
key = cfg.signKey;
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
sops.secrets."git-credential" = {
|
||||
mode = "0640";
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue