base/base.nix: set hostname in base module using nix opt
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Module: base/base
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, hostName, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
@@ -14,11 +14,20 @@ in {
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILiUy2yjIkdryH7pYMdkCNryy9gceqXJ7bhtMvvpPBIk etorres@xenon"
|
||||
];
|
||||
};
|
||||
|
||||
hostName = mkOption {
|
||||
type = types.str;
|
||||
default = "nixOS";
|
||||
description = "System's hostname";
|
||||
example = "server-01";
|
||||
};
|
||||
};
|
||||
|
||||
imports = [ ./grafana-alloy.nix ./network.nix ./qemu.nix ./spice.nix ];
|
||||
|
||||
config = {
|
||||
networking.hostName = cfg.hostName;
|
||||
|
||||
time.timeZone = "Etc/UTC";
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
Reference in New Issue
Block a user