diff --git a/modules/programs/browser.nix b/modules/programs/browser.nix index d9c6fd7..3f1e0d9 100644 --- a/modules/programs/browser.nix +++ b/modules/programs/browser.nix @@ -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 diff --git a/system/desktop/browser.nix b/system/desktop/browser.nix index cd4814d..4bef675 100644 --- a/system/desktop/browser.nix +++ b/system/desktop/browser.nix @@ -9,50 +9,46 @@ in { development = { home = "${homeFolder}/development-browser"; homeBackup = "${backupFolder}/development-browser"; + gpu = false; }; google = { home = "${homeFolder}/google-browser"; homeBackup = "${backupFolder}/google-browser"; + gpu = true; }; finance = { home = "${homeFolder}/finance-browser"; homeBackup = "${backupFolder}/finance-browser"; + gpu = false; }; facebook = { home = "${homeFolder}/facebook-browser"; homeBackup = "${backupFolder}/facebook-browser"; + gpu = false; }; shopping = { home = "${homeFolder}/shopping-browser"; homeBackup = "${backupFolder}/shopping-browser"; - }; - mindcurv = { - home = "${homeFolder}/mindcurv-browser"; - homeBackup = "${backupFolder}/mindcurv-browser"; - }; - cbase = { - home = "${homeFolder}/cbase-browser"; - homeBackup = "${backupFolder}/cbase-browser"; - }; - nz-browser = { - home = "${homeFolder}/nz-browser"; - homeBackup = "${backupFolder}/nz-browser"; + gpu = false; }; firefox-tmp = { browserType = "firefox"; home = "${homeFolder}/firefox-tmp"; homeBackup = "${backupFolder}/firefox-tmp-browser"; + gpu = false; }; chromium-tmp = { browserType = "chrome"; home = "${homeFolder}/chromium-tmp"; homeBackup = "${backupFolder}/chrome-tmp-browser"; + gpu = false; }; google-tmp = { browserType = "google"; home = "${homeFolder}/google-tmp"; homeBackup = "${backupFolder}google-tmp-browser"; + gpu = false; }; };