mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2026-03-19 15:50:30 +01:00
Compare commits
5 commits
8d600a0bae
...
f3573f3324
| Author | SHA1 | Date | |
|---|---|---|---|
| f3573f3324 | |||
| 93bf4a21a4 | |||
| 319e9336db | |||
| dd39fb6fac | |||
| e20f6fdff2 |
6 changed files with 48 additions and 9 deletions
2
flake.lock
generated
2
flake.lock
generated
|
|
@ -913,7 +913,7 @@
|
||||||
"oisd": {
|
"oisd": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"narHash": "sha256-Yro3cUgQ8VxmcsQwbvdYdGAxsfZDGEl3tyr7ILhzK7s=",
|
"narHash": "sha256-BEGZgyaI3g9WwpnTyW2cYT0rh3248eL0sC0z76filNM=",
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"url": "https://big.oisd.nl/domainswild"
|
"url": "https://big.oisd.nl/domainswild"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ in
|
||||||
|
|
||||||
hardware.framework = {
|
hardware.framework = {
|
||||||
amd-7040.preventWakeOnAC = true;
|
amd-7040.preventWakeOnAC = true;
|
||||||
laptop13.audioEnhancement.enable = true;
|
# laptop13.audioEnhancement.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Disable light sensors and accelerometers as they are not used and consume extra battery
|
# Disable light sensors and accelerometers as they are not used and consume extra battery
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
username,
|
username,
|
||||||
...
|
...
|
||||||
|
|
@ -50,6 +48,7 @@
|
||||||
// "wireplumber",
|
// "wireplumber",
|
||||||
"group/audio",
|
"group/audio",
|
||||||
"group/battery",
|
"group/battery",
|
||||||
|
"custom/pomodoro",
|
||||||
"group/clock"
|
"group/clock"
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
@ -367,6 +366,15 @@
|
||||||
"interval": 60,
|
"interval": 60,
|
||||||
"format": "CEST: <span color='#aaaaaa'>{}</span> ",
|
"format": "CEST: <span color='#aaaaaa'>{}</span> ",
|
||||||
"exec": "~/.local/bin/waybar-minutes"
|
"exec": "~/.local/bin/waybar-minutes"
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/pomodoro": {
|
||||||
|
"interval": 1,
|
||||||
|
"format": "{}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "waybar-module-pomodoro --no-work-icons",
|
||||||
|
"on-click": "waybar-module-pomodoro toggle",
|
||||||
|
"on-click-right": "waybar-module-pomodoro reset"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,11 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
username,
|
username,
|
||||||
config,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
# homeExternalIPv4 = "${pkgs.coreutils}/bin/cat ${config.sops.secrets.homeExternalIPv4.path}";
|
waybar-module-pomodoro = pkgs.callPackage ./waybar-module-pomodoro.nix { };
|
||||||
homeExternalIPv4 = "92.118.0.69";
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home.file = {
|
home.file = {
|
||||||
|
|
@ -242,7 +241,7 @@ in
|
||||||
NODE="$(mullvad status | grep -Ei 'relay' | awk '{print $2}' | tr '[:upper:]' '[:lower:]')"
|
NODE="$(mullvad status | grep -Ei 'relay' | awk '{print $2}' | tr '[:upper:]' '[:lower:]')"
|
||||||
LOCATION="$(mullvad status | grep -Ei 'location' | cut -d':' -f2 | cut -d'.' -f1 | sed 's/ //g')"
|
LOCATION="$(mullvad status | grep -Ei 'location' | cut -d':' -f2 | cut -d'.' -f1 | sed 's/ //g')"
|
||||||
IPV4="$(mullvad status | grep 'IPv4' | cut -d':' -f3 | sed 's/ //g')"
|
IPV4="$(mullvad status | grep 'IPv4' | cut -d':' -f3 | sed 's/ //g')"
|
||||||
echo "$IPV4" | grep -q "${homeExternalIPv4}" && LOCATION="home"
|
echo "$IPV4" | grep -q "92.118.0.69" && LOCATION="home"
|
||||||
|
|
||||||
echo "$STATUS" | grep -Eioq 'connected|connecting' && TEXT="{\"text\":\"$STATUS ($LOCATION)\",\"location\":\"$LOCATION\",\"node\":\"$NODE\"}" # || ip address show tailscale0 | grep "global tailscale0" && TEXT="{\"text\":\"tailscale ($LOCATION)\",\"location\":\"$LOCATION\",\"node\":\"$NODE\"}"
|
echo "$STATUS" | grep -Eioq 'connected|connecting' && TEXT="{\"text\":\"$STATUS ($LOCATION)\",\"location\":\"$LOCATION\",\"node\":\"$NODE\"}" # || ip address show tailscale0 | grep "global tailscale0" && TEXT="{\"text\":\"tailscale ($LOCATION)\",\"location\":\"$LOCATION\",\"node\":\"$NODE\"}"
|
||||||
echo "$STATUS" | grep -Eioq 'disconnected' && TEXT="{\"text\":\"$STATUS\",\"location\":\"$LOCATION\",\"node\":\"$NODE\"}"
|
echo "$STATUS" | grep -Eioq 'disconnected' && TEXT="{\"text\":\"$STATUS\",\"location\":\"$LOCATION\",\"node\":\"$NODE\"}"
|
||||||
|
|
@ -255,5 +254,6 @@ in
|
||||||
wf-recorder
|
wf-recorder
|
||||||
bemenu
|
bemenu
|
||||||
ncspot
|
ncspot
|
||||||
|
waybar-module-pomodoro
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
31
modules/home/waybar/waybar-module-pomodoro.nix
Normal file
31
modules/home/waybar/waybar-module-pomodoro.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
rustPlatform,
|
||||||
|
fetchFromGitHub,
|
||||||
|
writableTmpDirAsHomeHook,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
rustPlatform.buildRustPackage {
|
||||||
|
pname = "waybar-module-pomodoro";
|
||||||
|
version = "0.0.1";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "Andeskjerf";
|
||||||
|
repo = "waybar-module-pomodoro";
|
||||||
|
hash = "sha256-vB5WROn/GmaJyLNHnyfhTZItjQlJ+LMXMw8gOT1GM0s=";
|
||||||
|
rev = "3867b25ab691c4a697ee2ffca76d7cc9408675cc";
|
||||||
|
};
|
||||||
|
|
||||||
|
cargoHash = "sha256-FTzqNkGn1dk+pdee8U07NI/uqUR6/gs51ZWOpYro3j8=";
|
||||||
|
|
||||||
|
nativeCheckInputs = [
|
||||||
|
writableTmpDirAsHomeHook
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "waybar module that provides a pomodoro timer";
|
||||||
|
homepage = "https://github.com/Andeskjerf/waybar-module-pomodoro";
|
||||||
|
maintainers = [ ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -25,7 +25,7 @@ in
|
||||||
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md"
|
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md"
|
||||||
"https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md"
|
"https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md"
|
||||||
];
|
];
|
||||||
minisign_key = "sha256-Yro3cUgQ8VxmcsQwbvdYdGAxsfZDGEl3tyr7ILhzK7s="; # See https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v3/public-resolvers.md
|
minisign_key = "sha256-BEGZgyaI3g9WwpnTyW2cYT0rh3248eL0sC0z76filNM="; # See https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v3/public-resolvers.md
|
||||||
cache_file = "/var/lib/dnscrypt/public-resolvers.md";
|
cache_file = "/var/lib/dnscrypt/public-resolvers.md";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue