mirror of
https://github.com/kmein/niveum
synced 2026-03-20 12:01:06 +01:00
feat: openweathermap tool and i3status block
This commit is contained in:
@@ -229,6 +229,7 @@ in {
|
|||||||
./packages
|
./packages
|
||||||
./power-action.nix
|
./power-action.nix
|
||||||
./printing.nix
|
./printing.nix
|
||||||
|
./openweathermap.nix
|
||||||
./wallpaper.nix
|
./wallpaper.nix
|
||||||
./redshift.nix
|
./redshift.nix
|
||||||
./retiolum.nix
|
./retiolum.nix
|
||||||
|
|||||||
19
configs/openweathermap.nix
Normal file
19
configs/openweathermap.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{ pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
openweathermap-repo = pkgs.fetchFromGitHub {
|
||||||
|
owner = "ip1981";
|
||||||
|
repo = "openweathermap";
|
||||||
|
rev = "9cfef7b14ac5af7109449b54b1cb352b4c76167a";
|
||||||
|
sha256 = "0sm43wicvw2fy7nq65s8vch6jjb5bszqr4ilnhibayamj4jcpw53";
|
||||||
|
};
|
||||||
|
openweathermap = pkgs.haskellPackages.callCabal2nix "openweathermap" openweathermap-repo {};
|
||||||
|
openweathermap-key = lib.strings.fileContents <secrets/openweathermap.key>;
|
||||||
|
in {
|
||||||
|
nixpkgs.config.packageOverrides = pkgs: {
|
||||||
|
weather = pkgs.writers.writeDashBin "weather" ''
|
||||||
|
${openweathermap}/bin/openweathermap --api-key ${openweathermap-key} "$@"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = [ pkgs.weather ];
|
||||||
|
}
|
||||||
@@ -71,9 +71,24 @@ in {
|
|||||||
volume_full = "🔊 ";
|
volume_full = "🔊 ";
|
||||||
volume_half = "🔉 ";
|
volume_half = "🔉 ";
|
||||||
volume_muted = "🔇";
|
volume_muted = "🔇";
|
||||||
|
weather_sun = "🌣";
|
||||||
|
weather_clouds = "🌥";
|
||||||
|
weather_rain = "🌧";
|
||||||
|
weather_snow = "🌨";
|
||||||
|
weather_default = "🌡";
|
||||||
|
weather_thunder = "🌩";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
block = [
|
block = [
|
||||||
|
{
|
||||||
|
block = "weather";
|
||||||
|
service = {
|
||||||
|
name = "openweathermap";
|
||||||
|
api_key = lib.strings.fileContents <secrets/openweathermap.key>;
|
||||||
|
city_id = "2950159";
|
||||||
|
units = "metric";
|
||||||
|
};
|
||||||
|
}
|
||||||
{
|
{
|
||||||
block = "custom";
|
block = "custom";
|
||||||
interval = 20;
|
interval = 20;
|
||||||
|
|||||||
Reference in New Issue
Block a user