forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Merge branch 'NixOS:master' into master
Showing
36 changed files
with
635 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -537,6 +537,13 @@ | |
githubId = 749381; | ||
name = "Adam Tulinius"; | ||
}; | ||
adda = { | ||
email = "[email protected]"; | ||
matrix = "@adda0:matrix.org"; | ||
github = "adda0"; | ||
githubId = 52529234; | ||
name = "David Chocholatý"; | ||
}; | ||
addict3d = { | ||
email = "[email protected]"; | ||
matrix = "@nbathum:matrix.org"; | ||
|
@@ -16804,6 +16811,11 @@ | |
githubId = 686076; | ||
name = "Vitalii Voloshyn"; | ||
}; | ||
pancaek = { | ||
github = "pancaek"; | ||
githubId = 20342389; | ||
name = "paneku"; | ||
}; | ||
panda2134 = { | ||
email = "[email protected]"; | ||
github = "panda2134"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ let | |
mapAttrs' | ||
splitString | ||
toUpper | ||
optional | ||
optionalAttrs | ||
nameValuePair | ||
; | ||
|
@@ -18,13 +19,22 @@ in | |
port = 9753; | ||
extraOpts = { | ||
repository = mkOption { | ||
type = types.str; | ||
type = with lib.types; nullOr str; | ||
default = null; | ||
description = '' | ||
URI pointing to the repository to monitor. | ||
''; | ||
example = "sftp:[email protected]:/backups/example"; | ||
}; | ||
|
||
repositoryFile = mkOption { | ||
type = with lib.types; nullOr path; | ||
default = null; | ||
description = '' | ||
Path to the file containing the URI for the repository to monitor. | ||
''; | ||
}; | ||
|
||
passwordFile = mkOption { | ||
type = types.path; | ||
description = '' | ||
|
@@ -103,13 +113,21 @@ in | |
|
||
serviceOpts = { | ||
script = '' | ||
export RESTIC_REPOSITORY=${ | ||
if cfg.repositoryFile != null | ||
then "$(cat $CREDENTIALS_DIRECTORY/RESTIC_REPOSITORY)" | ||
else "${cfg.repository}" | ||
} | ||
export RESTIC_PASSWORD_FILE=$CREDENTIALS_DIRECTORY/RESTIC_PASSWORD_FILE | ||
${pkgs.prometheus-restic-exporter}/bin/restic-exporter.py \ | ||
${concatStringsSep " \\\n " cfg.extraFlags} | ||
''; | ||
serviceConfig = { | ||
EnvironmentFile = mkIf (cfg.environmentFile != null) cfg.environmentFile; | ||
LoadCredential = [ "RESTIC_PASSWORD_FILE:${cfg.passwordFile}" ]; | ||
LoadCredential = | ||
[ "RESTIC_PASSWORD_FILE:${cfg.passwordFile}" ] | ||
++ optional (cfg.repositoryFile != null) | ||
[ "RESTIC_REPOSITORY:${cfg.repositoryFile}" ]; | ||
}; | ||
environment = | ||
let | ||
|
@@ -119,7 +137,6 @@ in | |
toRcloneVal = v: if lib.isBool v then lib.boolToString v else v; | ||
in | ||
{ | ||
RESTIC_REPOSITORY = cfg.repository; | ||
LISTEN_ADDRESS = cfg.listenAddress; | ||
LISTEN_PORT = toString cfg.port; | ||
REFRESH_INTERVAL = toString cfg.refreshInterval; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
rustPlatform, | ||
fetchFromSourcehut, | ||
lib, | ||
}: | ||
|
||
rustPlatform.buildRustPackage rec { | ||
pname = "flirt"; | ||
version = "0.2"; | ||
|
||
src = fetchFromSourcehut { | ||
owner = "~hadronized"; | ||
repo = "flirt"; | ||
rev = "v${version}"; | ||
hash = "sha256-NV6UP7fPTcn0WrZwIfe1zuZW6hJDuxrfATM2Gpx0yr0="; | ||
}; | ||
|
||
cargoHash = "sha256-gVtRU+tjwf3rTei/TjUFYSMvLB9g6gNeGYO+9NBxgYQ="; | ||
|
||
meta = { | ||
description = "FiLe InteRacT, the file interaction tool for your command line"; | ||
homepage = "https://git.sr.ht/~hadronized/flirt"; | ||
license = lib.licenses.bsd3; | ||
maintainers = with lib.maintainers; [ | ||
adda | ||
]; | ||
mainProgram = "flirt"; | ||
}; | ||
} |
Oops, something went wrong.