refactor: flake.nix - adjust nixosConfigurations

This commit is contained in:
Ryan Yin
2023-07-27 02:33:39 +08:00
parent befddfe476
commit 5d2cf3e5dd

View File

@@ -108,7 +108,8 @@
nixosSystem = import ./lib/nixosSystem.nix; nixosSystem = import ./lib/nixosSystem.nix;
macosSystem = import ./lib/macosSystem.nix; macosSystem = import ./lib/macosSystem.nix;
in {
nixosConfigurations = let
# 星野 アイ, Hoshino Ai # 星野 アイ, Hoshino Ai
idol_ai_modules_i3 = { idol_ai_modules_i3 = {
nixos-modules = [ nixos-modules = [
@@ -148,8 +149,7 @@
]; ];
home-module = import ./home/linux/server.nix; home-module = import ./home/linux/server.nix;
}; };
in {
nixosConfigurations = let
system = x64_system; system = x64_system;
specialArgs = specialArgs =
{ {
@@ -198,7 +198,7 @@
); );
# macOS's configuration, for work. # macOS's configuration, for work.
darwinConfigurations."harmonica" = let darwinConfigurations = let
system = x64_darwin; system = x64_darwin;
specialArgs = specialArgs =
{ {
@@ -211,13 +211,16 @@
}; };
} }
// inputs; // inputs;
in base_args = {
macosSystem {
inherit nix-darwin home-manager system specialArgs; inherit nix-darwin home-manager system specialArgs;
};
in {
harmonica = macosSystem (base_args // {
darwin-modules = [ darwin-modules = [
./hosts/harmonica ./hosts/harmonica
]; ];
home-module = import ./home/darwin; home-module = import ./home/darwin;
});
}; };
# format the nix code in this flake # format the nix code in this flake