about summary refs log tree commit diff stats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xbuild.sh2
-rw-r--r--modules/by-name/hl/lhedger/module.nix10
2 files changed, 11 insertions, 1 deletions
diff --git a/build.sh b/build.sh
index de4d536c..69798ce8 100755
--- a/build.sh
+++ b/build.sh
@@ -10,7 +10,7 @@
 # You should have received a copy of the License along with this program.
 # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
 
-host="${1-tiamat}"
+host="${1-$(hostname)}"
 [ "$#" -gt 0 ] && shift 1
 
 root="$(git rev-parse --show-toplevel)"
diff --git a/modules/by-name/hl/lhedger/module.nix b/modules/by-name/hl/lhedger/module.nix
index 16592f2b..68de85d0 100644
--- a/modules/by-name/hl/lhedger/module.nix
+++ b/modules/by-name/hl/lhedger/module.nix
@@ -29,6 +29,16 @@ in {
     home-manager.users.soispha = {
       home.packages = [
         pkgs.hledger
+
+        (pkgs.writeShellApplication {
+          name = "hledger-edit";
+
+          text = ''
+            "$EDITOR" ${lib.strings.escapeShellArg ledgerFile}
+          '';
+
+          inheritPath = true; # needs access to nvim
+        })
       ];
 
       xdg.configFile = {