clean up librewolf more, hide more title bars, include vscode config for notgne2

This commit is contained in:
notgne2 2022-02-04 00:34:47 -07:00
parent 7bed334ae1
commit aecd75e5a1
No known key found for this signature in database
GPG Key ID: BB661E172B42A7F8
4 changed files with 116 additions and 18 deletions

View File

@ -39,7 +39,7 @@
extraOptions = '' extraOptions = ''
builders-use-substitutes = true builders-use-substitutes = true
experimental-features = nix-command flakes ca-references experimental-features = nix-command flakes
keep-outputs = true keep-outputs = true
keep-derivations = true keep-derivations = true
''; '';

View File

@ -50,6 +50,14 @@
url = "github:migueravila/SimpleFox"; url = "github:migueravila/SimpleFox";
flake = false; flake = false;
}; };
direnv-vscode = {
inputs.nixpkgs.follows = "nixpkgs";
url = github:direnv/direnv-vscode/nix/npm;
};
npmlock2nix = {
url = github:nix-community/npmlock2nix;
flake = false;
};
}; };
outputs = { self, nixpkgs, ... }@inputs: { outputs = { self, nixpkgs, ... }@inputs: {

View File

@ -36,44 +36,56 @@ in
profiles.default = profiles.default =
let let
base16Ify = lib.replaceStrings customize = lib.replaceStrings
(if config.colors.enable then [ (if config.colors.enable then [
"#19171a" "#19171a"
"#201e21" "#201e21"
"#dedede" "#dedede"
".urlbarView {\n display: none !important;\n}"
".tabbrowser-tab:not([pinned]) .tab-icon-image {\n display: none !important;\n}"
] else [ ]) ] else [ ])
(if config.colors.enable then [ (if config.colors.enable then [
"#${config.colors.base16.base00}" "#${config.colors.base16.base00}"
"#${config.colors.base16.base01}" "#${config.colors.base16.base01}"
"#${config.colors.base16.base05}" "#${config.colors.base16.base05}"
""
""
] else [ ]); ] else [ ]);
in in
{ {
settings = { settings = {
"browser.startup.homepage" = "https://wizbos.club"; "browser.startup.homepage" = "https://wizbos.club";
# Make the browser usable, if I wanted autism privacy, I would use TOR browser.
"privacy.resistFingerprinting" = false; "privacy.resistFingerprinting" = false;
"webgl.disabled" = false; "webgl.disabled" = false;
"privacy.clearOnShutdown.history" = false; "privacy.clearOnShutdown.history" = false;
"privacy.clearOnShutdown.cookies" = false;
"privacy.clearOnShutdown.sessions" = false;
"privacy.clearOnShutdown.cache" = false;
"places.history.enabled" = true; "places.history.enabled" = true;
# Make Jitsi work sanely
"media.setsinkid.enabled" = true; "media.setsinkid.enabled" = true;
"privacy.webrtc.legacyGlobalIndicator" = false; "privacy.webrtc.legacyGlobalIndicator" = false;
"privacy.webrtc.hideGlobalIndicator" = true; "privacy.webrtc.hideGlobalIndicator" = true;
# Required by SimpleFox, and good regardless
"toolkit.legacyUserProfileCustomizations.stylesheets" = true; "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"layers.acceleration.force-enabled" = true; "layers.acceleration.force-enabled" = true;
"gfx.webrender.all" = true; "gfx.webrender.all" = true;
"svg.context-properties.content.enabled" = true; "svg.context-properties.content.enabled" = true;
# Make Firefox dark, the reader is always light by default, and the GTK-inferred theme conflicts with SimpleFox (and our customizations)
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org"; "extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
"reader.color_scheme" = "dark";
# "general.useragent.override" = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:94.0) Gecko/20100101 Firefox/94.0"; # LibreWolf ruins the user agent making sites unusable without RFP, so use the user agent from RFP manually. This also seems sane for compatibility when using Firefox.
"general.useragent.override" = "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"; "general.useragent.override" = "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0";
}; };
userContent = base16Ify (builtins.readFile "${inputs.simplefox}/chrome/userContent.css"); userChrome = customize (builtins.readFile "${inputs.simplefox}/chrome/userChrome.css");
userChrome = base16Ify (builtins.readFile "${inputs.simplefox}/chrome/userChrome.css"); userContent = builtins.readFile "${inputs.simplefox}/chrome/userContent.css";
}; };
}; };
@ -96,27 +108,17 @@ in
gnomeExtensions.improved-workspace-indicator gnomeExtensions.improved-workspace-indicator
gnomeExtensions.vitals gnomeExtensions.vitals
gnomeExtensions.clipboard-indicator gnomeExtensions.clipboard-indicator
# (gnomeExtensions.no-title-bar.overrideAttrs (old: { gnomeExtensions.gtk-title-bar
# src = builtins.fetchGit {
# rev = "1e6647d1bf03559cd574f34aa2439b942cc94c60";
# url = "git+ssh://git@github.com/poehlerj/no-title-bar.git";
# };
# patches = old.patches ++ [
# (pkgs.fetchurl {
# url = "https://patch-diff.githubusercontent.com/raw/poehlerj/no-title-bar/pull/37.patch";
# sha256 = "sha256-4gUv7U8mtSDQ2aSlVALxMpLvLWUcf0Gd8N2xIGQ4LGQ=";
# })
# ];
# }))
gnomeExtensions.just-perfection gnomeExtensions.just-perfection
gnomeExtensions.appindicator gnomeExtensions.appindicator
gnomeExtensions.compiz-windows-effect
]; ];
systemd.user.sessionVariables = { systemd.user.sessionVariables = {
QT_QPA_PLATFORM = "wayland-egl;xcb"; QT_QPA_PLATFORM = "wayland-egl;xcb";
MOZ_ENABLE_WAYLAND = "1"; MOZ_ENABLE_WAYLAND = "1";
QT_WAYLAND_DISABLE_WINDOWDECORATION = lib.mkIf cfg.tiling "1"; QT_WAYLAND_DISABLE_WINDOWDECORATION = lib.mkIf cfg.tiling "1";
NIXOS_OZONE_WL = "1";
}; };
xdg.mimeApps = { xdg.mimeApps = {
@ -202,6 +204,7 @@ in
"just-perfection-desktop@just-perfection" "just-perfection-desktop@just-perfection"
"appindicatorsupport@rgcjonas.gmail.com" "appindicatorsupport@rgcjonas.gmail.com"
"launch-new-instance@gnome-shell-extensions.gcampax.github.com" "launch-new-instance@gnome-shell-extensions.gcampax.github.com"
"gtktitlebar@velitasali.github.io"
]; ];
}; };
"org/gnome/desktop/peripherals/touchpad" = { "org/gnome/desktop/peripherals/touchpad" = {
@ -211,6 +214,9 @@ in
edge-tiling = !cfg.tiling; edge-tiling = !cfg.tiling;
dynamic-workspaces = !cfg.tiling; dynamic-workspaces = !cfg.tiling;
}; };
"org/gnome/shell/extensions/gtktitlebar" = {
hide-window-titlebars = "always";
};
"org/gnome/shell/extensions/blur-me" = { "org/gnome/shell/extensions/blur-me" = {
toggle-app-blur = false; toggle-app-blur = false;
}; };

View File

@ -24,6 +24,90 @@ in
nixpkgs-fmt nixpkgs-fmt
]; ];
programs.vscode = {
userSettings = {
"editor.bracketPairColorization.enabled" = true;
"editor.guides.bracketPairs" = "active";
"window.menuBarVisibility" = "toggle";
"workbench.sideBar.location" = "right";
"vim.overrideCopy" = true;
"vim.useSystemClipboard" = true;
"vim.easymotion" = true;
"vim.sneak" = true;
"vim.hlsearch" = true;
"vim.normalModeKeyBindings" = [
{
before = [ "<Tab>" ];
commands = [ "workbench.action.nextEditorInGroup" ];
}
{
before = [ "<S-Tab>" ];
commands = [ "workbench.action.previousEditorInGroup" ];
}
];
"nix.formatterPath" = "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt";
"nix.serverPath" = "${pkgs.rnix-lsp}/bin/rnix-lsp";
"nix.enableLanguageServer" = true;
"rust-client.disableRustup" = true;
"editor.formatOnSave" = true;
};
extensions = with pkgs.vscode-extensions; [
vscodevim.vim
jnoortheen.nix-ide
haskell.haskell
justusadam.language-haskell
(
let
attrs = lib.importJSON "${inputs.direnv-vscode}/package.json";
inherit (attrs) name version;
vsix = "${name}-${version}.vsix";
npm = pkgs.callPackage "${inputs.npmlock2nix}/internal.nix" { nodejs = pkgs.nodejs-14_x; };
node_modules_attrs = {
buildInputs =
if pkgs.stdenv.isDarwin
then [ pkgs.python3 ]
else [ pkgs.python3 pkgs.pkg-config pkgs.libsecret ];
};
wtf =
npm.build {
src = "${inputs.direnv-vscode}";
inherit node_modules_attrs;
buildCommands = [ "echo y | npm run package" ];
installPhase = ''
mv ${vsix} $out
'';
};
in
pkgs.runCommand "wtf-fix-direnv-vscode" { } ''
mkdir -p $out/share/vscode/extensions
mkdir $out/ext
cd $out/ext
${pkgs.unzip}/bin/unzip ${wtf}
mv extension $out/share/vscode/extensions/vscode
''
)
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
{
name = "rust";
publisher = "rust-lang";
version = "0.7.8";
sha256 = "sha256-Y33agSNMVmaVCQdYd5mzwjiK5JTZTtzTkmSGTQrSNg0=";
}
{
name = "vscode-autohide";
publisher = "sirmspencer";
version = "1.0.7";
sha256 = "sha256-VaG/eTE2BGbHAYgFdS31c47rgLZVjHGK+/U8MSYKDt8=";
}
];
};
xdg.configFile."nvim/coc-settings.json".source = pkgs.writeText "coc-settings.json" (builtins.toJSON { xdg.configFile."nvim/coc-settings.json".source = pkgs.writeText "coc-settings.json" (builtins.toJSON {
languageserver = { languageserver = {
nix = { nix = {