add borrow again

This commit is contained in:
Ingolf Wagner 2024-02-16 08:31:48 +01:00
parent 85ad24e01d
commit 4d79e88566
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B

View file

@ -1,5 +1,6 @@
{ config, lib, pkgs, ... }:
with pkgs;
with lib;
let
nextcloudSync = folder:
let
@ -12,6 +13,20 @@ let
~/Nextcloud/${folder} \
"https://${user}:${password}@nextcloud.ingolf-wagner.de"
'';
borrow = pkgs.writers.writeDashBin "borrow"
''
${getExe hledger-ui} \
--all \
--theme=terminal \
--file ~/Nextcloud/Unterlagen/.hledger-borrow "$@"
${getExe gum} confirm \
--affirmative="update" \
--negative="skip" \
--default=false \
"Syncronize with Nextcloud?" && ${getExe(nextcloudSync "Unterlagen")}
'';
in
{
home.packages = [
@ -25,6 +40,8 @@ in
(nextcloudSync "Kunstbuch")
(nextcloudSync "AWS-SolutionArchitect-Professional")
borrow
(pkgs.writeShellScriptBin "nixFlakes" ''
exec ${pkgs.nixUnstable}/bin/nix --experimental-features "nix-command flakes" "$@"
'')
@ -33,4 +50,8 @@ in
];
home.shellAliases = {
schulden = "borrow";
};
}