add tablet modes for firefox and gnome
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
{ pkgs, ... }:
|
||||
{ pkgs, lib, ... }:
|
||||
with lib;
|
||||
{
|
||||
options.gnome.tablet = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = {
|
||||
services.xserver.enable = true;
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
@@ -13,5 +20,8 @@
|
||||
|
||||
environment.systemPackages = with pkgs.gnomeExtensions; [
|
||||
tray-icons-reloaded
|
||||
] ++ optionals config.gnome.tablet [
|
||||
touchup
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ in
|
||||
environment.plasma6.excludePackages = [ pkgs.kdePackages.discover ];
|
||||
|
||||
# For cursor in steam?
|
||||
xdg.icons.fallbackCursorThemes = [ "breeze_cursors" ];
|
||||
# xdg.icons.fallbackCursorThemes = [ "breeze_cursors" ];
|
||||
|
||||
programs.partition-manager.enable = true;
|
||||
|
||||
|
||||
@@ -17,8 +17,9 @@
|
||||
../../configuration/modules/gnome.nix
|
||||
];
|
||||
|
||||
networking.hostName = "starlite"; # Define your hostname.
|
||||
gnome.tablet = true;
|
||||
|
||||
networking.hostName = "starlite"; # Define your hostname.
|
||||
environment.systemPackages = with pkgs.gnomeExtensions; [
|
||||
touchup
|
||||
];
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
terminal.nixUpdateLocation = "/home/worble/Projects/nixos#starlite";
|
||||
terminal.flakeUpdateLocation = "/home/worble/Projects/nixos";
|
||||
firefox.tablet = true;
|
||||
|
||||
home.username = "worble";
|
||||
home.homeDirectory = "/home/worble";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{ pkgs, config, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
@@ -59,7 +59,7 @@
|
||||
# Let Home Manager install and manage itself.
|
||||
programs = {
|
||||
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;
|
||||
name = "work";
|
||||
isDefault = false;
|
||||
|
||||
@@ -8,15 +8,15 @@ with lib;
|
||||
|
||||
options.terminal = {
|
||||
nixUpdateLocation = mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
};
|
||||
flakeUpdateLocation = mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
};
|
||||
homeUpdateLocation = mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -4,7 +4,7 @@ with lib;
|
||||
{
|
||||
options.helix = {
|
||||
fullInstall = mkOption {
|
||||
type = lib.types.nullOr lib.types.bool;
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
@@ -17,10 +17,9 @@ with lib;
|
||||
settings = {
|
||||
theme = "dracula";
|
||||
};
|
||||
extraPackages = with pkgs;[ gcc ];
|
||||
}
|
||||
(mkIf config.helix.fullInstall {
|
||||
extraPackages = with pkgs;[
|
||||
gcc
|
||||
] ++ (optionals config.helix.fullInstall [
|
||||
#nix
|
||||
nixd
|
||||
nixpkgs-fmt
|
||||
@@ -53,7 +52,9 @@ with lib;
|
||||
] ++ (with nodePackages;[
|
||||
vscode-langservers-extracted
|
||||
typescript-language-server
|
||||
]);
|
||||
]));
|
||||
}
|
||||
(mkIf config.helix.fullInstall {
|
||||
languages = {
|
||||
language = [
|
||||
{
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
{ pkgs, ... }:
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
{
|
||||
options.firefox = {
|
||||
tablet = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
programs = {
|
||||
firefox = {
|
||||
enable = true;
|
||||
@@ -9,7 +18,7 @@
|
||||
"en-GB"
|
||||
];
|
||||
policies = {
|
||||
"DisplayMenuBar" = true;
|
||||
"DisplayMenuBar" = if config.firefox.tablet then false else true;
|
||||
"ExtensionSettings" = with builtins;
|
||||
let
|
||||
extension = shortId: uuid: {
|
||||
@@ -53,12 +62,12 @@
|
||||
# `jq .applications.gecko.id manifest.json` to get the UUID
|
||||
};
|
||||
|
||||
profiles.default = import
|
||||
./firefox-profile.nix // {
|
||||
profiles.default = (import ./firefox-profile.nix { tablet = config.firefox.tablet; }) // {
|
||||
id = 0;
|
||||
name = "default";
|
||||
isDefault = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{ tablet }:
|
||||
{
|
||||
settings = {
|
||||
# data privacy
|
||||
@@ -17,7 +18,7 @@
|
||||
# blank new tab
|
||||
"browser.newtabpage.enabled" = false;
|
||||
# compact density
|
||||
"browser.uidensity" = 1;
|
||||
"browser.uidensity" = if tablet then 2 else 1;
|
||||
# dont draw tabs in titlebar
|
||||
"browser.tabs.drawInTitlebar" = false;
|
||||
# autoscroll middleclick
|
||||
@@ -32,6 +33,9 @@
|
||||
"widget.use-xdg-desktop-portal.file-picker" = 1;
|
||||
# sidebar at right
|
||||
"sidebar.position_start" = false;
|
||||
# new sidebar
|
||||
"sidebar.revamp" = if tablet then true else false;
|
||||
"sidebar.verticalTabs" = if tablet then true else false;
|
||||
# disable pocket
|
||||
"extensions.pocket.enabled" = false;
|
||||
# browser links should be new tab
|
||||
|
||||
Reference in New Issue
Block a user