{ config, sysLib, system, pkgs, grades, yambar_cpu, yambar_memory, ... }: let makeScript = { file, dependencies, ... }: sysLib.makeShellScriptWithLibrary { name = "${builtins.baseNameOf file}"; script = file; dependencies = dependencies ++ (builtins.attrValues {inherit (pkgs) dash;}); } + "/bin/${builtins.baseNameOf file}"; in { xdg.configFile."yambar/config.yml".source = pkgs.substituteAll { src = ./config/config.yml; volume_script = makeScript { dependencies = builtins.attrValues {inherit (pkgs) pulseaudio gawk;}; file = ./scripts/sound-volume.sh; }; grade_average_script = makeScript { dependencies = [ grades.outputs.packages.${system}.default ]; file = ./scripts/grades-average.sh; }; cpu_script = yambar_cpu; memory_script = yambar_memory; disk_script = makeScript { dependencies = builtins.attrValues {inherit (pkgs) gawk btrfs-progs coreutils;}; file = ./scripts/disk.sh; }; }; } # vim: ts=2