Allow configuring the hostname
This commit is contained in:
parent
fe037f7309
commit
8584eef0ec
|
@ -35,6 +35,12 @@
|
|||
};
|
||||
};
|
||||
|
||||
hostname = mkOption {
|
||||
type = types.str;
|
||||
description = "The hostname of the system.";
|
||||
default = "valhalla";
|
||||
};
|
||||
|
||||
setupUser = {
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
|
|
|
@ -1,16 +1,20 @@
|
|||
{ ... }: {
|
||||
{ lib, ... }: {
|
||||
imports = [
|
||||
../defaults.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
valhalla = {
|
||||
hostname = lib.mkDefault "der-geret";
|
||||
|
||||
windows = {
|
||||
dualboot = {
|
||||
enable = true;
|
||||
linuxPercentage = 70; # better safe than sorry
|
||||
};
|
||||
|
||||
hostname = "DerGeret";
|
||||
|
||||
users.manuel = {
|
||||
microsoftAccount = true;
|
||||
groups = ["Administrators"];
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
];
|
||||
|
||||
config = {
|
||||
valhalla.partition.os.deviceName = "nvme0n1";
|
||||
valhalla = {
|
||||
hostname = "manu-surface";
|
||||
partition.os.deviceName = "nvme0n1";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ begin
|
|||
echo "KEYMAP=$keyMap" | arch-chroot "$mountDir" tee /etc/vconsole.conf > /dev/null
|
||||
end
|
||||
|
||||
and echo "$ARCH_HOSTNAME" | arch-chroot "$mountDir" tee /etc/hostname > /dev/null
|
||||
and echo (getConfig valhalla.hostname) | arch-chroot "$mountDir" tee /etc/hostname > /dev/null
|
||||
|
||||
and arch-chroot "$mountDir" mkinitcpio -P
|
||||
and runHook installDrivers "Installing drivers..." || true
|
||||
|
|
|
@ -8,7 +8,6 @@ function Start-Setup {
|
|||
$Global:InformationPreference = "Continue";
|
||||
$Global:ErrorActionPreference = "Inquire";
|
||||
$env:CONFIG_NAME ??= $ConfigurationName;
|
||||
$null = $env:WIN_COMPUTER_NAME;
|
||||
$null = $env:SETUP_SCRIPT_NAME ??= "$PSScriptRoot/Install.ps1";
|
||||
$env:WSLENV = "CONFIG_NAME";
|
||||
|
||||
|
@ -218,7 +217,7 @@ function Start-Setup {
|
|||
|
||||
# Adjust unattended settings
|
||||
$computerName = (Get-Component (Get-PassSettings "specialize") "Microsoft-Windows-Shell-Setup").SelectSingleNode("./ua:ComputerName", $namespace);
|
||||
$computerName.InnerText = "$env:WIN_COMPUTER_NAME";
|
||||
$computerName.InnerText = $valhallaConfig.hostname;
|
||||
|
||||
# Execute corresponding installer script after startup
|
||||
$oobeSettings = (Get-Component (Get-PassSettings "oobeSystem") "Microsoft-Windows-Shell-Setup");
|
||||
|
|
Loading…
Reference in a new issue