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" "type": "github"
} }
}, },
"nixpkgs": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1719838683, "lastModified": 1725407940,
"narHash": "sha256-Zw9rQjHz1ilNIimEXFeVa1ERNRBF8DoXDhLAZq5B4pE=", "narHash": "sha256-tiN5Rlg/jiY0tyky+soJZoRzLKbPyIdlQ77xVgREDNM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d032c1a6dfad4eedec7e35e91986becc699d7d69", "rev": "6f6c45b5134a8ee2e465164811e451dcb5ad86e3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -33,10 +33,26 @@
"type": "indirect" "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": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs" "nixpkgs-stable": "nixpkgs-stable",
"nixpkgs-unstable": "nixpkgs-unstable"
} }
}, },
"systems": { "systems": {

View file

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