refactor: extract host config into 'host.nix' files
This commit is contained in:
@@ -14,6 +14,7 @@ in
|
|||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
../../modules/common
|
../../modules/common
|
||||||
./hard.nix
|
./hard.nix
|
||||||
|
./host.nix
|
||||||
inputs.nixos-hardware.nixosModules.common-cpu-intel
|
inputs.nixos-hardware.nixosModules.common-cpu-intel
|
||||||
inputs.nixos-hardware.nixosModules.common-pc
|
inputs.nixos-hardware.nixosModules.common-pc
|
||||||
inputs.nixos-hardware.nixosModules.common-pc-ssd
|
inputs.nixos-hardware.nixosModules.common-pc-ssd
|
||||||
@@ -43,11 +44,6 @@ in
|
|||||||
../../modules/yubikey
|
../../modules/yubikey
|
||||||
];
|
];
|
||||||
|
|
||||||
host = {
|
|
||||||
username = "h";
|
|
||||||
name = "andromache";
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager.users.${config.host.username} = import ../../home/hosts/andromache {
|
home-manager.users.${config.host.username} = import ../../home/hosts/andromache {
|
||||||
inherit
|
inherit
|
||||||
inputs
|
inputs
|
||||||
|
|||||||
4
hosts/andromache/host.nix
Normal file
4
hosts/andromache/host.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
username = "h";
|
||||||
|
name = "andromache";
|
||||||
|
}
|
||||||
@@ -13,6 +13,7 @@ in
|
|||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
../../modules/common
|
../../modules/common
|
||||||
./hard.nix
|
./hard.nix
|
||||||
|
./host.nix
|
||||||
inputs.nixos-hardware.nixosModules.common-pc
|
inputs.nixos-hardware.nixosModules.common-pc
|
||||||
inputs.nixos-hardware.nixosModules.common-pc-ssd
|
inputs.nixos-hardware.nixosModules.common-pc-ssd
|
||||||
# inputs.nixos-hardware.nixosModules.lenovo-thinkpad-e14-intel-gen7 (not available yet?)
|
# inputs.nixos-hardware.nixosModules.lenovo-thinkpad-e14-intel-gen7 (not available yet?)
|
||||||
@@ -40,11 +41,6 @@ in
|
|||||||
../../modules/nfc
|
../../modules/nfc
|
||||||
];
|
];
|
||||||
|
|
||||||
host = {
|
|
||||||
username = "h";
|
|
||||||
name = "astyanax";
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager.users.${config.host.username} = import ../../home/hosts/astyanax {
|
home-manager.users.${config.host.username} = import ../../home/hosts/astyanax {
|
||||||
inherit
|
inherit
|
||||||
inputs
|
inputs
|
||||||
|
|||||||
4
hosts/astyanax/host.nix
Normal file
4
hosts/astyanax/host.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
username = "h";
|
||||||
|
name = "astyanax";
|
||||||
|
}
|
||||||
@@ -8,13 +8,9 @@
|
|||||||
./hard.nix
|
./hard.nix
|
||||||
../../modules/ssh
|
../../modules/ssh
|
||||||
../../modules/common
|
../../modules/common
|
||||||
|
./host.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
host = {
|
|
||||||
username = "h";
|
|
||||||
name = "eetion-02";
|
|
||||||
};
|
|
||||||
|
|
||||||
ssh = {
|
ssh = {
|
||||||
inherit (config.host) username;
|
inherit (config.host) username;
|
||||||
publicHostname = config.host.name;
|
publicHostname = config.host.name;
|
||||||
|
|||||||
4
hosts/eetion-02/host.nix
Normal file
4
hosts/eetion-02/host.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
username = "h";
|
||||||
|
name = "eetion-02";
|
||||||
|
}
|
||||||
@@ -8,14 +8,10 @@
|
|||||||
./hard.nix
|
./hard.nix
|
||||||
../../modules/ssh
|
../../modules/ssh
|
||||||
../../modules/common
|
../../modules/common
|
||||||
|
./host.nix
|
||||||
# ../../modules/uptime-kuma
|
# ../../modules/uptime-kuma
|
||||||
];
|
];
|
||||||
|
|
||||||
host = {
|
|
||||||
username = "h";
|
|
||||||
name = "eetion";
|
|
||||||
};
|
|
||||||
|
|
||||||
ssh = {
|
ssh = {
|
||||||
inherit (config.host) username;
|
inherit (config.host) username;
|
||||||
publicHostname = config.host.name;
|
publicHostname = config.host.name;
|
||||||
|
|||||||
4
hosts/eetion/host.nix
Normal file
4
hosts/eetion/host.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
username = "h";
|
||||||
|
name = "eetion";
|
||||||
|
}
|
||||||
@@ -12,15 +12,11 @@
|
|||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
../../modules/common
|
../../modules/common
|
||||||
./hard.nix
|
./hard.nix
|
||||||
|
./host.nix
|
||||||
../../modules/ssh
|
../../modules/ssh
|
||||||
../../modules/docker
|
../../modules/docker
|
||||||
];
|
];
|
||||||
|
|
||||||
host = {
|
|
||||||
username = "username";
|
|
||||||
name = "hecuba";
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.hostName = config.host.name;
|
networking.hostName = config.host.name;
|
||||||
ssh = {
|
ssh = {
|
||||||
inherit (config.host) username;
|
inherit (config.host) username;
|
||||||
|
|||||||
4
hosts/hecuba/host.nix
Normal file
4
hosts/hecuba/host.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
username = "username";
|
||||||
|
name = "hecuba";
|
||||||
|
}
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
./hard.nix
|
./hard.nix
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
./disk.nix
|
./disk.nix
|
||||||
|
./host.nix
|
||||||
../../modules/boot/bootloader.nix
|
../../modules/boot/bootloader.nix
|
||||||
../../modules/keyboard
|
../../modules/keyboard
|
||||||
(import ../../modules/networking { hostName = config.host.name; })
|
(import ../../modules/networking { hostName = config.host.name; })
|
||||||
@@ -27,11 +28,6 @@
|
|||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
host = {
|
|
||||||
username = "h";
|
|
||||||
name = "vm";
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager.users.${config.host.username} = import ../../home/hosts/vm {
|
home-manager.users.${config.host.username} = import ../../home/hosts/vm {
|
||||||
inherit inputs config pkgs;
|
inherit inputs config pkgs;
|
||||||
};
|
};
|
||||||
|
|||||||
4
hosts/vm/host.nix
Normal file
4
hosts/vm/host.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
username = "h";
|
||||||
|
name = "vm";
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user