No description
Find a file
2024-09-11 10:27:14 +05:30
.envrc initial commit 2024-09-10 19:44:33 +05:30
.gitignore send desktop notification 2024-09-11 07:53:02 +05:30
flake.lock initial commit 2024-09-10 19:44:33 +05:30
flake.nix send desktop notification 2024-09-11 07:53:02 +05:30
monitor.py add service name to notification 2024-09-11 07:57:18 +05:30
README.md add README 2024-09-11 10:27:14 +05:30

Monitor

Report website's status

Usage

Oneshot

nix run github:akr2002/monitor

Persistent

Add the following to your home.nix

systemd.user.timers.monitor = {
    Install.WantedBy = [ "timers.target" ];
    Timer = {
        OnBootSec = "1m";
        OnUnitActiveSec = "1m";
        Unit = "monitor.service";
    };
};
systemd.user.services.monitor = {
    Unit = {
        Description = "A script to monitor websites.";
    };
    Install = {
        WantedBy = [ "default.target" ];
    };
    Service = {
        ExecStart = "${inputs.monitor.packages.${pkgs.system}.default}/bin/monitor";
    };
};

Start:

systemctl --user start mointor.timer