Chromium: Use policies.
This commit is contained in:
parent
d3618b3320
commit
3df3e1ebbf
|
@ -63,7 +63,8 @@
|
|||
default_fixed_font_size = 14;
|
||||
default_font_size = 17;
|
||||
minimum_font_size = 16;
|
||||
fonts = let
|
||||
fonts =
|
||||
let
|
||||
mono = config.style.font.monospace.name;
|
||||
sans = config.style.font.sansSerif.name;
|
||||
in
|
||||
|
@ -79,10 +80,10 @@
|
|||
|
||||
localState = (pkgs.formats.json { }).generate "ChromiumLocalState" {
|
||||
browser = {
|
||||
enabled_labs_experiments = [
|
||||
"smooth-scrolling@2"
|
||||
];
|
||||
enabled_labs_experiments = [ "smooth-scrolling@2" ];
|
||||
first_run_finished = true;
|
||||
};
|
||||
};
|
||||
|
||||
policy = (pkgs.formats.json { }).generate "ChromiumPolicy" { URLBlocklist = [ "darkreader.org" ]; };
|
||||
}
|
||||
|
|
|
@ -2,8 +2,14 @@
|
|||
let
|
||||
package = pkgs.ungoogled-chromium;
|
||||
browserVersion = lib.versions.major package.version;
|
||||
extensions = let
|
||||
fetchFromStore = { id, sha256, version }:
|
||||
extensions =
|
||||
let
|
||||
fetchFromStore =
|
||||
{
|
||||
id,
|
||||
sha256,
|
||||
version,
|
||||
}:
|
||||
{
|
||||
inherit id version;
|
||||
crxPath = pkgs.fetchurl {
|
||||
|
@ -12,7 +18,13 @@ let
|
|||
name = "${id}.crx";
|
||||
};
|
||||
};
|
||||
fetchFromUrl = { id, url, sha256, version }:
|
||||
fetchFromUrl =
|
||||
{
|
||||
id,
|
||||
url,
|
||||
sha256,
|
||||
version,
|
||||
}:
|
||||
{
|
||||
inherit id version;
|
||||
crxPath = pkgs.fetchurl {
|
||||
|
|
|
@ -57,6 +57,16 @@ in
|
|||
};
|
||||
|
||||
services.gvfs.enable = true;
|
||||
|
||||
# Chromium config.
|
||||
environment.etc =
|
||||
let
|
||||
chromium = import <home/config/chromium> args;
|
||||
in
|
||||
{
|
||||
"chromium/initial_preferences".source = lib.mkForce chromium.preferences;
|
||||
"chromium/policies/managed/extra.json".source = lib.mkForce chromium.policy;
|
||||
};
|
||||
})
|
||||
|
||||
# Desktop apps.
|
||||
|
|
|
@ -123,7 +123,7 @@
|
|||
];
|
||||
|
||||
creative = with pkgs; [
|
||||
aseprite # Pixel Art draw app. WARNING: Always builds from source.
|
||||
libresprite # Pixel Art draw app.
|
||||
blender-hip # Blender with HiP support.
|
||||
krita # Draw!
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue