From b9dd334acac615eecf5c3e4bd9faec5b841eaea9 Mon Sep 17 00:00:00 2001 From: James Eversole Date: Thu, 14 Sep 2023 18:25:30 -0500 Subject: [PATCH] Add overlay for bun JS runtime version 1.0.1, install bun to user profile --- flake.nix | 1 + nix/system/overlays.nix | 15 +++++++++++++++ nix/user/users.nix | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 nix/system/overlays.nix diff --git a/flake.nix b/flake.nix index 5be9e1a..40d7d49 100644 --- a/flake.nix +++ b/flake.nix @@ -64,6 +64,7 @@ ./nix/system/nix-conf.nix ./nix/system/network.nix ./nix/system/openvpn.nix + ./nix/system/overlays.nix ./nix/system/security.nix ./nix/system/system.nix ./nix/system/virtualisation.nix diff --git a/nix/system/overlays.nix b/nix/system/overlays.nix new file mode 100644 index 0000000..365f06a --- /dev/null +++ b/nix/system/overlays.nix @@ -0,0 +1,15 @@ +{ config, lib, pkgs, ... }: +{ + nixpkgs.overlays = [ + (final: prev: { + bun = prev.bun.overrideAttrs (old: rec { + name = "bun-${version}"; + version = "1.0.1"; + src = pkgs.fetchurl { + url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-linux-x64.zip"; + sha256 = "sha256-RmgnWTG6kTebYwIa/VAwvvJmbL+ARNC+HkbF4mJPF7o="; + }; + }); + }) + ]; +} diff --git a/nix/user/users.nix b/nix/user/users.nix index f8f3faa..3997277 100644 --- a/nix/user/users.nix +++ b/nix/user/users.nix @@ -7,7 +7,7 @@ isNormalUser = true; passwordFile = config.age.secrets.sezycei.path; extraGroups = [ "wheel" "nginx" ]; - packages = with pkgs; [ byobu tmux stack ]; + packages = with pkgs; [ bun byobu tmux stack ]; }; cridycei = {