From 23c7e7727557d893dfe36c26d5999cad6a49e40c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 25 Sep 2023 19:41:28 +0200 Subject: [PATCH] perf: speed up zfs-diff --- hosts/nixos-laptop/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hosts/nixos-laptop/default.nix b/hosts/nixos-laptop/default.nix index 20c12bd..da26953 100644 --- a/hosts/nixos-laptop/default.nix +++ b/hosts/nixos-laptop/default.nix @@ -21,9 +21,20 @@ personal.enable = true; # webis.enable = true; }; - shell.aliases.zfs-diff = "sudo zfs diff zroot/encrypted/root@blank | parallel --pipe cut -f2 | parallel 'test -e /persist/{} || echo {}' | ${lib.getExe pkgs.tree} --fromfile ."; }; + environment.systemPackages = [ + ( + pkgs.writeShellApplication { + name = "zfs-diff"; + runtimeInputs = with pkgs; [ zfs coreutils parallel tree ]; + text = '' + sudo zfs diff zroot/encrypted/root@blank | cut -f2 | parallel 'test -d /persist/{} || echo {}' | tree --fromfile . + ''; + } + ) + ]; + home-manager.users.moritz.home.packages = with pkgs; [ # jetbrains.idea-ultimate ];