From f1260cbc9567f45876f874380a1b3db42cec7566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Barnouin?= Date: Mon, 9 Sep 2024 15:43:00 +0200 Subject: [PATCH] Declare hostname explicitly --- flake.nix | 9 ++++----- hosts/{nixos => nixos-hypervisor}/configuration.nix | 0 .../hardware-configuration.nix | 0 hosts/{nixos => nixos-hypervisor}/home.nix | 0 4 files changed, 4 insertions(+), 5 deletions(-) rename hosts/{nixos => nixos-hypervisor}/configuration.nix (100%) rename hosts/{nixos => nixos-hypervisor}/hardware-configuration.nix (100%) rename hosts/{nixos => nixos-hypervisor}/home.nix (100%) diff --git a/flake.nix b/flake.nix index 6ff070b..036a994 100644 --- a/flake.nix +++ b/flake.nix @@ -13,24 +13,23 @@ outputs = inputs@{ self, nixpkgs, home-manager, microvm, ... }: let - hostName = "nixos"; system = "x86_64-linux"; username = "tbarnouin"; in { nixosConfigurations = { - ${hostName} = nixpkgs.lib.nixosSystem { + nixos-hypervisor = nixpkgs.lib.nixosSystem { inherit system; modules = [ - ./hosts/${hostName}/configuration.nix + ./hosts/nixos-hypervisor/configuration.nix { - networking.hostName = hostName; + networking.hostName = "nixos-hypervisor"; } home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.users.${username} = import ./hosts/${hostName}/home.nix; + home-manager.users.${username} = import ./hosts/nixos-hypervisor/home.nix; } microvm.nixosModules.host { diff --git a/hosts/nixos/configuration.nix b/hosts/nixos-hypervisor/configuration.nix similarity index 100% rename from hosts/nixos/configuration.nix rename to hosts/nixos-hypervisor/configuration.nix diff --git a/hosts/nixos/hardware-configuration.nix b/hosts/nixos-hypervisor/hardware-configuration.nix similarity index 100% rename from hosts/nixos/hardware-configuration.nix rename to hosts/nixos-hypervisor/hardware-configuration.nix diff --git a/hosts/nixos/home.nix b/hosts/nixos-hypervisor/home.nix similarity index 100% rename from hosts/nixos/home.nix rename to hosts/nixos-hypervisor/home.nix