move restic to nixosModules
This commit is contained in:
parent
9bec6270ef
commit
9986100945
4 changed files with 10 additions and 5 deletions
|
@ -46,6 +46,7 @@
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = specialArgs // { inherit inputs system; };
|
specialArgs = specialArgs // { inherit inputs system; };
|
||||||
modules = [
|
modules = [
|
||||||
|
self.nixosModules.default
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
nur.nixosModules.nur
|
nur.nixosModules.nur
|
||||||
] ++ modules;
|
] ++ modules;
|
||||||
|
@ -53,7 +54,7 @@
|
||||||
evalSecrets = import ./eval_secrets.nix;
|
evalSecrets = import ./eval_secrets.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosModules = import ./modules/nixos;
|
nixosModules.default = import ./modules/nixos;
|
||||||
homeManagerModules = import ./modules/home-manager;
|
homeManagerModules = import ./modules/home-manager;
|
||||||
|
|
||||||
colmena = {
|
colmena = {
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./network.nix
|
./network.nix
|
||||||
../sops.nix
|
../sops.nix
|
||||||
../restic.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
|
@ -247,6 +246,7 @@
|
||||||
sopsFile = ./secrets.yaml;
|
sopsFile = ./secrets.yaml;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
custom.restic.enable = true;
|
||||||
custom.restic.repositoryFile = config.sops.secrets.restic_repo_calcite.path;
|
custom.restic.repositoryFile = config.sops.secrets.restic_repo_calcite.path;
|
||||||
custom.restic.passwordFile = config.sops.secrets.restic_repo_calcite_password.path;
|
custom.restic.passwordFile = config.sops.secrets.restic_repo_calcite_password.path;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
./restic.nix
|
||||||
|
];
|
||||||
}
|
}
|
|
@ -5,18 +5,19 @@ in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
custom.restic = {
|
custom.restic = {
|
||||||
|
enable = lib.mkEnableOption "restic";
|
||||||
repositoryFile = lib.mkOption {
|
repositoryFile = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "";
|
default = "";
|
||||||
};
|
};
|
||||||
passwordFile = lib.mkOption {
|
passwordFile = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "";
|
default = "";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = {
|
config = {
|
||||||
services.restic.backups = {
|
services.restic.backups = lib.mkIf cfg.enable {
|
||||||
remotebackup = {
|
remotebackup = {
|
||||||
repositoryFile = cfg.repositoryFile;
|
repositoryFile = cfg.repositoryFile;
|
||||||
passwordFile = cfg.passwordFile;
|
passwordFile = cfg.passwordFile;
|
Loading…
Add table
Reference in a new issue