blob: 3fd5f226c7279659578170640c76d70cb9f8e421 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
{ config, lib, pkgs, ... }:
{
options.tools.brave = {
enable = lib.mkEnableOption "Enables brave.";
};
config = lib.mkIf config.tools.brave.enable {
home.packages = with pkgs; [
# Modify the brave-browser.desktop entry to scale the UI
(brave.overrideAttrs (old: {
postInstall = (old.postInstall or "") + ''
sed -i 's|^Exec=\(.*brave[^\n]*\)|Exec=\1 --force-device-scale-factor=1.2|' \
$out/share/applications/brave-browser.desktop
'';
}))
];
home.sessionPath = [
"${config.home.homeDirectory}/.local/bin"
];
home.file.".local/bin/brave" = {
text = ''
#!${pkgs.bash}/bin/bash
exec ${pkgs.brave}/bin/brave --force-device-scale-factor=1.2 "$@"
'';
executable = true;
};
};
}
|