Migrate auto-upgrade from clanModule to clanService
This commit is contained in:
33
clanServices/auto-upgrade/default.nix
Normal file
33
clanServices/auto-upgrade/default.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{ ... }:
|
||||
{
|
||||
_class = "clan.service";
|
||||
manifest.name = "clan-core/auto-upgrade";
|
||||
manifest.description = "Automatic system upgrade for the Clan App";
|
||||
manifest.categories = [ "System" ];
|
||||
|
||||
roles.default = {
|
||||
interface =
|
||||
{ lib, ... }:
|
||||
{
|
||||
options.flake = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Flake reference";
|
||||
};
|
||||
};
|
||||
|
||||
perInstance =
|
||||
{ settings, ... }:
|
||||
{
|
||||
nixosModule =
|
||||
{ ... }:
|
||||
{
|
||||
system.autoUpgrade = {
|
||||
inherit (settings) flake;
|
||||
enable = true;
|
||||
dates = "02:00";
|
||||
randomizedDelaySec = "45min";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
6
clanServices/auto-upgrade/flake-module.nix
Normal file
6
clanServices/auto-upgrade/flake-module.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
clan.modules = {
|
||||
auto-upgrade = lib.modules.importApply ./default.nix { };
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user