add borrow again

main
Ingolf Wagner 2024-02-16 08:31:48 +01:00
parent 85ad24e01d
commit 4d79e88566
Signed by: palo
GPG Key ID: 76BF5F1928B9618B
1 changed files with 21 additions and 0 deletions

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";
};
}