Skip to content

Commit 1b7f825

Browse files
committed
offline vi firejail
1 parent f895e86 commit 1b7f825

File tree

3 files changed

+34
-6
lines changed

3 files changed

+34
-6
lines changed

nix/configuration.nix

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -798,15 +798,45 @@ in {
798798
${import ./tabby.nix}/bin/tabby \
799799
download --model Qwen2.5-Coder-0.5B
800800
'';
801-
};
801+
}
802+
// fj.mkFirejailCustom {
803+
pkg = "vi";
804+
exe = "${vi}/bin/vi";
805+
profile = pkgs.writeText "fjvi.local" ''
806+
no3d
807+
nosound
808+
apparmor
809+
caps.drop all
810+
machine-id
811+
net none
812+
netfilter
813+
nodvd
814+
nogroups
815+
noinput
816+
nonewprivs
817+
noprinters
818+
noroot
819+
notv
820+
nou2f
821+
novideo
822+
shell none
823+
824+
disable-mnt
825+
seccomp
826+
x11 none
802827
828+
dbus-system none
829+
dbus-user none
830+
831+
restrict-namespaces
832+
'';
833+
};
803834
#
804835
# Home
805836
#
806837
home-manager.users.${config.services.functora.userName} = {
807838
home.stateVersion = "22.11";
808839
home.packages = with pkgs; [
809-
vi
810840
tree
811841
s-tui
812842
qutebrowser

nix/firejail.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ in rec {
1414
net ? false,
1515
grp ? null,
1616
cfg ? "",
17+
profile ? mkFirejailProfile {inherit pkg dir net grp cfg;},
1718
exe,
1819
}: {
1920
"${pkg}" = {
2021
executable = exe;
21-
profile = mkFirejailProfile {inherit pkg dir net grp cfg;};
22+
inherit profile;
2223
};
2324
};
2425
mkFirejailProfile = {

pub/functora/functora.cabal

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,6 @@ library bolt11
437437

438438
library round
439439
import: pkg-round
440-
build-depends: functora
441440
exposed: True
442441
visibility: public
443442
exposed-modules: Functora.Round
@@ -471,12 +470,10 @@ test-suite functora-test
471470
, qrcode-core
472471
, QuickCheck
473472
, quickcheck-instances
474-
, smallcheck
475473
, string-qq
476474
, tasty
477475
, tasty-hunit
478476
, tasty-quickcheck
479-
, tasty-smallcheck
480477
, text
481478
, universum
482479

0 commit comments

Comments
 (0)