add tablet modes for firefox and gnome
This commit is contained in:
@@ -1,17 +1,27 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, lib, ... }:
|
||||||
|
with lib;
|
||||||
{
|
{
|
||||||
services.xserver.enable = true;
|
options.gnome.tablet = mkOption {
|
||||||
services.xserver.displayManager.gdm.enable = true;
|
type = types.bool;
|
||||||
services.xserver.desktopManager.gnome.enable = true;
|
default = false;
|
||||||
|
};
|
||||||
|
|
||||||
# To disable installing GNOME's suite of applications
|
config = {
|
||||||
# and only be left with GNOME shell.
|
services.xserver.enable = true;
|
||||||
# services.gnome.core-apps.enable = false;
|
services.xserver.displayManager.gdm.enable = true;
|
||||||
services.gnome.core-developer-tools.enable = false;
|
services.xserver.desktopManager.gnome.enable = true;
|
||||||
services.gnome.games.enable = false;
|
|
||||||
environment.gnome.excludePackages = with pkgs; [ gnome-tour gnome-user-docs ];
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs.gnomeExtensions; [
|
# To disable installing GNOME's suite of applications
|
||||||
tray-icons-reloaded
|
# and only be left with GNOME shell.
|
||||||
];
|
# services.gnome.core-apps.enable = false;
|
||||||
|
services.gnome.core-developer-tools.enable = false;
|
||||||
|
services.gnome.games.enable = false;
|
||||||
|
environment.gnome.excludePackages = with pkgs; [ gnome-tour gnome-user-docs ];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs.gnomeExtensions; [
|
||||||
|
tray-icons-reloaded
|
||||||
|
] ++ optionals config.gnome.tablet [
|
||||||
|
touchup
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ in
|
|||||||
environment.plasma6.excludePackages = [ pkgs.kdePackages.discover ];
|
environment.plasma6.excludePackages = [ pkgs.kdePackages.discover ];
|
||||||
|
|
||||||
# For cursor in steam?
|
# For cursor in steam?
|
||||||
xdg.icons.fallbackCursorThemes = [ "breeze_cursors" ];
|
# xdg.icons.fallbackCursorThemes = [ "breeze_cursors" ];
|
||||||
|
|
||||||
programs.partition-manager.enable = true;
|
programs.partition-manager.enable = true;
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,9 @@
|
|||||||
../../configuration/modules/gnome.nix
|
../../configuration/modules/gnome.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "starlite"; # Define your hostname.
|
gnome.tablet = true;
|
||||||
|
|
||||||
|
networking.hostName = "starlite"; # Define your hostname.
|
||||||
environment.systemPackages = with pkgs.gnomeExtensions; [
|
environment.systemPackages = with pkgs.gnomeExtensions; [
|
||||||
touchup
|
touchup
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
terminal.nixUpdateLocation = "/home/worble/Projects/nixos#starlite";
|
terminal.nixUpdateLocation = "/home/worble/Projects/nixos#starlite";
|
||||||
terminal.flakeUpdateLocation = "/home/worble/Projects/nixos";
|
terminal.flakeUpdateLocation = "/home/worble/Projects/nixos";
|
||||||
|
firefox.tablet = true;
|
||||||
|
|
||||||
home.username = "worble";
|
home.username = "worble";
|
||||||
home.homeDirectory = "/home/worble";
|
home.homeDirectory = "/home/worble";
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, config, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
programs = {
|
programs = {
|
||||||
firefox = {
|
firefox = {
|
||||||
profiles.work = import ../../home-manager/firefox/firefox-profile.nix // {
|
profiles.work = (import ../../home-manager/firefox/firefox-profile.nix { tablet = config.firefox.tablet; }) // {
|
||||||
id = 1;
|
id = 1;
|
||||||
name = "work";
|
name = "work";
|
||||||
isDefault = false;
|
isDefault = false;
|
||||||
|
|||||||
@@ -8,15 +8,15 @@ with lib;
|
|||||||
|
|
||||||
options.terminal = {
|
options.terminal = {
|
||||||
nixUpdateLocation = mkOption {
|
nixUpdateLocation = mkOption {
|
||||||
type = lib.types.nullOr lib.types.str;
|
type = types.nullOr types.str;
|
||||||
default = null;
|
default = null;
|
||||||
};
|
};
|
||||||
flakeUpdateLocation = mkOption {
|
flakeUpdateLocation = mkOption {
|
||||||
type = lib.types.nullOr lib.types.str;
|
type = types.nullOr types.str;
|
||||||
default = null;
|
default = null;
|
||||||
};
|
};
|
||||||
homeUpdateLocation = mkOption {
|
homeUpdateLocation = mkOption {
|
||||||
type = lib.types.nullOr lib.types.str;
|
type = types.nullOr types.str;
|
||||||
default = null;
|
default = null;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ with lib;
|
|||||||
{
|
{
|
||||||
options.helix = {
|
options.helix = {
|
||||||
fullInstall = mkOption {
|
fullInstall = mkOption {
|
||||||
type = lib.types.nullOr lib.types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -17,43 +17,44 @@ with lib;
|
|||||||
settings = {
|
settings = {
|
||||||
theme = "dracula";
|
theme = "dracula";
|
||||||
};
|
};
|
||||||
extraPackages = with pkgs;[ gcc ];
|
extraPackages = with pkgs;[
|
||||||
|
gcc
|
||||||
|
] ++ (optionals config.helix.fullInstall [
|
||||||
|
#nix
|
||||||
|
nixd
|
||||||
|
nixpkgs-fmt
|
||||||
|
|
||||||
|
#dotnet
|
||||||
|
omnisharp-roslyn
|
||||||
|
netcoredbg
|
||||||
|
|
||||||
|
# rust
|
||||||
|
rustfmt
|
||||||
|
clippy
|
||||||
|
rust-analyzer
|
||||||
|
lldb
|
||||||
|
|
||||||
|
#python
|
||||||
|
ruff
|
||||||
|
|
||||||
|
# shell
|
||||||
|
shfmt
|
||||||
|
bash-language-server
|
||||||
|
fish-lsp
|
||||||
|
|
||||||
|
# misc
|
||||||
|
hyprls
|
||||||
|
marksman
|
||||||
|
|
||||||
|
# web
|
||||||
|
superhtml
|
||||||
|
biome
|
||||||
|
] ++ (with nodePackages;[
|
||||||
|
vscode-langservers-extracted
|
||||||
|
typescript-language-server
|
||||||
|
]));
|
||||||
}
|
}
|
||||||
(mkIf config.helix.fullInstall {
|
(mkIf config.helix.fullInstall {
|
||||||
extraPackages = with pkgs;[
|
|
||||||
#nix
|
|
||||||
nixd
|
|
||||||
nixpkgs-fmt
|
|
||||||
|
|
||||||
#dotnet
|
|
||||||
omnisharp-roslyn
|
|
||||||
netcoredbg
|
|
||||||
|
|
||||||
# rust
|
|
||||||
rustfmt
|
|
||||||
clippy
|
|
||||||
rust-analyzer
|
|
||||||
lldb
|
|
||||||
|
|
||||||
#python
|
|
||||||
ruff
|
|
||||||
|
|
||||||
# shell
|
|
||||||
shfmt
|
|
||||||
bash-language-server
|
|
||||||
fish-lsp
|
|
||||||
|
|
||||||
# misc
|
|
||||||
hyprls
|
|
||||||
marksman
|
|
||||||
|
|
||||||
# web
|
|
||||||
superhtml
|
|
||||||
biome
|
|
||||||
] ++ (with nodePackages;[
|
|
||||||
vscode-langservers-extracted
|
|
||||||
typescript-language-server
|
|
||||||
]);
|
|
||||||
languages = {
|
languages = {
|
||||||
language = [
|
language = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,63 +1,72 @@
|
|||||||
{ pkgs, ... }:
|
{ lib, config, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
{
|
{
|
||||||
programs = {
|
options.firefox = {
|
||||||
firefox = {
|
tablet = mkOption {
|
||||||
enable = true;
|
type = types.bool;
|
||||||
package = pkgs.firefox;
|
default = false;
|
||||||
languagePacks = [
|
};
|
||||||
"en-GB"
|
};
|
||||||
];
|
|
||||||
policies = {
|
config = {
|
||||||
"DisplayMenuBar" = true;
|
programs = {
|
||||||
"ExtensionSettings" = with builtins;
|
firefox = {
|
||||||
let
|
enable = true;
|
||||||
extension = shortId: uuid: {
|
package = pkgs.firefox;
|
||||||
name = uuid;
|
languagePacks = [
|
||||||
value = {
|
"en-GB"
|
||||||
install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi";
|
];
|
||||||
installation_mode = "normal_installed";
|
policies = {
|
||||||
|
"DisplayMenuBar" = if config.firefox.tablet then false else true;
|
||||||
|
"ExtensionSettings" = with builtins;
|
||||||
|
let
|
||||||
|
extension = shortId: uuid: {
|
||||||
|
name = uuid;
|
||||||
|
value = {
|
||||||
|
install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi";
|
||||||
|
installation_mode = "normal_installed";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
in
|
||||||
in
|
listToAttrs [
|
||||||
listToAttrs [
|
# Security / Privacy
|
||||||
# Security / Privacy
|
(extension "ublock-origin" "uBlock0@raymondhill.net")
|
||||||
(extension "ublock-origin" "uBlock0@raymondhill.net")
|
(extension "keepassxc-browser" "keepassxc-browser@keepassxc.org")
|
||||||
(extension "keepassxc-browser" "keepassxc-browser@keepassxc.org")
|
(extension "cookie-autodelete" "CookieAutoDelete@kennydo.com")
|
||||||
(extension "cookie-autodelete" "CookieAutoDelete@kennydo.com")
|
|
||||||
|
|
||||||
# Annoyances
|
# Annoyances
|
||||||
(extension "sponsorblock" "sponsorBlocker@ajay.app")
|
(extension "sponsorblock" "sponsorBlocker@ajay.app")
|
||||||
(extension "bandcamp-player-volume-control" "{308ec088-284a-40fe-ae14-7c917526f694}")
|
(extension "bandcamp-player-volume-control" "{308ec088-284a-40fe-ae14-7c917526f694}")
|
||||||
|
|
||||||
# UI / CSS
|
# UI / CSS
|
||||||
(extension "darkreader" "addon@darkreader.org")
|
(extension "darkreader" "addon@darkreader.org")
|
||||||
(extension "rsspreview" "{7799824a-30fe-4c67-8b3e-7094ea203c94}")
|
(extension "rsspreview" "{7799824a-30fe-4c67-8b3e-7094ea203c94}")
|
||||||
(extension "tree-style-tab" "treestyletab@piro.sakura.ne.jp")
|
(extension "tree-style-tab" "treestyletab@piro.sakura.ne.jp")
|
||||||
(extension "traduzir-paginas-web" "{036a55b4-5e72-4d05-a06c-cba2dfcc134a}")
|
(extension "traduzir-paginas-web" "{036a55b4-5e72-4d05-a06c-cba2dfcc134a}")
|
||||||
|
|
||||||
# Additional Functionality
|
# Additional Functionality
|
||||||
(extension "betterttv" "firefox@betterttv.net")
|
(extension "betterttv" "firefox@betterttv.net")
|
||||||
(extension "multi-account-containers" "@testpilot-containers")
|
(extension "multi-account-containers" "@testpilot-containers")
|
||||||
(extension "gumbo-twitch-companion" "{59a39734-1e66-452e-a7b8-cc79f72062f0}")
|
(extension "gumbo-twitch-companion" "{59a39734-1e66-452e-a7b8-cc79f72062f0}")
|
||||||
(extension "joplin-web-clipper" "{8419486a-54e9-11e8-9401-ac9e17909436}")
|
(extension "joplin-web-clipper" "{8419486a-54e9-11e8-9401-ac9e17909436}")
|
||||||
(extension "tab-reloader" "jid0-bnmfwWw2w2w4e4edvcdDbnMhdVg@jetpack")
|
(extension "tab-reloader" "jid0-bnmfwWw2w2w4e4edvcdDbnMhdVg@jetpack")
|
||||||
(extension "tab-session-manager" "Tab-Session-Manager@sienori")
|
(extension "tab-session-manager" "Tab-Session-Manager@sienori")
|
||||||
(extension "user-agent-string-switcher" "{a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7}")
|
(extension "user-agent-string-switcher" "{a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7}")
|
||||||
(extension "violentmonkey" "{aecec67f-0d10-4fa7-b7c7-609a2db280cf}")
|
(extension "violentmonkey" "{aecec67f-0d10-4fa7-b7c7-609a2db280cf}")
|
||||||
];
|
];
|
||||||
# To add additional extensions, find it on addons.mozilla.org, find
|
# To add additional extensions, find it on addons.mozilla.org, find
|
||||||
# the short ID in the url (like https://addons.mozilla.org/en-US/firefox/addon/!SHORT_ID!/)
|
# the short ID in the url (like https://addons.mozilla.org/en-US/firefox/addon/!SHORT_ID!/)
|
||||||
# Then, download the XPI by filling it in to the install_url template, unzip it,
|
# Then, download the XPI by filling it in to the install_url template, unzip it,
|
||||||
# run `jq .browser_specific_settings.gecko.id manifest.json` or
|
# run `jq .browser_specific_settings.gecko.id manifest.json` or
|
||||||
# `jq .applications.gecko.id manifest.json` to get the UUID
|
# `jq .applications.gecko.id manifest.json` to get the UUID
|
||||||
};
|
};
|
||||||
|
|
||||||
profiles.default = import
|
profiles.default = (import ./firefox-profile.nix { tablet = config.firefox.tablet; }) // {
|
||||||
./firefox-profile.nix // {
|
id = 0;
|
||||||
id = 0;
|
name = "default";
|
||||||
name = "default";
|
isDefault = true;
|
||||||
isDefault = true;
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
{ tablet }:
|
||||||
{
|
{
|
||||||
settings = {
|
settings = {
|
||||||
# data privacy
|
# data privacy
|
||||||
@@ -17,7 +18,7 @@
|
|||||||
# blank new tab
|
# blank new tab
|
||||||
"browser.newtabpage.enabled" = false;
|
"browser.newtabpage.enabled" = false;
|
||||||
# compact density
|
# compact density
|
||||||
"browser.uidensity" = 1;
|
"browser.uidensity" = if tablet then 2 else 1;
|
||||||
# dont draw tabs in titlebar
|
# dont draw tabs in titlebar
|
||||||
"browser.tabs.drawInTitlebar" = false;
|
"browser.tabs.drawInTitlebar" = false;
|
||||||
# autoscroll middleclick
|
# autoscroll middleclick
|
||||||
@@ -32,6 +33,9 @@
|
|||||||
"widget.use-xdg-desktop-portal.file-picker" = 1;
|
"widget.use-xdg-desktop-portal.file-picker" = 1;
|
||||||
# sidebar at right
|
# sidebar at right
|
||||||
"sidebar.position_start" = false;
|
"sidebar.position_start" = false;
|
||||||
|
# new sidebar
|
||||||
|
"sidebar.revamp" = if tablet then true else false;
|
||||||
|
"sidebar.verticalTabs" = if tablet then true else false;
|
||||||
# disable pocket
|
# disable pocket
|
||||||
"extensions.pocket.enabled" = false;
|
"extensions.pocket.enabled" = false;
|
||||||
# browser links should be new tab
|
# browser links should be new tab
|
||||||
|
|||||||
Reference in New Issue
Block a user