Replace hostname variable with machineInfo

This commit is contained in:
Manuel Thalmann 2024-05-11 19:53:58 +02:00
parent 54807aa9e2
commit 0e092d427b
2 changed files with 3 additions and 5 deletions

View file

@ -88,8 +88,6 @@
(
{ pkgs, ... }: {
config._module.args = {
inherit hostname;
machineInfo = machine // {
name = hostname;
config = (pkgs.callPackage config { });
@ -139,7 +137,6 @@
inherit
machineConfig
hostname
username
;

View file

@ -1,4 +1,4 @@
{ hostname, lib, machineConfig, ... }: {
{ lib, machineConfig, machineInfo, ... }: {
imports = [
./modules/custom-build-vm.nix
./modules/custom-sops-nix.nix
@ -37,6 +37,7 @@
users =
lib.attrsets.concatMapAttrs (username: user:
let
hostname = machineInfo.name;
getUserConfig = import ./utils/user-config.nix { inherit lib; };
configPath = getUserConfig { inherit hostname username; };
in
@ -53,7 +54,7 @@
};
# Networking
networking.hostName = hostname;
networking.hostName = machineInfo.name;
# Set time zone
time.timeZone = machineConfig.timeZone;