mirror of
https://git.adityakumar.xyz/nix-conf.git
synced 2024-11-09 15:39:44 +00:00
add timer
This commit is contained in:
parent
b528ac04a3
commit
cb2394cd14
4 changed files with 95 additions and 2 deletions
59
flake.lock
59
flake.lock
|
@ -94,6 +94,24 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_3": {
|
||||
"inputs": {
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"git-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": [
|
||||
|
@ -209,9 +227,30 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"neve": {
|
||||
"monitor": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726021638,
|
||||
"narHash": "sha256-nnkyh02DAjbcg4w4sT+hKW77hW/tT8pQHK997wYjtUo=",
|
||||
"owner": "akr2002",
|
||||
"repo": "monitor",
|
||||
"rev": "311fd173ec9fa1a71317f5d36d00de47cba2aec8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "akr2002",
|
||||
"repo": "monitor",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"neve": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixvim": "nixvim"
|
||||
},
|
||||
|
@ -323,7 +362,7 @@
|
|||
},
|
||||
"nuschtosSearch": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"flake-utils": "flake-utils_3",
|
||||
"nixpkgs": [
|
||||
"neve",
|
||||
"nixvim",
|
||||
|
@ -368,6 +407,7 @@
|
|||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"master": "master",
|
||||
"monitor": "monitor",
|
||||
"neve": "neve",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nyaa": "nyaa"
|
||||
|
@ -403,6 +443,21 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_3": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
|
|
@ -6,6 +6,10 @@
|
|||
url = "github:nix-community/home-manager/master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
monitor = {
|
||||
url = "github:akr2002/monitor";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
#nv = {
|
||||
# url = "github:akr2002/nv";
|
||||
# inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
./kde-utils
|
||||
./kitty
|
||||
./media
|
||||
./monitor
|
||||
./neovim
|
||||
./office
|
||||
./session-vars
|
||||
|
@ -29,6 +30,7 @@
|
|||
gnome-utils.enable = lib.mkDefault false;
|
||||
kde-utils.enable = lib.mkDefault true;
|
||||
kitty.enable = lib.mkDefault true;
|
||||
monitor.enable = lib.mkDefault true;
|
||||
neovim.enable = lib.mkDefault false;
|
||||
tmux.enable = lib.mkDefault true;
|
||||
vscode.enable = lib.mkDefault true;
|
||||
|
|
32
modules/home-manager/monitor/default.nix
Normal file
32
modules/home-manager/monitor/default.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
monitor.enable = lib.mkEnableOption "enable monitor";
|
||||
};
|
||||
config = lib.mkIf config.monitor.enable {
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue