Functionning template

This commit is contained in:
Théo Barnouin 2024-09-10 09:51:13 +02:00
parent f1260cbc95
commit 91e61ef0a6
2 changed files with 19 additions and 17 deletions

View file

@ -13,23 +13,24 @@
outputs = inputs@{ self, nixpkgs, home-manager, microvm, ... }:
let
hostName = "nixos-hypervisor";
system = "x86_64-linux";
username = "tbarnouin";
in
{
nixosConfigurations = {
nixos-hypervisor = nixpkgs.lib.nixosSystem {
${hostName} = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
./hosts/nixos-hypervisor/configuration.nix
./hosts/${hostName}/configuration.nix
{
networking.hostName = "nixos-hypervisor";
networking.hostName = hostName;
}
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${username} = import ./hosts/nixos-hypervisor/home.nix;
home-manager.users.${username} = import ./hosts/${hostName}/home.nix;
}
microvm.nixosModules.host
{
@ -50,6 +51,7 @@
specialArgs = {
inherit inputs;
inherit username;
inherit hostName;
};
};
nginx = nixpkgs.lib.nixosSystem {

View file

@ -2,7 +2,7 @@
{ imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
# ./hardware-configuration.nix
];
nix.settings = {