Skip to content

Commit

Permalink
htop: write-protect entire configuration directory
Browse files Browse the repository at this point in the history
Fixes #4947
  • Loading branch information
9ary authored and khaneliman committed Feb 22, 2025
1 parent 61d8f83 commit cb3f6e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/programs/htop.nix
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ in {

home.packages = [ cfg.package ];

xdg.configFile."htop/htoprc" = let
xdg.configFile."htop" = let
defaults = {
fields = if isDarwin then
remove fields.M_SHARE defaultFields
Expand All @@ -189,9 +189,9 @@ in {
formatOptions = mapAttrsToList formatOption;

in mkIf (cfg.settings != { }) {
text =
concatStringsSep "\n" (formatOptions before ++ formatOptions settings)
+ "\n";
source = pkgs.writeTextDir "htoprc"
(concatStringsSep "\n" (formatOptions before ++ formatOptions settings)
+ "\n");
};
};
}

0 comments on commit cb3f6e9

Please sign in to comment.