diff --git a/flake.lock b/flake.lock index 1b9f2b4..c349f5e 100644 --- a/flake.lock +++ b/flake.lock @@ -22,11 +22,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1735291276, - "narHash": "sha256-NYVcA06+blsLG6wpAbSPTCyLvxD/92Hy4vlY9WxFI1M=", + "lastModified": 1734649271, + "narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "634fd46801442d760e09493a794c4f15db2d0cbb", + "rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507", "type": "github" }, "original": { @@ -36,10 +36,27 @@ "type": "github" } }, + "nixpkgs-borg": { + "locked": { + "lastModified": 1735348460, + "narHash": "sha256-ScKuaBbUXNqS9c6Y+N647BAQx7SvKywpu5MxBV3Y5pk=", + "owner": "cything", + "repo": "nixpkgs", + "rev": "e8391ed9a627dcc13c783d25d72d822c491871b6", + "type": "github" + }, + "original": { + "owner": "cything", + "ref": "borg", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "home-manager": "home-manager", "nixpkgs": "nixpkgs", + "nixpkgs-borg": "nixpkgs-borg", "sops-nix": "sops-nix" } }, diff --git a/flake.nix b/flake.nix index 1669c17..9ea43b6 100644 --- a/flake.nix +++ b/flake.nix @@ -11,6 +11,7 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + nixpkgs-borg.url = "github:cything/nixpkgs/borg"; }; outputs = diff --git a/hosts/chunk/borg.nix b/hosts/chunk/borg.nix index 6b8a5b3..c6d6e5f 100644 --- a/hosts/chunk/borg.nix +++ b/hosts/chunk/borg.nix @@ -43,8 +43,6 @@ ]; # warnings are often not that serious failOnWarnings = false; - # anything other than exit code 1 is considered failure and BORG_EXIT_CODES=modern uses a whole lot more codes for warning - appendFailedSuffix = false; postHook = '' ${pkgs.curl}/bin/curl -u $(cat ${ config.sops.secrets."services/ntfy".path diff --git a/hosts/chunk/default.nix b/hosts/chunk/default.nix index 2bd7475..fe09636 100644 --- a/hosts/chunk/default.nix +++ b/hosts/chunk/default.nix @@ -2,6 +2,7 @@ config, lib, pkgs, + inputs, ... }: { @@ -26,6 +27,10 @@ ./conduit.nix ./immich.nix ./element.nix + { + disabledModules = [ "services/backup/borgbackup.nix"]; + } + (inputs.nixpkgs-borg + "/nixos/modules/services/backup/borgbackup.nix") ]; sops.age.keyFile = "/root/.config/sops/age/keys.txt"; diff --git a/hosts/ytnix/default.nix b/hosts/ytnix/default.nix index 8edd37f..85c2419 100644 --- a/hosts/ytnix/default.nix +++ b/hosts/ytnix/default.nix @@ -2,12 +2,17 @@ config, pkgs, lib, + inputs, ... }: { imports = [ ./hardware-configuration.nix ../common.nix + { + disabledModules = [ "services/backup/borgbackup.nix"]; + } + (inputs.nixpkgs-borg + "/nixos/modules/services/backup/borgbackup.nix") ]; sops.age.keyFile = "/root/.config/sops/age/keys.txt"; @@ -224,8 +229,6 @@ ]; # warnings are often not that serious failOnWarnings = false; - # anything other than exit code 1 is considered failure and BORG_EXIT_CODES=modern uses a whole lot more codes for warning - appendFailedSuffix = false; postHook = '' ${pkgs.curl}/bin/curl -u $(cat ${ config.sops.secrets."services/ntfy".path