Skip to content

Commit de749be

Browse files
committed
Simplify darwin config
1 parent bce0e43 commit de749be

1 file changed

Lines changed: 29 additions & 41 deletions

File tree

flake.nix

Lines changed: 29 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -112,51 +112,39 @@
112112
let
113113
system = "aarch64-darwin";
114114
inherit (mkPkgs system) pkgs pkgs-unstable;
115-
hostConfiguration = {
116-
inherit username;
117-
};
118115
git-format-staged = inputs.git-format-staged.packages.${system}.default;
116+
darwinConfig =
117+
{ }:
118+
let
119+
hostConfiguration = {
120+
inherit username;
121+
};
122+
in
123+
inputs.darwin.lib.darwinSystem {
124+
inherit system;
125+
modules = [
126+
{
127+
nixpkgs.config = config;
128+
}
129+
./common/fonts.nix
130+
./common/nix-settings.nix
131+
./common/darwin.nix
132+
inputs.home-manager.darwinModules.home-manager
133+
];
134+
specialArgs = {
135+
inherit
136+
inputs
137+
hostConfiguration
138+
pkgs-unstable
139+
git-format-staged
140+
;
141+
};
142+
};
119143
in
120144
{
121-
"macbook" = inputs.darwin.lib.darwinSystem {
122-
inherit system;
123-
modules = [
124-
{
125-
nixpkgs.config = config;
126-
}
127-
./common/fonts.nix
128-
./common/nix-settings.nix
129-
./common/darwin.nix
130-
inputs.home-manager.darwinModules.home-manager
131-
];
132-
specialArgs = {
133-
inherit
134-
inputs
135-
hostConfiguration
136-
pkgs-unstable
137-
git-format-staged
138-
;
139-
};
145+
"macbook" = darwinConfig {
140146
};
141-
"work-macbook" = inputs.darwin.lib.darwinSystem {
142-
inherit system;
143-
modules = [
144-
{
145-
nixpkgs.config = config;
146-
}
147-
./common/fonts.nix
148-
./common/nix-settings.nix
149-
./common/darwin.nix
150-
inputs.home-manager.darwinModules.home-manager
151-
];
152-
specialArgs = {
153-
inherit
154-
inputs
155-
hostConfiguration
156-
pkgs-unstable
157-
git-format-staged
158-
;
159-
};
147+
"work-macbook" = darwinConfig {
160148
};
161149
};
162150
}

0 commit comments

Comments
 (0)