1

enable firefox-gnome-theme

This commit is contained in:
2022-08-12 23:53:04 +02:00
parent 7c666b1276
commit e2a0c90a1b
7 changed files with 44 additions and 10 deletions

View File

@ -1,6 +1,7 @@
{ pkgs }:
{ inputs, pkgs }:
{
# vital-synth = pkgs.callPackage ./vital-synth {}; # Kept as an example, don't know if I will fix this or keep using distrho
cyberdrop-dl = pkgs.callPackage ./cyberdrop-dl {};
firefox-gnome-theme = pkgs.callPackage ./firefox-gnome-theme { src = inputs.firefox-gnome-theme; };
}

17
flake.lock generated
View File

@ -38,6 +38,22 @@
"type": "github"
}
},
"firefox-gnome-theme": {
"flake": false,
"locked": {
"lastModified": 1659056973,
"narHash": "sha256-Vxxxwi2XV3oys2xbjkt2RSHu0mPeEKX0x4ksI1ANVec=",
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"rev": "73c929f3b1583ef0053bda6a0353b17ade3b0c39",
"type": "github"
},
"original": {
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1642700792,
@ -201,6 +217,7 @@
"inputs": {
"devshell": "devshell",
"emacs-overlay": "emacs-overlay",
"firefox-gnome-theme": "firefox-gnome-theme",
"hardware": "hardware",
"home-manager": "home-manager",
"musnix": "musnix",

View File

@ -21,6 +21,9 @@
musnix.url = "github:musnix/musnix";
devshell.url = "github:numtide/devshell";
# nixvim.url = "github:pta2002/nixvim";
firefox-gnome-theme.url = "github:rafaelmardojai/firefox-gnome-theme";
firefox-gnome-theme.flake = false;
};
# Outputs is a function that takes the inputs as arguments.
@ -43,7 +46,7 @@
inputs.emacs-overlay.overlay
# All my own overlays
(import ./overlays { inherit nixpkgs; })
(import ./overlays { inherit nixpkgs inputs; })
];
};

View File

@ -42,6 +42,7 @@ in rec {
vaapi = true;
disableTabBar = true;
defaultBookmarks = true;
gnomeTheme = true;
};
fish.enable = true;
@ -136,6 +137,7 @@ in rec {
# Enable wayland
XDG_SESSION_TYPE = "wayland";
QT_QPA_PLATFORM = "wayland";
NIXOS_OZONE_WL = "1";
# Don't use system wine, use bottles
# WINEESYNC = 1;

View File

@ -1,4 +1,4 @@
{ config, nixosConfig, lib, pkgs, mylib, ... }:
{ inputs, config, nixosConfig, lib, pkgs, mylib, ... }:
{
imports = [

View File

@ -1,4 +1,4 @@
{ config, nixosConfig, lib, mylib, pkgs, ... }:
{ inputs, config, nixosConfig, lib, mylib, pkgs, ... }:
with lib;
with mylib.modules;
@ -13,6 +13,7 @@ in {
vaapi = mkBoolOpt false "Enable firefox vaapi support";
disableTabBar = mkBoolOpt false "Disable the firefox tab bar (for TST)";
defaultBookmarks = mkBoolOpt false "Preset standard bookmarks and folders";
gnomeTheme = mkBoolOpt false "Use Firefox gnome theme (rafaelmardojai)";
};
config = mkIf cfg.enable {
@ -24,6 +25,8 @@ in {
nvidia-vaapi-driver
vulkan-tools
])
(optionals cfg.gnomeTheme [ firefox-gnome-theme ])
];
home.sessionVariables = mkMerge [
@ -116,14 +119,17 @@ in {
id = 0; # 0 is default profile
userChrome = concatStringsSep "\n" [
(optionalString cfg.gnomeTheme ''
@import "${pkgs.firefox-gnome-theme}/share/firefox-gnome-theme/gnome-theme.css";
'')
(optionalString cfg.disableTabBar ''
#TabsToolbar {
display: none;
}
'')
#TabsToolbar { display: none; }
'')
];
settings = mkMerge [
# TODO: Fix vaapi
(optionalAttrs cfg.vaapi {
# Firefox wayland hardware video acceleration
# https://github.com/elFarto/nvidia-vaapi-driver/#firefox=
@ -134,12 +140,17 @@ in {
"media.rdd-ffmpeg.enabled" = true;
"media.av1.enabled" = false;
"gfx.x11-egl.force-enabled" = true;
"media.hardware-video-decoding.force-enabled" = true;
"layers.acceleration.force-enabled" = true;
})
# TODO: Check about:config and add missing stuff
{
"app.update.auto" = false;
# "browser.startup.homepage" = "https://lobste.rs";
"identity.fxaccounts.account.device.name" = nixosConfig.networking.hostName;
# Do not interfere with spotify
"media.hardwaremediakeys.enabled" = false;
# Enable ETP for decent security (makes firefox containers and many
# common security/privacy add-ons redundant).

View File

@ -1,9 +1,9 @@
{ nixpkgs, ... }:
{ inputs, nixpkgs, ... }:
let
# Taken from https://github.com/Misterio77/nix-config/blob/main/overlay/default.nix
# By specifying this we can just add our derivation to derivations/default.nix and it will land here
additions = final: prev: import ../derivations { pkgs = final; };
additions = final: prev: import ../derivations { inherit inputs; pkgs = final; };
in
# TODO: I have absolutely no clue what happens here lol