Skip to content

Instantly share code, notes, and snippets.

@zmej420
zmej420 / chia-plotadder.nix
Created May 25, 2023 16:09
Every hour automatically add all dirs in /mnt to chia farm, and remove dead mounts
# Every hour automatically add all dirs in /mnt to chia farm, and remove dead mounts
{pkgs,...}:
{
systemd = {
services.plotAdder = {
description = "chia plot adder service";
requires = [ "chia.mount" ];
wantedBy = [ "chia.mount" ];
after = [ "chia.mount" ];
serviceConfig = {
{ pkgs, ... }:
let user = 1000; in
{
systemd = {
timers = {
gandi-update-dns = {
description = "Update dns every 15 minutes";
timerConfig = {
Persistent="True";
OnCalendar=["*-*-* *:0/15:00"]; # Every 15 minutes
# Run histdb-sync as zmej420 every hour to share zsh history across my machines
{
systemd = {
user.timers = {
histdb-sync = {
wantedBy = ["default.target"];
unitConfig = {
Description = "sync zsh histdb";
Requires = ["network-online.target"];
};