Set up chromium with support for wayland and widevine.
This commit is contained in:
parent
69098488f6
commit
27aa2f077b
@ -27,6 +27,7 @@
|
|||||||
./roles/sway
|
./roles/sway
|
||||||
./roles/alacritty
|
./roles/alacritty
|
||||||
./roles/firefox
|
./roles/firefox
|
||||||
|
./roles/chromium
|
||||||
./roles/emacs
|
./roles/emacs
|
||||||
./roles/git
|
./roles/git
|
||||||
./roles/fonts
|
./roles/fonts
|
||||||
|
51
nix/configuration/roles/chromium/default.nix
Normal file
51
nix/configuration/roles/chromium/default.nix
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
(chromium.override { enableWideVine = true; })
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfreePredicate =
|
||||||
|
pkg:
|
||||||
|
builtins.elem (lib.getName pkg) [
|
||||||
|
"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";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs.config.chromium.commandLineArgs = "--enable-features=Vulkan";
|
||||||
|
}
|
@ -297,11 +297,13 @@ in
|
|||||||
programs.sway.extraSessionCommands =
|
programs.sway.extraSessionCommands =
|
||||||
if config.me.buildingIso then
|
if config.me.buildingIso then
|
||||||
''
|
''
|
||||||
export WLR_RENDERER_ALLOW_SOFTWARE=1;
|
export WLR_RENDERER_ALLOW_SOFTWARE=1
|
||||||
|
export NIXOS_OZONE_WL=1 # Wayland support for chromium and electron
|
||||||
''
|
''
|
||||||
else
|
else
|
||||||
''
|
''
|
||||||
export WLR_RENDERER=vulkan
|
export WLR_RENDERER=vulkan
|
||||||
|
export NIXOS_OZONE_WL=1 # Wayland support for chromium and electron
|
||||||
'';
|
'';
|
||||||
|
|
||||||
programs.sway = {
|
programs.sway = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user