From 2501ffe2eabfbd2baab942414483e2ac28f9f0bf Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Tue, 17 Sep 2024 18:03:16 +0900 Subject: [PATCH] Replacing home.file with writeTextFile did not resolve the problem GH-680 --- home-manager/common.nix | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/home-manager/common.nix b/home-manager/common.nix index fca7ad55..41a9a3c7 100644 --- a/home-manager/common.nix +++ b/home-manager/common.nix @@ -73,11 +73,20 @@ "${config.xdg.dataHome}/tmpbin" ]; - packages = import ./packages.nix { - inherit pkgs; - inherit edge-pkgs; - inherit homemade-pkgs; - }; + packages = + import ./packages.nix { + inherit pkgs; + inherit edge-pkgs; + inherit homemade-pkgs; + } + ++ [ + (pkgs.writeTextFile { + name = "starship.toml"; + # Not under "starship/starship.toml" + destination = "${config.xdg.configHome}/starship.toml"; + text = builtins.readFile ../config/starship/starship.toml; + }) + ]; }; # This also changes xdg? Official manual sed this config is better for non NixOS Linux @@ -135,9 +144,6 @@ recursive = true; }; - # Not under "starship/starship.toml" - xdg.configFile."starship.toml".source = ../config/starship/starship.toml; - # No home-manager module exists https://github.com/nix-community/home-manager/issues/2890 # TODO: Automate that needs to call `Install-Module -Name PSFzfHistory` first xdg.configFile."powershell/Microsoft.PowerShell_profile.ps1".source = ../config/powershell/Profile.ps1;