Skip to content

Commit 51be798

Browse files
committed
vibe nixpak sandbox wip
1 parent 44346bc commit 51be798

File tree

4 files changed

+65
-19
lines changed

4 files changed

+65
-19
lines changed

nix/configuration.nix

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -776,26 +776,19 @@ in {
776776
ccrypt
777777
libreoffice
778778
tor-browser-bundle-bin
779-
kooha
780779
mpv
781780
# cura
782781
git-lfs
783782
lesspass-cli
784-
# mkdir -p ~/macos/Public
785-
# cd ~/macos
786-
# chmod 777 ./Public
787-
# quickget macos monterey
788-
# quickemu --vm macos-monterey.conf --public-dir ./Public --extra_args "-cpu host,+vmx"
789-
quickemu
790783
usbutils
791784
simple-scan
792785
system-config-printer
793786
pulsemixer
787+
neovim
794788
(import ./vidmaker.nix)
795789
(import ./clipmaker.nix)
796-
neovim
797-
(import ./zed.nix {inherit pkgs;})
798790
(import ./bar.nix {inherit pkgs;})
791+
(import ./vibe.nix {inherit pkgs;})
799792
];
800793
programs.git = {
801794
enable = true;
@@ -1104,8 +1097,9 @@ in {
11041097
# AI
11051098
#
11061099
services.llama-cpp.port = 11434;
1107-
services.llama-cpp.package = pkgs.llama-cpp.override {vulkanSupport = true;};
1108-
services.llama-cpp.model = ../../llms/microsoft_Phi-4-reasoning-plus-Q5_K_M.gguf;
1100+
services.llama-cpp.package = unst.llama-cpp.override {vulkanSupport = true;};
1101+
services.llama-cpp.model = ../../llms/google_gemma-3-270m-it-qat-Q5_K_M.gguf;
1102+
services.llama-cpp.extraFlags = ["-c" "32000"];
11091103
#
11101104
# Fonts
11111105
#

nix/shell.nix

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,14 @@ in
1616
buildInputs =
1717
[
1818
pkgs.hlint
19-
pkgs.gleam
20-
pkgs.erlang
21-
pkgs.elixir
2219
pkgs.libwebp
2320
newpkgs.litecli
24-
misc.nix-bundle
2521
bak.bak-status
2622
bak.bak-commit
2723
bak.bak-encrypt
2824
# bak.bak-decrypt
2925
]
3026
++ (import ./tools.nix)
31-
++ (import ./../pub/dazzle/nix/tools.nix)
3227
++ (import ./../pub/functora-hakyll/nix/tools.nix)
3328
++ (import ./../pub/functora/nix/tools.nix)
3429
++ (import ./../pub/bfx/nix/tools.nix)

nix/sources.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@
6565
"homepage": "",
6666
"owner": "NixOS",
6767
"repo": "nixpkgs",
68-
"rev": "cab778239e705082fe97bb4990e0d24c50924c04",
69-
"sha256": "119yw3dqvq6c9kvvk8x1829a3symy6g0cbzjpskx9xhbak4r82cn",
68+
"rev": "32f313e49e42f715491e1ea7b306a87c16fe0388",
69+
"sha256": "1z4ga87qla5300qwib3dnjnkaywwh8y1qqsb8w2mrsrw78k9xmlw",
7070
"type": "tarball",
71-
"url": "https://github.com/NixOS/nixpkgs/archive/cab778239e705082fe97bb4990e0d24c50924c04.tar.gz",
71+
"url": "https://github.com/NixOS/nixpkgs/archive/32f313e49e42f715491e1ea7b306a87c16fe0388.tar.gz",
7272
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
7373
}
7474
}

nix/vibe.nix

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{pkgs ? import <nixpkgs> {}}: let
2+
nixpak = import ./nixpak.nix;
3+
mkNixPak = nixpak.lib.nixpak {
4+
inherit (pkgs) lib;
5+
inherit pkgs;
6+
};
7+
app = pkgs.writeShellApplication {
8+
name = "vibe";
9+
text = "alacritty";
10+
runtimeInputs = with pkgs; [
11+
(import ./../pub/vi/nix/default.nix {})
12+
busybox
13+
curl
14+
wget
15+
git
16+
alacritty
17+
tmux
18+
nix
19+
];
20+
};
21+
sandbox = mkNixPak {
22+
config = {sloth, ...}: {
23+
app.package = app;
24+
gpu.enable = true;
25+
gpu.provider = "bundle";
26+
fonts.enable = true;
27+
locale.enable = true;
28+
etc.sslCertificates.enable = true;
29+
bubblewrap = {
30+
network = true;
31+
sockets.pulse = true;
32+
sockets.wayland = true;
33+
bind.ro = [
34+
"/bin/sh"
35+
"/run/current-system/sw/bin/bash"
36+
"/run/current-system/sw/bin/less"
37+
(sloth.concat' sloth.homeDir "/.config/tmux")
38+
(sloth.concat' sloth.homeDir "/.config/alacritty")
39+
(sloth.concat' sloth.homeDir "/.config/nvim/coc-settings.json")
40+
];
41+
bind.rw = [
42+
[
43+
(sloth.mkdir (sloth.concat' sloth.homeDir "/vibe"))
44+
sloth.homeDir
45+
]
46+
];
47+
tmpfs = [
48+
"/tmp"
49+
];
50+
env.NIX_CONFIG = ''
51+
experimental-features = nix-command flakes
52+
'';
53+
};
54+
};
55+
};
56+
in
57+
sandbox.config.env

0 commit comments

Comments
 (0)