2024-12-22 00:48:57 -05:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
|
|
|
|
{
|
|
|
|
imports = [ ];
|
|
|
|
|
2025-01-23 19:04:19 -05:00
|
|
|
options.me = {
|
|
|
|
chromium.enable = lib.mkOption {
|
|
|
|
type = lib.types.bool;
|
|
|
|
default = false;
|
|
|
|
example = true;
|
|
|
|
description = "Whether we want to install chromium.";
|
2024-12-22 00:48:57 -05:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2025-01-23 19:04:19 -05:00
|
|
|
config = lib.mkIf config.me.chromium.enable (
|
|
|
|
lib.mkMerge [
|
|
|
|
{ }
|
|
|
|
(lib.mkIf config.me.graphical {
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
(chromium.override { enableWideVine = true; })
|
|
|
|
];
|
|
|
|
allowedUnfree = [
|
|
|
|
"chromium"
|
|
|
|
"chromium-unwrapped"
|
|
|
|
"widevine-cdm"
|
|
|
|
];
|
|
|
|
|
|
|
|
environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) {
|
|
|
|
hideMounts = true;
|
|
|
|
users.talexander = {
|
|
|
|
directories = [
|
|
|
|
{
|
|
|
|
directory = ".config/chromium";
|
|
|
|
user = "talexander";
|
|
|
|
group = "talexander";
|
|
|
|
mode = "0700";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
environment.persistence."/state" = lib.mkIf (!config.me.buildingIso) {
|
|
|
|
hideMounts = true;
|
|
|
|
users.talexander = {
|
|
|
|
directories = [
|
|
|
|
{
|
|
|
|
directory = ".cache/chromium";
|
|
|
|
user = "talexander";
|
|
|
|
group = "talexander";
|
|
|
|
mode = "0700";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Enabling vulkan causes video to render as white
|
|
|
|
# nixpkgs.config.chromium.commandLineArgs = "--enable-features=Vulkan";
|
|
|
|
})
|
|
|
|
]
|
|
|
|
);
|
2024-12-22 00:48:57 -05:00
|
|
|
}
|