make use of systemPackage

This commit is contained in:
Moritz Böhme 2022-10-06 20:32:21 +02:00
parent aa42f6678e
commit 85de3b3ac6
No known key found for this signature in database
GPG key ID: 970C6E89EB0547A9
8 changed files with 97 additions and 103 deletions

View file

@ -35,26 +35,24 @@ in
reg = "ledger reg -R -V --tail 15";
};
};
environment.systemPackages = with pkgs; let
reg-copy = writeShellApplication {
name = "reg-copy";
runtimeInputs = [ ledger xclip ];
text = ''
table="$(printf '%-10s %-30s %8s %8s\n' Datum Beschreibung Einzeln Gesamt && ledger reg -V --format '%10D %.30P %8t %8T\n' "$@")"
echo "$table"
echo "$table" | xclip -selection clipboard
'';
};
in
[ ledger reg-copy hledger hledger-ui hledger-web ];
home-manager.users.moritz = {
home.packages = with pkgs; let
reg-copy = writeShellApplication {
name = "reg-copy";
runtimeInputs = [ ledger xclip ];
text = ''
table="$(printf '%-10s %-30s %8s %8s\n' Datum Beschreibung Einzeln Gesamt && ledger reg -V --format '%10D %.30P %8t %8T\n' "$@")"
echo "$table"
echo "$table" | xclip -selection clipboard
'';
};
in
[ ledger reg-copy hledger hledger-ui hledger-web ];
home-manager.users.moritz = {
xdg.configFile = {
"fish/completions/ledger.fish" = {
text = builtins.readFile ./ledger.fish;
};
xdg.configFile = {
"fish/completions/ledger.fish" = {
text = builtins.readFile ./ledger.fish;
};
};
};