From bc293726eef06b42c9efda0fd2330f836bbf3c65 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 4 Jun 2025 18:57:47 +0000 Subject: [PATCH] mercurial: enable MQ extension --- hosts/common/programs/assorted.nix | 3 --- hosts/common/programs/default.nix | 1 + hosts/common/programs/mercurial.nix | 19 +++++++++++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 hosts/common/programs/mercurial.nix diff --git a/hosts/common/programs/assorted.nix b/hosts/common/programs/assorted.nix index 913973a92..4979ccd26 100644 --- a/hosts/common/programs/assorted.nix +++ b/hosts/common/programs/assorted.nix @@ -849,9 +849,6 @@ in marksman.sandbox.whitelistPwd = true; - mercurial.sandbox.net = "clearnet"; - mercurial.sandbox.whitelistPwd = true; - mesa-demos.sandbox.whitelistDri = true; mesa-demos.sandbox.whitelistWayland = true; mesa-demos.sandbox.whitelistX = true; diff --git a/hosts/common/programs/default.nix b/hosts/common/programs/default.nix index e19af3ed1..4954bbbf5 100644 --- a/hosts/common/programs/default.nix +++ b/hosts/common/programs/default.nix @@ -123,6 +123,7 @@ ./megapixels.nix ./megapixels-next.nix ./mepo.nix + ./mercurial.nix ./mimeo ./mimetype.nix ./mmcli.nix diff --git a/hosts/common/programs/mercurial.nix b/hosts/common/programs/mercurial.nix new file mode 100644 index 000000000..3d14e83da --- /dev/null +++ b/hosts/common/programs/mercurial.nix @@ -0,0 +1,19 @@ +{ ... }: +{ + sane.programs.mercurial = { + sandbox.net = "clearnet"; + sandbox.whitelistPwd = true; + sandbox.extraHomePaths = [ + # even with `whitelistPwd`, hg has to crawl *up* the path -- which isn't necessarily in the sandbox -- to locate the repo root. + "dev" + "ref" + ]; + fs.".config/hg/hgrc".symlink.text = '' + [extensions] + # Mercurial Queues (MQ) extension adds patch-stack support to mercurial. + # MQ is shipped in mercurial, but not enabled by default. + # it's a port of some git extension, idk which. + mq = + ''; + }; +}