mirror of
https://codeberg.org/icewind/tasmota-backup.git
synced 2026-06-03 22:34:10 +02:00
fmt
This commit is contained in:
parent
191e3868f6
commit
22e415ba6a
5 changed files with 46 additions and 44 deletions
|
|
@ -28,6 +28,8 @@ password = "device-password" # the device password is the MQTT password used by
|
||||||
# password-file = "/path/to/device-password"
|
# password-file = "/path/to/device-password"
|
||||||
```
|
```
|
||||||
|
|
||||||
A `.dmp` for every discovered device file will be written to the configured output directory.
|
A `.dmp` for every discovered device file will be written to the configured
|
||||||
|
output directory.
|
||||||
|
|
||||||
The output files should be stable as long as the device configuration isn't changed and the backup program will not overwrite existing unchanged files.
|
The output files should be stable as long as the device configuration isn't
|
||||||
|
changed and the backup program will not overwrite existing unchanged files.
|
||||||
|
|
|
||||||
13
flake.nix
13
flake.nix
|
|
@ -10,15 +10,16 @@
|
||||||
inputs.flakelight.follows = "flakelight";
|
inputs.flakelight.follows = "flakelight";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
outputs = { mill-scale, ... }: mill-scale ./. {
|
outputs = {mill-scale, ...}:
|
||||||
|
mill-scale ./. {
|
||||||
withOverlays = import ./overlay.nix;
|
withOverlays = import ./overlay.nix;
|
||||||
|
|
||||||
nixosModules = {outputs, ...}: {
|
nixosModules = {outputs, ...}: {
|
||||||
default =
|
default = {
|
||||||
{ pkgs
|
pkgs,
|
||||||
, config
|
config,
|
||||||
, lib
|
lib,
|
||||||
, ...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [./module.nix];
|
imports = [./module.nix];
|
||||||
config = lib.mkIf config.services.tasmota-backup.enable {
|
config = lib.mkIf config.services.tasmota-backup.enable {
|
||||||
|
|
|
||||||
12
module.nix
12
module.nix
|
|
@ -1,7 +1,8 @@
|
||||||
{ config
|
{
|
||||||
, lib
|
config,
|
||||||
, pkgs
|
lib,
|
||||||
, ...
|
pkgs,
|
||||||
|
...
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
format = pkgs.formats.toml {};
|
format = pkgs.formats.toml {};
|
||||||
|
|
@ -14,8 +15,7 @@ with lib; let
|
||||||
device."password-file" = "$CREDENTIALS_DIRECTORY/device_password";
|
device."password-file" = "$CREDENTIALS_DIRECTORY/device_password";
|
||||||
};
|
};
|
||||||
cfg = config.services.tasmota-backup;
|
cfg = config.services.tasmota-backup;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.services.tasmota-backup = {
|
options.services.tasmota-backup = {
|
||||||
enable = mkEnableOption "Log archiver";
|
enable = mkEnableOption "Log archiver";
|
||||||
|
|
||||||
|
|
|
||||||
15
package.nix
15
package.nix
|
|
@ -1,11 +1,10 @@
|
||||||
{ stdenv
|
{
|
||||||
, rustPlatform
|
stdenv,
|
||||||
, libsodium
|
rustPlatform,
|
||||||
, pkg-config
|
libsodium,
|
||||||
, lib
|
pkg-config,
|
||||||
,
|
lib,
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
inherit (lib.sources) sourceByRegex;
|
inherit (lib.sources) sourceByRegex;
|
||||||
src = sourceByRegex ./. ["Cargo.*" "(src)(/.*)?"];
|
src = sourceByRegex ./. ["Cargo.*" "(src)(/.*)?"];
|
||||||
in
|
in
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue