diff --git a/modules/misc/fontconfig.nix b/modules/misc/fontconfig.nix index aab29b67d..e76e135eb 100644 --- a/modules/misc/fontconfig.nix +++ b/modules/misc/fontconfig.nix @@ -29,7 +29,7 @@ in }; config = mkIf cfg.enableProfileFonts { - home.file.".config/fontconfig/conf.d/10-nix-profile-fonts.conf".text = '' + xdg.configFile."fontconfig/conf.d/10-nix-profile-fonts.conf".text = '' diff --git a/modules/misc/gtk.nix b/modules/misc/gtk.nix index a95e8d6e2..f0fc8b1ae 100644 --- a/modules/misc/gtk.nix +++ b/modules/misc/gtk.nix @@ -124,10 +124,10 @@ in mapAttrsToList formatGtk2Option ini ) + "\n" + cfg2.extraConfig; - home.file.".config/gtk-3.0/settings.ini".text = + xdg.configFile."gtk-3.0/settings.ini".text = toGtk3Ini { Settings = ini // cfg3.extraConfig; }; - home.file.".config/gtk-3.0/gtk.css".text = cfg3.extraCss; + xdg.configFile."gtk-3.0/gtk.css".text = cfg3.extraCss; } ); } diff --git a/modules/programs/beets.nix b/modules/programs/beets.nix index 34aa04608..40e06a6b3 100644 --- a/modules/programs/beets.nix +++ b/modules/programs/beets.nix @@ -27,7 +27,7 @@ in config = mkIf (cfg.settings != {}) { home.packages = [ pkgs.beets ]; - home.file.".config/beets/config.yaml".text = + xdg.configFile."beets/config.yaml".text = builtins.toJSON config.programs.beets.settings; }; } diff --git a/modules/programs/feh.nix b/modules/programs/feh.nix index 1ca83ca81..12d828ec5 100644 --- a/modules/programs/feh.nix +++ b/modules/programs/feh.nix @@ -30,7 +30,7 @@ in config = mkIf cfg.enable { home.packages = [ pkgs.feh ]; - home.file.".config/feh/keys".text = '' + xdg.configFile."feh/keys".text = '' # Disable default keybindings ${concatStringsSep "\n" (mapAttrsToList disableBinding cfg.keybindings)} diff --git a/modules/programs/htop.nix b/modules/programs/htop.nix index 10235ccda..d700c4855 100644 --- a/modules/programs/htop.nix +++ b/modules/programs/htop.nix @@ -290,7 +290,7 @@ in config = mkIf cfg.enable { home.packages = [ pkgs.htop ]; - home.file.".config/htop/htoprc".text = let + xdg.configFile."htop/htoprc".text = let leftMeters = map (m: m.kind) cfg.meters.left; leftModes = map (m: m.mode) cfg.meters.left; rightMeters = map (m: m.kind) cfg.meters.right; diff --git a/modules/programs/termite.nix b/modules/programs/termite.nix index 1e4ee671c..ce047b8fd 100644 --- a/modules/programs/termite.nix +++ b/modules/programs/termite.nix @@ -310,7 +310,7 @@ in optionalString = name: val: lib.optionalString (val != null) "${name} = ${val}"; in mkIf cfg.enable { home.packages = [ pkgs.termite ]; - home.file.".config/termite/config".text = '' + xdg.configFile."termite/config".text = '' [options] ${optionalBoolean "allow_bold" cfg.allowBold} ${optionalBoolean "audible_bell" cfg.audibleBell} diff --git a/modules/services/dunst.nix b/modules/services/dunst.nix index 22a7d2163..a2f5dae9f 100644 --- a/modules/services/dunst.nix +++ b/modules/services/dunst.nix @@ -71,7 +71,7 @@ in } (mkIf (cfg.settings != {}) { - home.file.".config/dunst/dunstrc".text = toDunstIni cfg.settings; + xdg.configFile."dunst/dunstrc".text = toDunstIni cfg.settings; }) ] ); diff --git a/modules/services/polybar.nix b/modules/services/polybar.nix index 8e92b4aff..2e24f2a94 100644 --- a/modules/services/polybar.nix +++ b/modules/services/polybar.nix @@ -111,7 +111,7 @@ in config = mkIf cfg.enable { home.packages = [ cfg.package ]; - home.file.".config/polybar/config".source = configFile; + xdg.configFile."polybar/config".source = configFile; systemd.user.services.polybar = { Unit = { diff --git a/modules/systemd.nix b/modules/systemd.nix index 066304773..8ee2db659 100644 --- a/modules/systemd.nix +++ b/modules/systemd.nix @@ -28,12 +28,12 @@ let wantedBy = target: { - name = ".config/systemd/user/${target}.wants/${name}.${style}"; + name = "systemd/user/${target}.wants/${name}.${style}"; value = { inherit source; }; }; in singleton { - name = ".config/systemd/user/${name}.${style}"; + name = "systemd/user/${name}.${style}"; value = { inherit source; }; } ++ @@ -107,7 +107,7 @@ in # If we run under a Linux system we assume that systemd is # available, in particular we assume that systemctl is in PATH. (mkIf pkgs.stdenv.isLinux { - home.file = + xdg.configFile = listToAttrs ( (buildServices "service" cfg.services) ++