mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 12:19:07 +00:00
tasks/backup-archive: migrate as ni's host-specific module
In practice, this is only used by it.
This commit is contained in:
parent
2f0d63ca95
commit
34047a49b4
@ -32,6 +32,7 @@
|
|||||||
setup = "networkmanager";
|
setup = "networkmanager";
|
||||||
wireguard.enable = true;
|
wireguard.enable = true;
|
||||||
};
|
};
|
||||||
|
services.backup.enable = true;
|
||||||
setups = {
|
setups = {
|
||||||
desktop.enable = true;
|
desktop.enable = true;
|
||||||
development.enable = true;
|
development.enable = true;
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
./hardware/qol.nix
|
./hardware/qol.nix
|
||||||
./networking/setup.nix
|
./networking/setup.nix
|
||||||
./networking/wireguard.nix
|
./networking/wireguard.nix
|
||||||
|
./services/backup
|
||||||
./setups/desktop.nix
|
./setups/desktop.nix
|
||||||
./setups/development.nix
|
./setups/development.nix
|
||||||
./setups/gaming.nix
|
./setups/gaming.nix
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.tasks.backup-archive;
|
hostCfg = config.hosts.ni;
|
||||||
|
cfg = hostCfg.services.backup;
|
||||||
|
|
||||||
borgJobCommonSetting = { patterns ? [ ], passCommand }: {
|
borgJobCommonSetting = { patterns ? [ ], passCommand }: {
|
||||||
compression = "zstd,12";
|
compression = "zstd,12";
|
||||||
@ -42,12 +43,12 @@ let
|
|||||||
pathPrefix = "borg-backup";
|
pathPrefix = "borg-backup";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.tasks.backup-archive.enable =
|
options.hosts.ni.services.backup.enable =
|
||||||
lib.mkEnableOption "backup setup with BorgBackup";
|
lib.mkEnableOption "backup setup with BorgBackup";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
sops.secrets = lib.getSecrets
|
sops.secrets = lib.getSecrets
|
||||||
(lib.getSecret "backup-archive.yaml")
|
./secrets.yaml
|
||||||
(lib.attachSopsPathPrefix pathPrefix {
|
(lib.attachSopsPathPrefix pathPrefix {
|
||||||
"patterns/home" = { };
|
"patterns/home" = { };
|
||||||
"patterns/etc" = { };
|
"patterns/etc" = { };
|
@ -29,7 +29,6 @@ let
|
|||||||
./profiles/i18n.nix
|
./profiles/i18n.nix
|
||||||
./profiles/server.nix
|
./profiles/server.nix
|
||||||
./profiles/vpn.nix
|
./profiles/vpn.nix
|
||||||
./tasks/backup-archive
|
|
||||||
./tasks/multimedia-archive
|
./tasks/multimedia-archive
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
= BorgBackup setup for the archive
|
|
||||||
|
|
||||||
It's a NixOS configuration that configures my basic BorgBackup backup battlestation for my local archive.
|
|
||||||
Not all of the required files are here (i.e., the SSH key used for Borg).
|
|
||||||
In other words, if it's not yours, don't attempt to activate this setup.
|
|
Loading…
Reference in New Issue
Block a user