custom weather notifier

This commit is contained in:
2025-09-30 09:50:05 -06:00
parent 3ed4ccca9e
commit 725c13a6b6
5 changed files with 84 additions and 8 deletions

View File

@@ -3,7 +3,10 @@
description = "Autumn's multi-system configs";
inputs = {
#dev stuff
pydev.url ="./system/extras/pydev/";
currents.url = "./system/extras/currents/";
#regular flakes
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
lix.url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz";
lix.flake = false;
@@ -24,6 +27,7 @@
lix,
home-manager,
pydev,
currents,
nixos-wsl,
...
}@inputs:

View File

@@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ config, pkgs, inputs, ... }:
{
home = {
@@ -52,5 +52,10 @@
../packages/zsh/zsh.nix
# package bundles
./bundles/langs.nix
];
## Development
inputs.currents.homeManagerModules.currents
];
services.currents.enable = true;
}

View File

@@ -1,13 +1,11 @@
{ config, pkgs, ... }:
{
programs.mako = {
services.mako = {
enable = true;
settings = ''
{
anchor = "top-center"
}
'';
settings = {
anchor = "top-center";
};
};
}

View File

@@ -17,6 +17,7 @@
"river/tags"
];
modules-center = [
"custom/currents"
"river/window"
];
modules-right = [
@@ -153,6 +154,13 @@
on-click = "pavucontrol";
};
};
"custom/currents"= {
interval= 30;
exec= "currents --waybar";
return-type= "json";
};
};
};

View File

@@ -0,0 +1,61 @@
{
description = "Currents, a weather alert daemon";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
};
outputs = { self, nixpkgs, home-manager }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in
{
packages.${system}.default = pkgs.rustPlatform.buildRustPackage {
pname = "currents";
version = "0.1.0";
src = ./.;
cargoLock.lockFile = ./Cargo.lock;
};
# NixOS module (existing)
nixosModules.currents = { config, lib, pkgs, ... }:
with lib;
let cfg = config.services.currents;
in {
options.services.currents = {
enable = mkEnableOption "Currents, a weather alert daemon";
};
config = mkIf cfg.enable {
systemd.services."currents@" = {
# ... existing service config
};
};
};
# Home Manager module (new)
homeManagerModules.currents = { config, lib, pkgs, ... }:
with lib;
let cfg = config.services.currents;
in {
options.services.currents = {
enable = mkEnableOption "Currents, a weather alert daemon";
};
config = mkIf cfg.enable {
home.packages = [ self.packages.${system}.default ];
systemd.user.services.currents = {
Unit.Description = "Currents, a weather alert daemon";
Service = {
Type = "simple";
ExecStart = "${self.packages.${system}.default}/bin/currents";
Restart = "always";
RestartSec = 10;
Environment = "RUST_LOG=info";
};
Install.WantedBy = [ "default.target" ];
};
};
};
};
}