From 9b228e61bc8c2203265dd63e2ae315a7a00ddd8b Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 4 Jan 2024 14:58:14 -0600 Subject: [PATCH] WIP mapAttrs to convert basic configs to nixos systems --- flake.nix | 2 +- nixos/default.nix | 55 ++++++++++++++++++++++++++--------------------- 2 files changed, 31 insertions(+), 26 deletions(-) diff --git a/flake.nix b/flake.nix index feb97a3..6a7ff5d 100644 --- a/flake.nix +++ b/flake.nix @@ -81,7 +81,7 @@ # NixOS configuration entrypoint # Available through 'nixos-rebuild --flake .#your-hostname' - nixosConfigurations = import ./nixos { + nixosConfigurations = builtins.mapAttrs (name: {}: (import ./nixos) { base = { system = "x86_64-linux"; modules = [./nixos/base]; diff --git a/nixos/default.nix b/nixos/default.nix index 4164167..e49ffa8 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -8,29 +8,34 @@ system = "x86_64-linux"; modules = [./thablet]; }; - thinker = mkNixosSystem "x86_64-linux" [ - ./nixos/thinker - (danielWithModules [outputs.homeManagerModules.thinker]) - ]; - foxtrot = mkNixosSystem "x86_64-linux" [ - ./nixos/foxtrot - (danielWithModules [outputs.homeManagerModules.foxtrot]) - ]; - beefcake = mkNixosSystem "x86_64-linux" [ - inputs.api-lyte-dev.nixosModules.x86_64-linux.api-lyte-dev - ./nixos/beefcake - (danielWithModules [outputs.homeManagerModules.linux]) - ]; - rascal = mkNixosSystem "x86_64-linux" [ - ./nixos/rascal - (danielWithModules [outputs.homeManagerModules.linux]) - ]; - musicbox = mkNixosSystem "x86_64-linux" [ - ./nixos/musicbox - (danielWithModules [outputs.homeManagerModules.sway]) - ]; - router = mkNixosSystem "x86_64-linux" [ - ./nixos/router - (danielWithModules [outputs.homeManagerModules.common]) - ]; + + thinker = { + system = "x86_64-linux"; + modules = [./thinker]; + }; + + foxtrot = { + system = "x86_64-linux"; + modules = [./foxtrot]; + }; + + beefcake = { + system = "x86_64-linux"; + modules = [./beefcake]; + }; + + rascal = { + system = "x86_64-linux"; + modules = [./rascal]; + }; + + musicbox = { + system = "x86_64-linux"; + modules = [./musicbox]; + }; + + router = { + system = "x86_64-linux"; + modules = [./router]; + }; }