Skip to content

Commit

Permalink
fix(github): added missing checking for non-existing config for synthing
Browse files Browse the repository at this point in the history
  • Loading branch information
Wittano committed Jun 27, 2024
1 parent 0b360c5 commit 42e4653
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions modules/services/syncthing.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ let
cfg = config.modules.services.syncthing;
homeDir = config.home-manager.users.wittano.home.homeDirectory;

encryptedConfig = trivial.pipe config.age.secrets.syncthing.path [
builtins.readFile
builtins.fromJSON
];
encryptedConfig =
if builtins.pathExists config.age.secrets.syncthing.path then
trivial.pipe config.age.secrets.syncthing.path [
builtins.readFile
builtins.fromJSON
] else debug.traceValFn (x: "Missing decrypted syncthing configuration. Load default empty config") { };
in
{
options = {
Expand Down

0 comments on commit 42e4653

Please sign in to comment.