From 6418002df845e8d84599c49d1bdd172605d5ba92 Mon Sep 17 00:00:00 2001 From: Logan Linn Date: Tue, 8 Oct 2024 22:59:35 -0700 Subject: [PATCH] cleanup standalone homeConfigurations --- flake-module/default.nix | 27 +++++++++++++---------- flake.nix | 46 ++++++++++++++++++++++++++-------------- 2 files changed, 46 insertions(+), 27 deletions(-) diff --git a/flake-module/default.nix b/flake-module/default.nix index 8534cd14..e9795ec6 100644 --- a/flake-module/default.nix +++ b/flake-module/default.nix @@ -54,18 +54,23 @@ let } ); + # Home Manager "Standalone" setup mkHomeConfiguration = - systemArgs: modules: - inputs.home-manager.lib.homeManagerConfiguration { - inherit (systemArgs) pkgs lib; - modules = [ - { - options.my = systemArgs.options.my; - config.my = systemArgs.config.my; - } - ] ++ modules; - extraSpecialArgs = mkSpecialArgs systemArgs; - }; + system: modules: + withSystem system ( + ctx@{ config, inputs', ... }: + inputs.home-manager.lib.homeManagerConfiguration { + inherit (ctx) pkgs lib; + modules = [ + ../options.nix + # { + # options.my = ctx.options.my; + # config.my = ctx.config.my; + # } + ] ++ modules; + extraSpecialArgs = mkSpecialArgs ctx; + } + ); mkDarwinSystem = system: modules: diff --git a/flake.nix b/flake.nix index 8bc33a66..b1e78e79 100644 --- a/flake.nix +++ b/flake.nix @@ -124,22 +124,22 @@ ]; }; - legacyPackages = lib.optionalAttrs (ctx.system == "x86_64-linux") { - homeConfigurations = { - "logan@nijusan" = self.lib.mkHomeConfiguration ctx [ - self.homeModules.common - self.homeModules.nix-colors - self.homeModules.secrets - ./home-manager/nijusan.nix - ]; - "logan@wijusan" = self.lib.mkHomeConfiguration ctx [ - self.homeModules.common - self.homeModules.nix-colors - self.homeModules.secrets - ./home-manager/wijusan.nix - ]; - }; - }; + # legacyPackages = lib.optionalAttrs (ctx.system == "x86_64-linux") { + # homeConfigurations = { + # "logan@nijusan" = self.lib.mkHomeConfiguration ctx [ + # self.homeModules.common + # self.homeModules.nix-colors + # self.homeModules.secrets + # ./home-manager/nijusan.nix + # ]; + # "logan@wijusan" = self.lib.mkHomeConfiguration ctx [ + # self.homeModules.common + # self.homeModules.nix-colors + # self.homeModules.secrets + # ./home-manager/wijusan.nix + # ]; + # }; + # }; }; flake = { @@ -147,6 +147,20 @@ ./nixos/nijusan/configuration.nix ]; + homeConfigurations."logan@nijusan" = self.lib.mkHomeConfiguration "x86_64-linux" [ + self.homeModules.common + self.homeModules.nix-colors + self.homeModules.secrets + ./home-manager/nijusan.nix + ]; + + homeConfigurations."logan@wijusan" = self.lib.mkHomeConfiguration "x86_64-linux" [ + self.homeModules.common + self.homeModules.nix-colors + self.homeModules.secrets + ./home-manager/wijusan.nix + ]; + nixosConfigurations.framework = self.lib.mkNixosSystem "x86_64-linux" [ ./nixos/framework/configuration.nix ];