refactor: add config.host option for host variables

This commit is contained in:
2026-03-11 21:53:47 +01:00
parent 4c9db2b822
commit 43dff3e8e5
10 changed files with 89 additions and 72 deletions

View File

@@ -7,8 +7,6 @@
}:
let
username = "h";
hostName = "andromache";
wolInterfaces = import ./wol-interfaces.nix;
in
{
@@ -30,7 +28,7 @@ in
../../modules/bluetooth
../../modules/gaming
../../modules/keyboard
(import ../../modules/networking { inherit hostName; })
(import ../../modules/networking { hostName = config.host.name; })
../../modules/users
../../modules/audio
../../modules/localization
@@ -45,7 +43,12 @@ in
../../modules/yubikey
];
home-manager.users.${username} = import ../../home/hosts/andromache {
host = {
username = "h";
name = "andromache";
};
home-manager.users.${config.host.username} = import ../../home/hosts/andromache {
inherit
inputs
config
@@ -54,13 +57,11 @@ in
;
};
networking.hostName = hostName;
ssh.username = username;
ssh.username = config.host.username;
ssh.authorizedHosts = [ "astyanax" ];
secrets.username = username;
docker.user = username;
secrets.username = config.host.username;
docker.user = config.host.username;
nix.settings.secret-key-files = [ config.sops.secrets.nix_signing_key_andromache.path ];
@@ -94,7 +95,7 @@ in
my.yubikey = {
enable = false;
inherit username;
username = config.host.username;
keys = [
{
handle = "<KeyHandle1>";