From 90fe4a9ad0e4e6e6a8f02e7b08b469523333af0b Mon Sep 17 00:00:00 2001 From: Gabe Venberg Date: Mon, 14 Apr 2025 12:57:56 +0200 Subject: [PATCH] fixed https://github.com/NixOS/nixpkgs/issues/398172 in nixpkgs fork. just waiting for https://github.com/NixOS/nixpkgs/pull/398536 to get reviewed and merged. --- flake.lock | 12 ++++++------ flake.nix | 2 +- hosts/cirrostratus/restic.nix | 2 +- modules/nixos/restic.nix | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index 88696f4..32ef5d9 100644 --- a/flake.lock +++ b/flake.lock @@ -225,16 +225,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1743095683, - "narHash": "sha256-gWd4urRoLRe8GLVC/3rYRae1h+xfQzt09xOfb0PaHSk=", - "owner": "nixos", + "lastModified": 1744623728, + "narHash": "sha256-4yNH4c7zkUi3nuYHsmRRXXAcDLkT/fP5eQPoLhqMWwA=", + "owner": "gabevenberg", "repo": "nixpkgs", - "rev": "5e5402ecbcb27af32284d4a62553c019a3a49ea6", + "rev": "b87080e2ab4478d9fb9b89114a9bea3e62ddd98f", "type": "github" }, "original": { - "owner": "nixos", - "ref": "nixos-unstable", + "owner": "gabevenberg", + "ref": "restic-server-htpasswd-file", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 6208349..886c939 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ inputs = { # Nixpkgs - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nixpkgs.url = "github:gabevenberg/nixpkgs/restic-server-htpasswd-file"; nixos-wsl = { url = "github:nix-community/NixOS-WSL/main"; diff --git a/hosts/cirrostratus/restic.nix b/hosts/cirrostratus/restic.nix index 9be0cad..040bb55 100644 --- a/hosts/cirrostratus/restic.nix +++ b/hosts/cirrostratus/restic.nix @@ -12,7 +12,7 @@ in { sopsFile = "${inputs.nix-secrets}/restic-server"; format = "binary"; # TODO: fix https://github.com/NixOS/nixpkgs/issues/398172 to remove this. - path = "/backup/restic/.htpasswd"; + # path = "/backup/restic/.htpasswd"; owner = "restic"; }; secrets.restic-url = { diff --git a/modules/nixos/restic.nix b/modules/nixos/restic.nix index fc24816..41776a3 100644 --- a/modules/nixos/restic.nix +++ b/modules/nixos/restic.nix @@ -92,7 +92,7 @@ dataDir = cfg.server.repositoryPath; listenAddress = "127.0.0.1:${cfg.server.port}"; # TODO: fix https://github.com/NixOS/nixpkgs/issues/398172 to enable this. - # extraFlags = ["--htpasswd-file='${cfg.server.htpasswdPath}'"]; + htpasswd-file = cfg.server.htpasswdPath; }; services.nginx.virtualHosts =