Hook in the hostname separately

This commit is contained in:
Manuel Thalmann 2024-05-09 00:35:21 +02:00
parent c0211a8b76
commit 808926f012
2 changed files with 4 additions and 2 deletions

View file

@ -65,6 +65,8 @@
(
{ pkgs, ... }@args: {
config._module.args = {
hostname = name;
machineConfig = (default args) //
(config args) // {
inherit name;

View file

@ -1,4 +1,4 @@
{ machineConfig, ... }: {
{ hostname, machineConfig, ... }: {
imports = [
./modules/custom-build-vm.nix
./modules/custom-sops-nix.nix
@ -30,7 +30,7 @@
users.myUsers = machineConfig.users;
# Networking
networking.hostName = machineConfig.name;
networking.hostName = hostname;
# Set time zone
time.timeZone = machineConfig.timeZone;