xin/system/update.nix

35 lines
781 B
Nix
Raw Normal View History

2022-08-25 12:21:35 -06:00
{ config, lib, ... }:
with lib; {
options = {
autoUpdate = {
enable = mkOption {
description = "Enable Auto Update";
default = true;
example = true;
type = lib.types.bool;
};
};
};
2022-08-25 21:23:58 -06:00
config = mkMerge [
(mkIf config.autoUpdate.enable {
system.autoUpgrade = {
enable = true;
allowReboot = mkDefault false;
2022-08-25 21:23:58 -06:00
flake = "github:qbit/xin";
2022-08-26 20:25:46 -06:00
dates = "*-*-* *:05:00";
2022-08-25 21:23:58 -06:00
};
})
{
# Always add our host alias or we run into a bootstrap issue
programs.ssh.extraConfig = ''
Host xin-secrets-ro
IdentityFile ${config.sops.secrets.xin_secrets_deploy_key.path}
User gitea
Port 2222
Hostname git.tapenet.org
'';
}
];
2022-08-25 12:21:35 -06:00
}