lift sane-battery-estimate out of conky, rename to sane-sysinfo
This commit is contained in:
@@ -1,36 +1,24 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
sane.programs.sane-battery-estimate = {
|
|
||||||
packageUnwrapped = pkgs.static-nix-shell.mkBash {
|
|
||||||
pname = "sane-battery-estimate";
|
|
||||||
srcRoot = ./.;
|
|
||||||
};
|
|
||||||
sandbox.method = "bwrap";
|
|
||||||
sandbox.extraPaths = [
|
|
||||||
"/sys/class/power_supply"
|
|
||||||
"/sys/devices"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
sane.programs.conky = {
|
sane.programs.conky = {
|
||||||
sandbox.method = "bwrap";
|
sandbox.method = "bwrap";
|
||||||
sandbox.net = "clearnet"; #< for the scripts it calls (weather)
|
sandbox.net = "clearnet"; #< for the scripts it calls (weather)
|
||||||
sandbox.extraPaths = [
|
sandbox.extraPaths = [
|
||||||
"/sys/class/power_supply"
|
"/sys/class/power_supply"
|
||||||
"/sys/devices" # needed by battery_estimate
|
"/sys/devices" # needed by sane-sysinfo
|
||||||
# "/sys/devices/cpu"
|
# "/sys/devices/cpu"
|
||||||
# "/sys/devices/system"
|
# "/sys/devices/system"
|
||||||
];
|
];
|
||||||
sandbox.whitelistWayland = true;
|
sandbox.whitelistWayland = true;
|
||||||
|
|
||||||
suggestedPrograms = [
|
suggestedPrograms = [
|
||||||
"sane-battery-estimate"
|
"sane-sysinfo"
|
||||||
"sane-weather"
|
"sane-weather"
|
||||||
];
|
];
|
||||||
|
|
||||||
fs.".config/conky/conky.conf".symlink.target = pkgs.substituteAll {
|
fs.".config/conky/conky.conf".symlink.target = pkgs.substituteAll {
|
||||||
src = ./conky.conf;
|
src = ./conky.conf;
|
||||||
bat = "sane-battery-estimate";
|
bat = "sane-sysinfo";
|
||||||
weather = "timeout 20 sane-weather";
|
weather = "timeout 20 sane-weather";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -114,6 +114,7 @@
|
|||||||
./sane-open.nix
|
./sane-open.nix
|
||||||
./sane-screenshot.nix
|
./sane-screenshot.nix
|
||||||
./sane-scripts.nix
|
./sane-scripts.nix
|
||||||
|
./sane-sysinfo.nix
|
||||||
./sane-theme.nix
|
./sane-theme.nix
|
||||||
./sanebox.nix
|
./sanebox.nix
|
||||||
./schlock.nix
|
./schlock.nix
|
||||||
|
10
hosts/common/programs/sane-sysinfo.nix
Normal file
10
hosts/common/programs/sane-sysinfo.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
sane.programs.sane-sysinfo = {
|
||||||
|
sandbox.method = "bwrap";
|
||||||
|
sandbox.extraPaths = [
|
||||||
|
"/sys/class/power_supply"
|
||||||
|
"/sys/devices"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
5
pkgs/additional/sane-sysinfo/default.nix
Normal file
5
pkgs/additional/sane-sysinfo/default.nix
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{ static-nix-shell }:
|
||||||
|
static-nix-shell.mkBash {
|
||||||
|
pname = "sane-sysinfo";
|
||||||
|
srcRoot = ./.;
|
||||||
|
}
|
@@ -2,7 +2,7 @@
|
|||||||
#!nix-shell -i bash
|
#!nix-shell -i bash
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "usage: battery_estimate [options...]"
|
echo "usage: sane-sysinfo [options...]"
|
||||||
echo
|
echo
|
||||||
echo "pretty-prints a battery estimate (icon to indicate state, and a duration estimate)"
|
echo "pretty-prints a battery estimate (icon to indicate state, and a duration estimate)"
|
||||||
echo
|
echo
|
@@ -84,6 +84,7 @@ let
|
|||||||
sane-open = callPackage ./additional/sane-open { };
|
sane-open = callPackage ./additional/sane-open { };
|
||||||
sane-screenshot = callPackage ./additional/sane-screenshot { };
|
sane-screenshot = callPackage ./additional/sane-screenshot { };
|
||||||
sane-scripts = lib.recurseIntoAttrs (callPackage ./additional/sane-scripts { });
|
sane-scripts = lib.recurseIntoAttrs (callPackage ./additional/sane-scripts { });
|
||||||
|
sane-sysinfo = callPackage ./additional/sane-sysinfo { };
|
||||||
sane-weather = callPackage ./additional/sane-weather { };
|
sane-weather = callPackage ./additional/sane-weather { };
|
||||||
sanebox = callPackage ./additional/sanebox { };
|
sanebox = callPackage ./additional/sanebox { };
|
||||||
schlock = callPackage ./additional/schlock { };
|
schlock = callPackage ./additional/schlock { };
|
||||||
|
Reference in New Issue
Block a user