summaryrefslogtreecommitdiff
path: root/modules/borgcopy/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/borgcopy/default.nix')
-rw-r--r--modules/borgcopy/default.nix40
1 files changed, 15 insertions, 25 deletions
diff --git a/modules/borgcopy/default.nix b/modules/borgcopy/default.nix
index eae07dc8..afc6c37b 100644
--- a/modules/borgcopy/default.nix
+++ b/modules/borgcopy/default.nix
@@ -3,33 +3,23 @@
3with lib; 3with lib;
4 4
5let 5let
6 copyBorg = flakeInputs.mach-nix.lib.${config.nixpkgs.system}.buildPythonPackage rec { 6 copyBorg =
7 pname = "copy-borg"; 7 with pkgs.poetry2nix;
8 src = ./copy; 8 mkPoetryApplication {
9 version = "0.0.0"; 9 projectDir = cleanPythonSources { src = ./.; };
10 ignoreDataOutdated = true;
11 10
12 requirements = '' 11 overrides = overrides.withDefaults (self: super: {
13 humanize 12 pyprctl = super.pyprctl.overridePythonAttrs (oldAttrs: {
14 tqdm 13 buildInputs = (oldAttrs.buildInputs or []) ++ [super.setuptools];
15 python-dateutil 14 });
16 xdg 15 inherit (pkgs.python3Packages) python-unshare;
17 python-unshare 16 });
18 pyprctl
19 halo
20 '';
21 postInstall = ''
22 wrapProgram $out/bin/copy_borg \
23 --prefix PATH : ${makeBinPath (with pkgs; [util-linux borgbackup])}:${config.security.wrapperDir}
24 '';
25
26 providers.python-unshare = "nixpkgs";
27 overridesPre = [
28 (self: super: { python-unshare = super.python-unshare.overrideAttrs (oldAttrs: { name = "python-unshare-0.2.1"; version = "0.2.1"; }); })
29 ];
30 17
31 # _.tomli.buildInputs.add = with pkgs."python3Packages"; [ flit-core ]; 18 postInstall = ''
32 }; 19 wrapProgram $out/bin/copy_borg \
20 --prefix PATH : ${makeBinPath (with pkgs; [util-linux borgbackup])}:${config.security.wrapperDir}
21 '';
22 };
33 23
34 copyService = name: opts: nameValuePair "copy-borg@${utils.escapeSystemdPath name}" { 24 copyService = name: opts: nameValuePair "copy-borg@${utils.escapeSystemdPath name}" {
35 serviceConfig = { 25 serviceConfig = {