custom weather notifier
This commit is contained in:
@@ -3,7 +3,10 @@
|
|||||||
description = "Autumn's multi-system configs";
|
description = "Autumn's multi-system configs";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
|
#dev stuff
|
||||||
pydev.url ="./system/extras/pydev/";
|
pydev.url ="./system/extras/pydev/";
|
||||||
|
currents.url = "./system/extras/currents/";
|
||||||
|
#regular flakes
|
||||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||||
lix.url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz";
|
lix.url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz";
|
||||||
lix.flake = false;
|
lix.flake = false;
|
||||||
@@ -24,6 +27,7 @@
|
|||||||
lix,
|
lix,
|
||||||
home-manager,
|
home-manager,
|
||||||
pydev,
|
pydev,
|
||||||
|
currents,
|
||||||
nixos-wsl,
|
nixos-wsl,
|
||||||
...
|
...
|
||||||
}@inputs:
|
}@inputs:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
home = {
|
home = {
|
||||||
@@ -52,5 +52,10 @@
|
|||||||
../packages/zsh/zsh.nix
|
../packages/zsh/zsh.nix
|
||||||
# package bundles
|
# package bundles
|
||||||
./bundles/langs.nix
|
./bundles/langs.nix
|
||||||
];
|
|
||||||
|
## Development
|
||||||
|
inputs.currents.homeManagerModules.currents
|
||||||
|
];
|
||||||
|
|
||||||
|
services.currents.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.mako = {
|
services.mako = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = ''
|
settings = {
|
||||||
{
|
anchor = "top-center";
|
||||||
anchor = "top-center"
|
};
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
"river/tags"
|
"river/tags"
|
||||||
];
|
];
|
||||||
modules-center = [
|
modules-center = [
|
||||||
|
"custom/currents"
|
||||||
"river/window"
|
"river/window"
|
||||||
];
|
];
|
||||||
modules-right = [
|
modules-right = [
|
||||||
@@ -153,6 +154,13 @@
|
|||||||
on-click = "pavucontrol";
|
on-click = "pavucontrol";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"custom/currents"= {
|
||||||
|
interval= 30;
|
||||||
|
exec= "currents --waybar";
|
||||||
|
return-type= "json";
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
61
system/extras/currents/flake.nix
Normal file
61
system/extras/currents/flake.nix
Normal 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" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user