diff --git a/modules/programs/foot.nix b/modules/programs/foot.nix index 08b5e3975..8df201fd9 100644 --- a/modules/programs/foot.nix +++ b/modules/programs/foot.nix @@ -51,7 +51,7 @@ in { config = mkIf cfg.enable { home.packages = [ cfg.package ]; - xdg.configFile."foot/foot.ini" = { + xdg.configFile."foot/foot.ini" = mkIf (cfg.settings != { }) { source = iniFormat.generate "foot.ini" cfg.settings; }; diff --git a/tests/modules/programs/foot/empty-settings.nix b/tests/modules/programs/foot/empty-settings.nix index 44caeca55..3935fd9dc 100644 --- a/tests/modules/programs/foot/empty-settings.nix +++ b/tests/modules/programs/foot/empty-settings.nix @@ -10,10 +10,7 @@ with lib; [ (self: super: { foot = pkgs.writeScriptBin "dummy-foot" ""; }) ]; nmt.script = '' - assertFileExists home-files/.config/foot/foot.ini - assertFileContent \ - home-files/.config/foot/foot.ini \ - ${builtins.toFile "test" ""} + assertPathNotExists home-files/.config/foot ''; }; } diff --git a/tests/modules/programs/foot/systemd-user-service.nix b/tests/modules/programs/foot/systemd-user-service.nix index 9c131362b..1eff14f9f 100644 --- a/tests/modules/programs/foot/systemd-user-service.nix +++ b/tests/modules/programs/foot/systemd-user-service.nix @@ -11,10 +11,7 @@ in { }; nmt.script = '' - assertFileExists home-files/.config/foot/foot.ini - assertFileContent \ - home-files/.config/foot/foot.ini \ - ${builtins.toFile "test" ""} + assertPathNotExists home-files/.config/foot/foot.ini assertFileContent \ home-files/.config/systemd/user/foot.service \