From a568f38cba900aaf0986bd0bbcdf827b46010b35 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Sat, 3 Dec 2022 12:36:39 -0500 Subject: [PATCH] reuse common module --- flake.nix | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/flake.nix b/flake.nix index a0599bd..4b63407 100644 --- a/flake.nix +++ b/flake.nix @@ -81,19 +81,26 @@ in { # Configuration common to all Linux systems - nixosModules.default = { - imports = [ - ./nixos/caches - ./nixos/self-ide.nix - ./nixos/takemessh - ./nixos/current-location.nix + nixosModules = { + common = { + imports = [ + ./nixos/caches + ]; + }; + default = inputs.nixpkgs.lib.mkMerge [ + self.nixosModules.common + ({ + imports = [ + ./nixos/self-ide.nix + ./nixos/takemessh + ./nixos/current-location.nix + ]; + }) ]; }; # Configuration common to macOS Linux systems - darwinModules.default = { - imports = [ - ./nixos/caches - ]; + darwinModules = { + default = self.nixosModules.common; }; # Configurations for Linux (NixOS) systems nixosConfigurations =