modules/comin: init

This commit is contained in:
xinyangli 2024-12-21 20:51:56 +08:00
parent 872849c875
commit ade0694d14
Signed by: xin
SSH key fingerprint: SHA256:UU5pRTl7NiLFJbWJZa+snLylZSXIz5rgHmwjzv8v4oE
2 changed files with 33 additions and 1 deletions

View file

@ -0,0 +1,32 @@
{
config,
lib,
...
}:
let
inherit (lib)
mkEnableOption
mkIf
;
cfg = config.commonSettings.comin;
in
{
options.commonSettings.comin = {
enable = mkEnableOption "auto updater with comin";
};
config = {
services.comin = mkIf cfg.enable {
enable = true;
remotes = [
{
name = "origin";
url = "https://github.com/xinyangli/nixos-config.git";
branches.main.name = "deploy-comin-eval";
}
];
hostname = config.networking.hostName;
};
};
}