From 10aa2cc8c51c7d577c1108ae04456975c127004c Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Thu, 2 Nov 2023 17:35:40 +0100 Subject: [PATCH] [virtualbox] Pin version --- nixos/flake.lock | 18 +++++++++--------- .../virtualisation/virtualbox/default.nix | 12 ++++++++++++ 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/nixos/flake.lock b/nixos/flake.lock index 0d453b3..a52b3cd 100644 --- a/nixos/flake.lock +++ b/nixos/flake.lock @@ -62,11 +62,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1698434055, - "narHash": "sha256-Phxi5mUKSoL7A0IYUiYtkI9e8NcGaaV5PJEaJApU1Ko=", + "lastModified": 1698846319, + "narHash": "sha256-4jyW/dqFBVpWFnhl0nvP6EN4lP7/ZqPxYRjl6var0Oc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1a3c95e3b23b3cdb26750621c08cc2f1560cb883", + "rev": "34bdaaf1f0b7fb6d9091472edc968ff10a8c2857", "type": "github" }, "original": { @@ -93,11 +93,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1698318101, - "narHash": "sha256-gUihHt3yPD7bVqg+k/UVHgngyaJ3DMEBchbymBMvK1E=", + "lastModified": 1698611440, + "narHash": "sha256-jPjHjrerhYDy3q9+s5EAsuhyhuknNfowY6yt6pjn9pc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "63678e9f3d3afecfeafa0acead6239cdb447574c", + "rev": "0cbe9f69c234a7700596e943bfae7ef27a31b735", "type": "github" }, "original": { @@ -125,11 +125,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1698548647, - "narHash": "sha256-7c03OjBGqnwDW0FBaBc+NjfEBxMkza+dxZGJPyIzfFE=", + "lastModified": 1698929376, + "narHash": "sha256-TmROaV9W6HArdTUgxLN334Kw+CradxWHw1HYM/3H6xI=", "owner": "Mic92", "repo": "sops-nix", - "rev": "632c3161a6cc24142c8e3f5529f5d81042571165", + "rev": "84d6b27dc71ac02422e192c35806d06915d2bf67", "type": "github" }, "original": { diff --git a/nixos/modules/virtualisation/virtualbox/default.nix b/nixos/modules/virtualisation/virtualbox/default.nix index f4a31b6..5a01b66 100644 --- a/nixos/modules/virtualisation/virtualbox/default.nix +++ b/nixos/modules/virtualisation/virtualbox/default.nix @@ -2,6 +2,17 @@ let cfg = config.sisyphus.virtualisation.virtualbox; + + # I like to override the virtualbox package because it is frequently + # and rebuilds take quite long. + inherit (pkgs) fetchurl; + version = "7.0.10"; + virtualbox-override = pkgs.virtualbox.overrideAttrs (oldAttrs: { + src = fetchurl { + url = "https://download.virtualbox.org/virtualbox/${version}/VirtualBox-${version}.tar.bz2"; + sha256 = "0b1e6d8b7f87d017c7fae37f80586acff04f799ffc1d51e995954d6415dee371"; + }; + }); in { options.sisyphus.virtualisation.virtualbox.enable = lib.mkEnableOption "VirtualBox"; @@ -10,6 +21,7 @@ in { host = { enable = true; enableExtensionPack = true; + package = virtualbox-override; }; guest = { enable = true;