configure browser

This commit is contained in:
Ingolf Wagner 2021-05-15 11:27:05 +02:00
commit 8b40f21482
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
2 changed files with 17 additions and 13 deletions
modules/programs

View file

@ -174,6 +174,14 @@ in {
Home of the browser.
'';
};
gpu = mkOption {
type = with types; bool;
default = true;
description = ''
add browser user to video group so give browser rights to use gpu.
see : chrome://gpu/
'';
};
user = mkOption {
default = name;
type = with types; str;
@ -228,7 +236,7 @@ in {
isNormalUser = true;
group = "users";
# enable video usage
extraGroups = [ "video" "audio" ];
extraGroups = if config.gpu then [ "video" "audio" ] else [ "audio" ];
});
# add groups to mainUser