refactor(nix/darwin): Simplify code

This commit is contained in:
Ahmad Ansori Palembani 2024-11-03 08:18:30 +07:00
parent 539e282cda
commit 472e3e05db
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
2 changed files with 6 additions and 13 deletions

View file

@ -3,6 +3,7 @@
let let
mkCommon = import ../../lib/mkCommon.nix; mkCommon = import ../../lib/mkCommon.nix;
mkSystem = import ../../lib/mkSystem.nix; mkSystem = import ../../lib/mkSystem.nix;
mkBrew = import ../../overlays/darwin/brew.nix;
in in
{ {
# Host list # Host list
@ -21,10 +22,7 @@ in
unstable = nixpkgs-unstable; unstable = nixpkgs-unstable;
extraOverlays = [ extraOverlays = [
inputs.firefox-darwin.overlay inputs.firefox-darwin.overlay
(import ../../overlays/darwin/brew.nix { (mkBrew { inherit system brew-api; nixpkgs = nixpkgs-stable; })
inherit system brew-api;
nixpkgs = nixpkgs-stable;
})
(import ../../overlays/darwin/heliport.nix) (import ../../overlays/darwin/heliport.nix)
]; ];
} }
@ -50,10 +48,7 @@ in
unstable = nixpkgs-unstable; unstable = nixpkgs-unstable;
extraOverlays = [ extraOverlays = [
inputs.firefox-darwin.overlay inputs.firefox-darwin.overlay
(import ../../overlays/darwin/brew.nix { (mkBrew { inherit system brew-api; nixpkgs = nixpkgs-stable; })
inherit system brew-api;
nixpkgs = nixpkgs-stable;
})
]; ];
} }
) pkgs pkgs-unstable; ) pkgs pkgs-unstable;

View file

@ -2,6 +2,7 @@
let let
mkSystem = import ../lib/mkSystem.nix; mkSystem = import ../lib/mkSystem.nix;
mkBrew = import ../../overlays/darwin/brew.nix
in in
{ {
# Host list # Host list
@ -21,15 +22,12 @@ in
system = "x86_64-darwin"; system = "x86_64-darwin";
inherit ( inherit (
mkSystem { mkSystem {
arch = "x86_64-darwin"; arch = system;
stable = nixpkgs-stable; stable = nixpkgs-stable;
unstable = nixpkgs-unstable; unstable = nixpkgs-unstable;
extraOverlays = [ extraOverlays = [
inputs.firefox-darwin.overlay inputs.firefox-darwin.overlay
(import ../../overlays/darwin/brew.nix { (mkBrew { inherit system brew-api; nixpkgs = nixpkgs-stable; })
inherit system brew-api;
nixpkgs = nixpkgs-stable;
})
]; ];
} }
) pkgs pkgs-unstable; ) pkgs pkgs-unstable;