From 08f9837fe111c9a830c09fcfa4ed027d7656ba96 Mon Sep 17 00:00:00 2001 From: vorboyvo Date: Thu, 11 Jul 2024 12:43:40 -0400 Subject: [PATCH] Fixed the flake to not need branches. --- flake.nix | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/flake.nix b/flake.nix index ae68d55..ec68d63 100644 --- a/flake.nix +++ b/flake.nix @@ -20,20 +20,35 @@ # nur.url = "github:nix-community/NUR"; }; - outputs = { self, nixpkgs, home-manager }: + outputs = + { + self, + nixpkgs, + home-manager, + }: let system = "x86_64-linux"; - hostname = "de-lacadie"; - in { - nixosConfigurations = { - ${hostname} = nixpkgs.lib.nixosSystem { - inherit system; - modules = [ - ./hosts/${hostname}/configuration.nix - home-manager.nixosModules.home-manager - # nur.nixosModules.nur - ]; - }; - }; + in + { + nixosConfigurations = + let + hostnameToConfig = hostname: { + name = hostname; + value = nixpkgs.lib.nixosSystem { + inherit system; + modules = [ + ./hosts/${hostname}/configuration.nix + home-manager.nixosModules.home-manager + # nur.nixosModules.nur + ]; + }; + }; + in + builtins.listToAttrs ( + builtins.map hostnameToConfig [ + "randolph" + "de-lacadie" + ] + ); }; }