X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FNix.git;a=blobdiff_plain;f=flakes%2Ffiles-watcher%2Fflake.nix;h=3be566d9fb0d08e64d5bf7f1238381a28b1c447b;hp=29ea428dba533a64b88f1cf73dd0ccc32f164954;hb=1a64deeb894dc95e2645a75771732c6cc53a79ad;hpb=fa25ffd4583cc362075cd5e1b4130f33306103f0 diff --git a/flakes/files-watcher/flake.nix b/flakes/files-watcher/flake.nix index 29ea428..3be566d 100644 --- a/flakes/files-watcher/flake.nix +++ b/flakes/files-watcher/flake.nix @@ -2,6 +2,8 @@ description = "Module to watch fo file changes to force restart systemd service"; outputs = { self }: { nixosModule = { config, lib, pkgs, ... }: let cfg = config.services.filesWatcher; in with lib; { + # Necessary for situations where flake gets included multiple times + key = builtins.hashString "sha256" (builtins.path { path = self.sourceInfo.outPath; name = "source"; }); options = { services.filesWatcher = with lib.types; mkOption { default = {};