summaryrefslogtreecommitdiffstats
path: root/old/modules/lass/chromium-patched.nix
blob: 715181778627aa3074f66d92a2d8cc35c55a0ec3 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{ config, pkgs, ... }:

#settings to test:
#
      #"ForceEphemeralProfiles": true,
let
  masterPolicy = pkgs.writeText "master.json" ''
    {
      "PasswordManagerEnabled": false,
      "DefaultGeolocationSetting": 2,
      "RestoreOnStartup": 1,
      "AutoFillEnabled": false,
      "BackgroundModeEnabled": false,
      "DefaultBrowserSettingEnabled": false,
      "SafeBrowsingEnabled": false,
      "ExtensionInstallForcelist": [
        "cjpalhdlnbpafiamejdnhcphjbkeiagm;https://clients2.google.com/service/update2/crx",
        "ihlenndgcmojhcghmfjfneahoeklbjjh;https://clients2.google.com/service/update2/crx"
      ]
    }
  '';

  master_preferences = pkgs.writeText "master_preferences" ''
    {
      "browser": {
        "custom_chrome_frame": true
      },

      "extensions": {
        "theme": {
          "id": "",
          "use_system": true
        }
      }
    }
  '';
in {
  environment.etc."chromium/policies/managed/master.json".source = pkgs.lib.mkForce masterPolicy;

  environment.systemPackages = [
    #pkgs.chromium
    (pkgs.lib.overrideDerivation pkgs.chromium (attrs: {
      buildCommand = attrs.buildCommand + ''
        touch $out/TEST123
      '';
    }))
  ];
}