From f35c4969056cb48e0aea313bc3262af7dbfb6a77 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Wed, 28 Feb 2024 19:36:12 +0100 Subject: [PATCH] Define individual hosts in hosts/ --- flake.nix | 10 +++------- hosts/default.nix | 11 +++++++++++ 2 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 hosts/default.nix diff --git a/flake.nix b/flake.nix index d719693..7cc98cb 100644 --- a/flake.nix +++ b/flake.nix @@ -14,12 +14,8 @@ inputs.flake-parts.lib.mkFlake { inherit inputs; } { systems = ["x86_64-linux"]; - flake = { - nixosConfigurations = { - vboxnix = nixpkgs.lib.nixosSystem { - modules = [ ./system ./hosts/vbox_nix ]; - }; - }; - }; + imports = [ + ./hosts + ]; }; } diff --git a/hosts/default.nix b/hosts/default.nix new file mode 100644 index 0000000..8d07a66 --- /dev/null +++ b/hosts/default.nix @@ -0,0 +1,11 @@ +{self, inputs, ...}: { + flake.nixosConfigurations = let + inherit (inputs.nixpkgs.lib) nixosSystem; + specialArgs = {inherit inputs self;}; + in { + vboxnix = nixosSystem { + inherit specialArgs; + modules = [ ../system ./vbox_nix ]; + }; + }; +}