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: { { pkgs, ... }@args: {
config._module.args = { config._module.args = {
hostname = name;
machineConfig = (default args) // machineConfig = (default args) //
(config args) // { (config args) // {
inherit name; inherit name;

View file

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