From 90717bd4a3f8cb29baee6b2bceaae238c2f60b82 Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Fri, 1 Mar 2024 00:39:36 +0100 Subject: [PATCH] better:tm: --- hosts/del/configuration.nix | 21 +++++++++++---------- hosts/niks/configuration.nix | 21 +++++++++++---------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/hosts/del/configuration.nix b/hosts/del/configuration.nix index dadc5a3ff..33a9a6a7c 100644 --- a/hosts/del/configuration.nix +++ b/hosts/del/configuration.nix @@ -268,51 +268,52 @@ enable = true; hostAliases = let username = config.myOptions.other.system.username; + hmCfg = config.home-manager.users.${username}; in { "github" = { hostName = "github.com"; - identityFile = "${config.home-manager.users.${username}.home.homeDirectory}/.ssh/githubkey"; + identityFile = "${hmCfg.home.homeDirectory}/.ssh/githubkey"; }; "git.dupa.edu.pl" = { hostName = "git.dupa.edu.pl"; - identityFile = "${config.home-manager.users.${username}.home.homeDirectory}/.ssh/gitdupaedupl"; + identityFile = "${hmCfg.home.homeDirectory}/.ssh/gitdupaedupl"; }; "codeberg" = { hostName = "codeberg.org"; - identityFile = "${config.home-manager.users.${username}.home.homeDirectory}/.ssh/codeberg"; + identityFile = "${hmCfg.home.homeDirectory}/.ssh/codeberg"; }; "gitlab" = { hostName = "gitlab.com"; - identityFile = "${config.home-manager.users.${username}.home.homeDirectory}/.ssh/gitlab"; + identityFile = "${hmCfg.home.homeDirectory}/.ssh/gitlab"; }; "aur" = { hostName = "aur.archlinux.org"; user = "aur"; - identityFile = "${config.home-manager.users.${username}.home.homeDirectory}/.ssh/aur"; + identityFile = "${hmCfg.home.homeDirectory}/.ssh/aur"; }; "jacekpoz" = { hostName = "git.jacekpoz.pl"; user = "forgejo"; - identityFile = "${config.home-manager.users.${username}.home.homeDirectory}/.ssh/jacekpoz"; + identityFile = "${hmCfg.home.homeDirectory}/.ssh/jacekpoz"; }; "chmura" = { hostName = "192.168.15.2"; user = "chmura"; - identityFile = "${config.home-manager.users.${username}.home.homeDirectory}/.ssh/chmura"; + identityFile = "${hmCfg.home.homeDirectory}/.ssh/chmura"; }; "chmura2" = { hostName = "jacekpoz.pl"; user = "chmura"; - identityFile = "${config.home-manager.users.${username}.home.homeDirectory}/.ssh/chmura"; + identityFile = "${hmCfg.home.homeDirectory}/.ssh/chmura"; }; "malina" = { hostName = "192.168.15.3"; user = "malina"; - identityFile = "${config.home-manager.users.${username}.home.homeDirectory}/.ssh/malina"; + identityFile = "${hmCfg.home.homeDirectory}/.ssh/malina"; }; "outfoxxed" = { hostName = "git.outfoxxed.me"; - identityFile = "${config.home-manager.users.${username}.home.homeDirectory}/.ssh/outfoxxed"; + identityFile = "${hmCfg.home.homeDirectory}/.ssh/outfoxxed"; }; }; }; diff --git a/hosts/niks/configuration.nix b/hosts/niks/configuration.nix index f0e4a2868..6d58b280f 100644 --- a/hosts/niks/configuration.nix +++ b/hosts/niks/configuration.nix @@ -240,51 +240,52 @@ enable = true; hostAliases = let username = config.myOptions.other.system.username; + hmCfg = config.home-manager.users.${username}; in { "github" = { hostName = "github.com"; - identityFile = "${config.home-manager.users.${username}.home.homeDirectory}/.ssh/githubkey"; + identityFile = "${hmCfg.home.homeDirectory}/.ssh/githubkey"; }; "git.dupa.edu.pl" = { hostName = "git.dupa.edu.pl"; - identityFile = "${config.home-manager.users.${username}.home.homeDirectory}/.ssh/gitdupaedupl"; + identityFile = "${hmCfg.home.homeDirectory}/.ssh/gitdupaedupl"; }; "codeberg" = { hostName = "codeberg.org"; - identityFile = "${config.home-manager.users.${username}.home.homeDirectory}/.ssh/codeberg"; + identityFile = "${hmCfg.home.homeDirectory}/.ssh/codeberg"; }; "gitlab" = { hostName = "gitlab.com"; - identityFile = "${config.home-manager.users.${username}.home.homeDirectory}/.ssh/gitlab"; + identityFile = "${hmCfg.home.homeDirectory}/.ssh/gitlab"; }; "aur" = { hostName = "aur.archlinux.org"; user = "aur"; - identityFile = "${config.home-manager.users.${username}.home.homeDirectory}/.ssh/aur"; + identityFile = "${hmCfg.home.homeDirectory}/.ssh/aur"; }; "jacekpoz" = { hostName = "git.jacekpoz.pl"; user = "forgejo"; - identityFile = "${config.home-manager.users.${username}.home.homeDirectory}/.ssh/jacekpoz"; + identityFile = "${hmCfg.home.homeDirectory}/.ssh/jacekpoz"; }; "chmura" = { hostName = "192.168.15.2"; user = "chmura"; - identityFile = "${config.home-manager.users.${username}.home.homeDirectory}/.ssh/chmura"; + identityFile = "${hmCfg.home.homeDirectory}/.ssh/chmura"; }; "chmura2" = { hostName = "jacekpoz.pl"; user = "chmura"; - identityFile = "${config.home-manager.users.${username}.home.homeDirectory}/.ssh/chmura"; + identityFile = "${hmCfg.home.homeDirectory}/.ssh/chmura"; }; "malina" = { hostName = "192.168.15.3"; user = "malina"; - identityFile = "${config.home-manager.users.${username}.home.homeDirectory}/.ssh/malina"; + identityFile = "${hmCfg.home.homeDirectory}/.ssh/malina"; }; "outfoxxed" = { hostName = "git.outfoxxed.me"; - identityFile = "${config.home-manager.users.${username}.home.homeDirectory}/.ssh/outfoxxed"; + identityFile = "${hmCfg.home.homeDirectory}/.ssh/outfoxxed"; }; }; };