configure browser
This commit is contained in:
parent
3486ba837b
commit
8b40f21482
2 changed files with 17 additions and 13 deletions
|
@ -174,6 +174,14 @@ in {
|
||||||
Home of the browser.
|
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 {
|
user = mkOption {
|
||||||
default = name;
|
default = name;
|
||||||
type = with types; str;
|
type = with types; str;
|
||||||
|
@ -228,7 +236,7 @@ in {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
group = "users";
|
group = "users";
|
||||||
# enable video usage
|
# enable video usage
|
||||||
extraGroups = [ "video" "audio" ];
|
extraGroups = if config.gpu then [ "video" "audio" ] else [ "audio" ];
|
||||||
});
|
});
|
||||||
|
|
||||||
# add groups to mainUser
|
# add groups to mainUser
|
||||||
|
|
|
@ -9,50 +9,46 @@ in {
|
||||||
development = {
|
development = {
|
||||||
home = "${homeFolder}/development-browser";
|
home = "${homeFolder}/development-browser";
|
||||||
homeBackup = "${backupFolder}/development-browser";
|
homeBackup = "${backupFolder}/development-browser";
|
||||||
|
gpu = false;
|
||||||
};
|
};
|
||||||
google = {
|
google = {
|
||||||
home = "${homeFolder}/google-browser";
|
home = "${homeFolder}/google-browser";
|
||||||
homeBackup = "${backupFolder}/google-browser";
|
homeBackup = "${backupFolder}/google-browser";
|
||||||
|
gpu = true;
|
||||||
};
|
};
|
||||||
finance = {
|
finance = {
|
||||||
home = "${homeFolder}/finance-browser";
|
home = "${homeFolder}/finance-browser";
|
||||||
homeBackup = "${backupFolder}/finance-browser";
|
homeBackup = "${backupFolder}/finance-browser";
|
||||||
|
gpu = false;
|
||||||
};
|
};
|
||||||
facebook = {
|
facebook = {
|
||||||
home = "${homeFolder}/facebook-browser";
|
home = "${homeFolder}/facebook-browser";
|
||||||
homeBackup = "${backupFolder}/facebook-browser";
|
homeBackup = "${backupFolder}/facebook-browser";
|
||||||
|
gpu = false;
|
||||||
};
|
};
|
||||||
shopping = {
|
shopping = {
|
||||||
home = "${homeFolder}/shopping-browser";
|
home = "${homeFolder}/shopping-browser";
|
||||||
homeBackup = "${backupFolder}/shopping-browser";
|
homeBackup = "${backupFolder}/shopping-browser";
|
||||||
};
|
gpu = false;
|
||||||
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";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
firefox-tmp = {
|
firefox-tmp = {
|
||||||
browserType = "firefox";
|
browserType = "firefox";
|
||||||
home = "${homeFolder}/firefox-tmp";
|
home = "${homeFolder}/firefox-tmp";
|
||||||
homeBackup = "${backupFolder}/firefox-tmp-browser";
|
homeBackup = "${backupFolder}/firefox-tmp-browser";
|
||||||
|
gpu = false;
|
||||||
};
|
};
|
||||||
chromium-tmp = {
|
chromium-tmp = {
|
||||||
browserType = "chrome";
|
browserType = "chrome";
|
||||||
home = "${homeFolder}/chromium-tmp";
|
home = "${homeFolder}/chromium-tmp";
|
||||||
homeBackup = "${backupFolder}/chrome-tmp-browser";
|
homeBackup = "${backupFolder}/chrome-tmp-browser";
|
||||||
|
gpu = false;
|
||||||
};
|
};
|
||||||
google-tmp = {
|
google-tmp = {
|
||||||
browserType = "google";
|
browserType = "google";
|
||||||
home = "${homeFolder}/google-tmp";
|
home = "${homeFolder}/google-tmp";
|
||||||
homeBackup = "${backupFolder}google-tmp-browser";
|
homeBackup = "${backupFolder}google-tmp-browser";
|
||||||
|
gpu = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue