fix-darwin

This commit is contained in:
Philipp Hochkamp 2022-08-30 09:09:51 +02:00
parent ae980aa07b
commit b32498e5d0
2 changed files with 9 additions and 8 deletions

View file

@ -4,8 +4,8 @@
environment.pathsToLink = [ "/share/zsh" ]; environment.pathsToLink = [ "/share/zsh" ];
services.nix-daemon.enable = true; services.nix-daemon.enable = true;
nix.package = pkgs.nixFlakes; nix.package = pkgs.nixFlakes;
nix.buildCores = 0; # use all cores nix.settings.cores = 0; # use all cores
nix.maxJobs = 10; # use all cores nix.settings.max-jobs = 10; # use all cores
nix.distributedBuilds = true; nix.distributedBuilds = true;
nix.buildMachines = [{ nix.buildMachines = [{
systems = [ "x86_64-linux" ]; systems = [ "x86_64-linux" ];

View file

@ -79,6 +79,10 @@
self.overlays.default self.overlays.default
emacs-overlay.overlay emacs-overlay.overlay
]; ];
genPkgsWithOverlays = system: import nixpkgs {
inherit system overlays;
config.allowUnfree = true;
};
hmConfig = { hm, pkgs, inputs, config, ... }: { hmConfig = { hm, pkgs, inputs, config, ... }: {
@ -122,19 +126,16 @@
}; };
darwinSystem = system: extraModules: hostName: darwinSystem = system: extraModules: hostName:
let let
pkgs = genPkgs system; pkgs = genPkgsWithOverlays system;
in in
darwin.lib.darwinSystem darwin.lib.darwinSystem
{ {
inherit system; inherit system;
specialArgs = { inherit lib; }; specialArgs = { inherit lib pkgs inputs self darwin; };
modules = [ modules = [
home-manager.darwinModules.home-manager home-manager.darwinModules.home-manager
{ {
#system.darwinLabel = "${config.system.darwinLabel}@${rev}"; #system.darwinLabel = "${config.system.darwinLabel}@${rev}";
_module.args = { inherit lib inputs self darwin; };
nixpkgs.pkgs = pkgs;
nixpkgs.overlays = overlays;
networking.hostName = hostName; networking.hostName = hostName;
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;