Skip to content

Commit

Permalink
cleanup standalone homeConfigurations
Browse files Browse the repository at this point in the history
  • Loading branch information
loganlinn committed Oct 9, 2024
1 parent 7a73d3c commit 6418002
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 27 deletions.
27 changes: 16 additions & 11 deletions flake-module/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
46 changes: 30 additions & 16 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -124,29 +124,43 @@
];
};

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 = {
nixosConfigurations.nijusan = self.lib.mkNixosSystem "x86_64-linux" [
./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
];
Expand Down

0 comments on commit 6418002

Please sign in to comment.