configure browser

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

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

View file

@ -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;
};
};