nvchecker: add module

(cherry picked from commit 3cb08dd360)
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
Michael Daniels 2025-09-15 18:11:04 -04:00 committed by Austin Horstman
parent f21d916778
commit 6f656618eb
9 changed files with 182 additions and 0 deletions

View file

@ -0,0 +1,27 @@
{ pkgs, ... }:
let
configDir =
if pkgs.stdenv.hostPlatform.isDarwin then
"Library/Application Support/nvchecker"
else
".config/nvchecker";
in
{
programs.nvchecker = {
enable = true;
settings = {
__config__ = {
keyfile = "keyfile.toml";
};
nvchecker = {
source = "github";
github = "lilydjwg/nvchecker";
};
};
};
nmt.script = ''
assertFileExists "home-files/${configDir}/nvchecker.toml"
assertFileContent "home-files/${configDir}/nvchecker.toml" "${./basic-config.toml}"
'';
}

View file

@ -0,0 +1,8 @@
[__config__]
keyfile = "keyfile.toml"
newver = "new_ver.json"
oldver = "old_ver.json"
[nvchecker]
github = "lilydjwg/nvchecker"
source = "github"

View file

@ -0,0 +1,4 @@
{
nvchecker-basic-config = ./basic-config.nix;
nvchecker-empty-config = ./empty-config.nix;
}

View file

@ -0,0 +1,16 @@
{ pkgs, ... }:
let
configDir =
if pkgs.stdenv.hostPlatform.isDarwin then
"Library/Application Support/nvchecker"
else
".config/nvchecker";
in
{
programs.nvchecker.enable = true;
nmt.script = ''
assertFileExists "home-files/${configDir}/nvchecker.toml"
assertFileContent "home-files/${configDir}/nvchecker.toml" "${./empty-config.toml}"
'';
}

View file

@ -0,0 +1,3 @@
[__config__]
newver = "new_ver.json"
oldver = "old_ver.json"