Update ssh keys
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -1,48 +0,0 @@
|
||||
{ user, home }:
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user};
|
||||
selfPkgs = inputs.self.packages.${system};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user} = {
|
||||
sops = {
|
||||
secrets = {
|
||||
"git/credentials/git.karaolidis.com/admin/username".sopsFile =
|
||||
"${inputs.secrets}/personal/secrets.yaml";
|
||||
"git/credentials/git.karaolidis.com/admin/password".sopsFile =
|
||||
"${inputs.secrets}/personal/secrets.yaml";
|
||||
};
|
||||
|
||||
templates."git/credentials" = {
|
||||
content = ''
|
||||
https://${hmConfig.sops.placeholder."git/credentials/git.karaolidis.com/admin/username"}:${
|
||||
hmConfig.sops.placeholder."git/credentials/git.karaolidis.com/admin/password"
|
||||
}@git.karaolidis.com
|
||||
'';
|
||||
path = "${home}/.config/git/credentials";
|
||||
};
|
||||
};
|
||||
|
||||
programs.ssh = {
|
||||
matchBlocks = {
|
||||
"github.com" = {
|
||||
hostname = "github.com";
|
||||
user = "git";
|
||||
identityFile = "${home}/.ssh/ssh_personal_ed25519_key";
|
||||
};
|
||||
};
|
||||
|
||||
userKnownHostsFiles = with selfPkgs; [
|
||||
ssh-known-hosts-github
|
||||
ssh-known-hosts-gitlab
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
@@ -1,22 +1,67 @@
|
||||
{ user, home }:
|
||||
{ inputs, ... }:
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user};
|
||||
selfPkgs = inputs.self.packages.${system};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user} = {
|
||||
sops.secrets = {
|
||||
"ssh/key" = {
|
||||
sopsFile = "${inputs.secrets}/personal/secrets.yaml";
|
||||
path = "${home}/.ssh/ssh_personal_ed25519_key";
|
||||
sops = {
|
||||
secrets = {
|
||||
"ssh/key" = {
|
||||
sopsFile = "${inputs.secrets}/personal/secrets.yaml";
|
||||
path = "${home}/.ssh/ssh_personal_ed25519_key";
|
||||
};
|
||||
|
||||
"ssh/pass".sopsFile = "${inputs.secrets}/personal/secrets.yaml";
|
||||
|
||||
"git/credentials/git.karaolidis.com/admin/username".sopsFile =
|
||||
"${inputs.secrets}/personal/secrets.yaml";
|
||||
|
||||
"git/credentials/git.karaolidis.com/admin/password".sopsFile =
|
||||
"${inputs.secrets}/personal/secrets.yaml";
|
||||
};
|
||||
|
||||
"ssh/pass".sopsFile = "${inputs.secrets}/personal/secrets.yaml";
|
||||
templates."git/credentials" = {
|
||||
content = ''
|
||||
https://${hmConfig.sops.placeholder."git/credentials/git.karaolidis.com/admin/username"}:${
|
||||
hmConfig.sops.placeholder."git/credentials/git.karaolidis.com/admin/password"
|
||||
}@git.karaolidis.com
|
||||
'';
|
||||
path = "${home}/.config/git/credentials";
|
||||
};
|
||||
};
|
||||
|
||||
programs.ssh.matchBlocks = {
|
||||
"karaolidis.com" = {
|
||||
hostname = "karaolidis.com";
|
||||
user = "nick";
|
||||
identityFile = "${home}/.ssh/ssh_personal_ed25519_key";
|
||||
programs.ssh = {
|
||||
matchBlocks = {
|
||||
"karaolidis.com" = {
|
||||
hostname = "karaolidis.com";
|
||||
user = "nick";
|
||||
identityFile = "${home}/.ssh/ssh_personal_ed25519_key";
|
||||
};
|
||||
|
||||
"github.com" = {
|
||||
hostname = "github.com";
|
||||
user = "git";
|
||||
identityFile = "${home}/.ssh/ssh_personal_ed25519_key";
|
||||
};
|
||||
|
||||
"gitlab.com" = {
|
||||
hostname = "gitlab.com";
|
||||
user = "git";
|
||||
identityFile = "${home}/.ssh/ssh_personal_ed25519_key";
|
||||
};
|
||||
};
|
||||
|
||||
userKnownHostsFiles = with selfPkgs; [
|
||||
ssh-known-hosts-github
|
||||
ssh-known-hosts-gitlab
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@@ -39,7 +39,6 @@ in
|
||||
(import ../../../common/configs/user/console/zoxide { inherit user home; })
|
||||
(import ../../../common/configs/user/console/zsh { inherit user home; })
|
||||
|
||||
(import ./configs/console/git { inherit user home; })
|
||||
(import ./configs/console/gpg { inherit user home; })
|
||||
(import ./configs/console/ssh { inherit user home; })
|
||||
];
|
||||
|
Reference in New Issue
Block a user