Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
2.3 kB · 102 lines
Nix
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103{ inputs, lib, ...}:let config = { allowUnfree = true; permittedInsecurePackages = [ "olm-3.2.16" ]; }; overlays = lib.attrValues inputs.self.overlays ++ [ ( final: prev: let pkgs-unstable = import inputs.nixpkgs-unstable { system = prev.stdenv.hostPlatform.system; inherit config; }; pkgs-darwin = import inputs.nixpkgs-darwin { system = prev.stdenv.hostPlatform.system; inherit config; }; in { _unstable = pkgs-unstable; _darwin = pkgs-darwin; } ) ]; nixBaseModule = { pkgs, ... }: { nix = { enable = true; package = pkgs.nix; optimise.automatic = true; gc = { automatic = true; options = "--delete-older-than 7d"; }; settings = { experimental-features = [ "nix-command" "flakes" ]; trusted-users = [ "root" "@wheel" "@admin" ]; substituters = [ "https://cache.nixos.org" "https://nix-community.cachix.org" "https://cache.numtide.com" ]; trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "niks3.numtide.com-1:DTx8wZduET09hRmMtKdQDxNNthLQETkc/yaX7M4qK0g=" ]; }; }; }; flake.modules.nixos.nix = { imports = [ nixBaseModule ]; nixpkgs = { inherit config overlays; }; }; flake.modules.darwin.nix = { pkgs, ... }: { nixpkgs = { inherit config overlays; }; imports = [ nixBaseModule ]; nix.settings.extra-platforms = [ "x86_64-darwin" "aarch64-darwin" ]; # remove extra config to hit cache if building for the first time nix.linux-builder = { enable = true; ephemeral = true; maxJobs = 4; config = { virtualisation = { darwin-builder = { diskSize = 40 * 1024; memorySize = 8 * 1024; }; cores = 6; }; }; }; };in{ inherit flake;}