From f58b25254be441cd2a9b4b444ed83f1e51244f1f Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Thu, 11 Apr 2024 10:05:30 +0200 Subject: [PATCH] macmini4: init --- README.md | 1 + apple/macmini/4/default.nix | 28 ++++++++++++++++++++++++++++ apple/macmini/default.nix | 6 ++++++ flake.nix | 1 + 4 files changed, 36 insertions(+) create mode 100644 apple/macmini/4/default.nix create mode 100644 apple/macmini/default.nix diff --git a/README.md b/README.md index ed7464d..1bfe760 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,7 @@ See code for all available configurations. | [Apple MacBook Pro 11,5](apple/macbook-pro/11-5) | `` | | [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | | [Apple MacBook Pro 14,1](apple/macbook-pro/14-1) | `` | +| [Apple MacMini (2010, Intel, Nvidia)](apple/macmini/4) | `` | | [Apple Macs with a T2 Chip](apple/t2) | `` | | [Asus ROG Ally RC71L (2023)](asus/ally/rc71l) | `` | | [Asus ROG Strix G513IM](asus/rog-strix/g513im) | `` | diff --git a/apple/macmini/4/default.nix b/apple/macmini/4/default.nix new file mode 100644 index 0000000..fd3062d --- /dev/null +++ b/apple/macmini/4/default.nix @@ -0,0 +1,28 @@ +{ + lib, + ... +}: +let + inherit (lib) mkDefault; +in +{ + imports = [ + ../. + ]; + + services.xserver.videoDrivers = mkDefault [ "nvidiaLegacy340" ]; + + hardware.opengl = { + enable = mkDefault true; + driSupport = mkDefault true; + driSupport32Bit = mkDefault true; + }; + + hardware.nvidia = { + modesetting.enable = mkDefault true; + powerManagement.enable = mkDefault false; + powerManagement.finegrained = mkDefault false; + open = mkDefault false; + nvidiaSettings = mkDefault true; + }; +} diff --git a/apple/macmini/default.nix b/apple/macmini/default.nix new file mode 100644 index 0000000..84bbb18 --- /dev/null +++ b/apple/macmini/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ../. + ../../common/cpu/intel + ]; +} diff --git a/flake.nix b/flake.nix index 31b92ef..046d9be 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,7 @@ apple-macbook-pro-11-5 = import ./apple/macbook-pro/11-5; apple-macbook-pro-12-1 = import ./apple/macbook-pro/12-1; apple-macbook-pro-14-1 = import ./apple/macbook-pro/14-1; + apple-macmini-4-1 = import ./apple/macmini/4; apple-t2 = import ./apple/t2; asus-battery = import ./asus/battery.nix; asus-ally-rc71l = import ./asus/ally/rc71l;