From bd15e37d5f0523b045694b9fa150085b0e5840ab Mon Sep 17 00:00:00 2001 From: cnst Date: Mon, 23 Sep 2024 20:19:50 +0200 Subject: [PATCH] another git --- home/users/cnst/git.nix | 11 ++++++++--- home/users/toothpick/modules.nix | 3 +++ hosts/cnixpad/modules.nix | 2 +- hosts/toothpc/modules.nix | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/home/users/cnst/git.nix b/home/users/cnst/git.nix index b5dad270..61b59871 100644 --- a/home/users/cnst/git.nix +++ b/home/users/cnst/git.nix @@ -1,10 +1,15 @@ { config, pkgs, + osConfig, ... }: let - cfg = config.programs.git; - sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIk/zMuOgZCX+bVCFDHxtoec96RaVfV4iG1Gohp0qHdU cnst@cnix"; + email = config.programs.git.userEmail; + isCnixpad = osConfig.networking.hostName == "cnixpad"; + sshKey = + if isCnixpad + then "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMR2JiKLJMqI48/8lX9ZlG6RYcLMZRYAuk1IpYS72IDD adam@adampad" + else "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIk/zMuOgZCX+bVCFDHxtoec96RaVfV4iG1Gohp0qHdU cnst@cnix"; in { home.packages = [pkgs.gh]; programs.git = { @@ -46,6 +51,6 @@ in { ]; }; xdg.configFile."git/allowed_signers".text = '' - ${cfg.userEmail} namespaces="git" ${sshKey} + ${email} namespaces="git" ${sshKey} ''; } diff --git a/home/users/toothpick/modules.nix b/home/users/toothpick/modules.nix index 2f9db081..975e4b56 100644 --- a/home/users/toothpick/modules.nix +++ b/home/users/toothpick/modules.nix @@ -76,6 +76,9 @@ eza = { enable = true; }; + ssh = { + enable = true; + }; }; wm = { hyprland = { diff --git a/hosts/cnixpad/modules.nix b/hosts/cnixpad/modules.nix index 2b9ee5e2..d88e44e0 100644 --- a/hosts/cnixpad/modules.nix +++ b/hosts/cnixpad/modules.nix @@ -93,7 +93,7 @@ samba = { enable = false; }; - ssh = { + openssh = { enable = true; }; }; diff --git a/hosts/toothpc/modules.nix b/hosts/toothpc/modules.nix index 5a5bf128..8a96cf66 100644 --- a/hosts/toothpc/modules.nix +++ b/hosts/toothpc/modules.nix @@ -94,7 +94,7 @@ samba = { enable = false; }; - ssh = { + openssh = { enable = true; }; };