2024-03-21 15:05:23 +00:00
|
|
|
{ pkgs, ... }:
|
2023-09-05 08:31:50 +00:00
|
|
|
{
|
|
|
|
sane.programs.conky = {
|
2024-01-23 00:58:56 +00:00
|
|
|
# TODO: non-sandboxed `conky` still ships via `sxmo-utils`, but unused
|
2024-01-23 12:11:22 +00:00
|
|
|
sandbox.method = "bwrap";
|
2024-02-08 21:51:32 +00:00
|
|
|
sandbox.net = "clearnet"; #< for the scripts it calls (weather)
|
2024-01-23 14:34:23 +00:00
|
|
|
sandbox.extraPaths = [
|
|
|
|
"/sys/class/power_supply"
|
|
|
|
"/sys/devices" # needed by battery_estimate
|
|
|
|
# "/sys/devices/cpu"
|
|
|
|
# "/sys/devices/system"
|
|
|
|
];
|
2024-02-14 01:49:49 +00:00
|
|
|
sandbox.whitelistWayland = true;
|
|
|
|
|
2023-09-05 08:31:50 +00:00
|
|
|
fs.".config/conky/conky.conf".symlink.target =
|
|
|
|
let
|
2024-03-21 15:05:23 +00:00
|
|
|
# TODO: make this just another `suggestedPrograms`!
|
2023-09-05 08:31:50 +00:00
|
|
|
battery_estimate = pkgs.static-nix-shell.mkBash {
|
|
|
|
pname = "battery_estimate";
|
2024-02-25 17:37:38 +00:00
|
|
|
srcRoot = ./.;
|
2023-09-05 08:31:50 +00:00
|
|
|
};
|
|
|
|
in pkgs.substituteAll {
|
|
|
|
src = ./conky.conf;
|
|
|
|
bat = "${battery_estimate}/bin/battery_estimate";
|
|
|
|
weather = "timeout 20 ${pkgs.sane-weather}/bin/sane-weather";
|
|
|
|
};
|
|
|
|
|
2023-09-12 04:44:38 +00:00
|
|
|
services.conky = {
|
|
|
|
description = "conky dynamic desktop background";
|
2024-03-21 16:02:06 +00:00
|
|
|
partOf = [ "graphical-session" ];
|
2024-03-21 15:05:23 +00:00
|
|
|
command = "conky";
|
2023-09-12 04:44:38 +00:00
|
|
|
};
|
2023-09-05 08:31:50 +00:00
|
|
|
};
|
|
|
|
}
|