use restic from nixos-unstable
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Jeffrey C. Ollie 2024-09-05 15:19:28 -05:00
parent b0cb6a860e
commit 764e63292d
Signed by: jeff
GPG key ID: 6F86035A6D97044E
2 changed files with 38 additions and 14 deletions

View file

@ -18,13 +18,13 @@
"type": "github"
}
},
"nixpkgs": {
"nixpkgs-stable": {
"locked": {
"lastModified": 1719838683,
"narHash": "sha256-Zw9rQjHz1ilNIimEXFeVa1ERNRBF8DoXDhLAZq5B4pE=",
"lastModified": 1725407940,
"narHash": "sha256-tiN5Rlg/jiY0tyky+soJZoRzLKbPyIdlQ77xVgREDNM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d032c1a6dfad4eedec7e35e91986becc699d7d69",
"rev": "6f6c45b5134a8ee2e465164811e451dcb5ad86e3",
"type": "github"
},
"original": {
@ -33,10 +33,26 @@
"type": "indirect"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1725432240,
"narHash": "sha256-+yj+xgsfZaErbfYM3T+QvEE2hU7UuE+Jf0fJCJ8uPS0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ad416d066ca1222956472ab7d0555a6946746a80",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
"nixpkgs-stable": "nixpkgs-stable",
"nixpkgs-unstable": "nixpkgs-unstable"
}
},
"systems": {

View file

@ -2,32 +2,39 @@
description = "Restic";
inputs = {
nixpkgs = {
nixpkgs-stable = {
url = "nixpkgs/nixos-24.05";
};
nixpkgs-unstable = {
url = "nixpkgs/nixos-unstable";
};
flake-utils = {
url = "github:numtide/flake-utils";
};
};
outputs = {
self,
nixpkgs,
nixpkgs-stable,
nixpkgs-unstable,
flake-utils,
...
} @ inputs:
}:
flake-utils.lib.eachDefaultSystem
(
system: let
pkgs = import nixpkgs {
pkgs = import nixpkgs-stable {
inherit system;
};
pkgs-unstable = import nixpkgs-unstable {
inherit system;
};
in {
packages = {
restic = let
pname = "restic";
version = "0.16.5";
hash = "sha256-WwySXQU8eoyQRcI+zF+pIIKLEFheTnqkPTw0IZeUrhA=";
vendorHash = "sha256-VZTX0LPZkqN4+OaaIkwepbGwPtud8Cu7Uq7t1bAUC8M=";
version = "0.17.1";
hash = "sha256-/kgZgHmIxZkkmLyR246CcU+8wAekuK8SruY5GBLxJXI=";
vendorHash = "sha256-tU2msDHktlU0SvvxLQCU64p8DpL8B0QiliVCuHlLTHQ=";
in
pkgs.buildGoModule {
inherit pname version vendorHash;
@ -106,7 +113,7 @@
"--rclone"
"${pkgs.rclone}/bin/rclone"
"--restic"
"${self.packages.${system}.restic}/bin/restic"
"${pkgs-unstable.restic}/bin/restic"
"--cache-dir"
"/cache"
];
@ -129,10 +136,11 @@
config,
lib,
pkgs,
pkgs-unstable,
...
}: let
cfg = config.restic;
package = self.packages.${pkgs.system}.restic;
package = pkgs-unstable.restic;
in {
options = {
restic = lib.options.mkOption {