From 12a723df97ff61a18a77c2e2900e78463131964a Mon Sep 17 00:00:00 2001 From: Benedikt Rips Date: Mon, 5 Jan 2026 22:59:21 +0100 Subject: [PATCH] gurk-rs: deduplicate platform-dependent files --- modules/programs/gurk-rs.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/programs/gurk-rs.nix b/modules/programs/gurk-rs.nix index aaf808d67..ea29f84fc 100644 --- a/modules/programs/gurk-rs.nix +++ b/modules/programs/gurk-rs.nix @@ -7,6 +7,8 @@ let tomlFormat = pkgs.formats.toml { }; cfg = config.programs.gurk-rs; + configDir = + if pkgs.stdenv.hostPlatform.isDarwin then "Library/Application Support" else config.xdg.configHome; in { meta.maintainers = [ lib.maintainers.da157 ]; @@ -46,9 +48,8 @@ in config = lib.mkIf cfg.enable { home.packages = lib.mkIf (cfg.package != null) [ cfg.package ]; - home.file."${ - if pkgs.stdenv.hostPlatform.isDarwin then "Library/Application Support" else config.xdg.configHome - }/gurk/gurk.toml".source = - lib.mkIf (cfg.settings != { }) (tomlFormat.generate "gurk-config" cfg.settings); + home.file."${configDir}/gurk/gurk.toml" = lib.mkIf (cfg.settings != { }) { + source = tomlFormat.generate "gurk-config" cfg.settings; + }; }; }