From 8ec898d87469c10faed49388a5fac1a93282355c Mon Sep 17 00:00:00 2001 From: John Lancaster <32917998+jsl12@users.noreply.github.com> Date: Sat, 28 Mar 2026 17:41:07 -0500 Subject: [PATCH] moved restic to features --- .../{services/restic/default.nix => features/restic.nix} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename modules/{services/restic/default.nix => features/restic.nix} (93%) diff --git a/modules/services/restic/default.nix b/modules/features/restic.nix similarity index 93% rename from modules/services/restic/default.nix rename to modules/features/restic.nix index 7d3827b..79dce7a 100644 --- a/modules/services/restic/default.nix +++ b/modules/features/restic.nix @@ -1,4 +1,4 @@ -{ inputs, ... }: { +{ self, inputs, ... }: { flake.modules.nixos.restic-server = { config, pkgs, lib, ... }: { services.restic.server = { enable = true; @@ -47,20 +47,20 @@ config = let resticRepository = "rest:https://soteria.john-stream.com/${cfg.repoName}"; caCert = "${config.mtls.certDir}/root_ca.crt"; - mtlsClientCert = "${config.mtls.certDir}/${config.mtls.bundleFilename}"; + mtlsBundle = "${config.mtls.certDir}/${config.mtls.bundleFilename}"; in { home.sessionVariables = { RESTIC_REPOSITORY = resticRepository; RESTIC_PASSWORD_FILE = cfg.passwordFile; RESTIC_CACERT = caCert; - RESTIC_TLS_CLIENT_CERT = mtlsClientCert; + RESTIC_TLS_CLIENT_CERT = mtlsBundle; }; # This is necessary because the restic service in home manager doesn't otherwise expose these options. systemd.user.services."restic-backups-${cfg.repoName}".Service.Environment = [ "RESTIC_CACERT=${caCert}" - "RESTIC_TLS_CLIENT_CERT=${mtlsClientCert}" + "RESTIC_TLS_CLIENT_CERT=${mtlsBundle}" ]; services.restic = {