Files
nixos/home/modules/gui.nix
T

121 lines
2.8 KiB
Nix
Raw Normal View History

2024-02-26 11:39:56 -06:00
{ config, pkgs, lib, ... }:
let
cfg = config.greg.gui;
excludes = systems: opts: (
if ( builtins.all (x: pkgs.system != x) systems ) then opts else []
);
# For now, we ignore this and don't install it
2024-08-09 03:36:36 -05:00
ffPkgs = pkgs.firefox.override { cfg.enableGnomeExtensions = true; };
2024-02-26 11:39:56 -06:00
vars = {
2024-04-22 17:41:29 -05:00
XDG_CURRENT_DESKTOP = "GNOME";
2024-02-26 11:39:56 -06:00
};
in {
options.greg.gui = lib.mkEnableOption "Enable GUI programs";
config = (lib.mkIf cfg {
# These packages are Linux only
home.packages = with pkgs; ( excludes ["x86_64-darwin" "aarch64-darwin"]
[
cdrtools
2024-08-18 00:10:32 -05:00
element-desktop
2024-07-15 14:38:57 -05:00
freetube
2024-03-11 09:50:12 -05:00
qpwgraph
2024-02-26 11:39:56 -06:00
vlc
x265
]) ++
# x86_64-linux only
( excludes ["x86_64-darwin" "aarch64-darwin" "aarch64-linux"]
[
bitwarden
discord
endeavour
gnucash
jellyfin-media-player
#logseq
nextcloud-client
slack
]) ++
# Items that are not supported on ARM/Linux
( excludes ["aarch64-linux"]
[
onlyoffice-bin
synology-drive-client
zoom-us
]);
programs.firefox = {
enable = (! pkgs.stdenv.hostPlatform.isDarwin);
2024-08-09 03:36:36 -05:00
package = ffPkgs;
2024-08-21 16:14:51 -05:00
policies = {
DisableAppUpdate = true;
};
2024-02-26 11:39:56 -06:00
profiles = {
default = {
2024-08-21 16:14:51 -05:00
bookmarks = import ./gui/bookmarks.nix;
2024-08-09 03:36:36 -05:00
id = 0;
2024-08-21 16:14:51 -05:00
isDefault = true;
search = {
default = "DuckDuckGo";
force = true;
engines = {
Google.metaData.alias = "@g";
"Nix Packages" = {
urls = [{
template = "https://search.nixos.org/packages";
params = [
{ name = "type"; value = "packages"; }
{ name = "query"; value = "{searchTerms}"; }
];
}];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
};
"Nix Options" = {
urls = [{
template = "https://search.nixos.org/options";
params = [
{ name = "type"; value = "packages"; }
{ name = "query"; value = "{searchTerms}"; }
];
}];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@no" ];
};
};
};
2024-02-26 11:39:56 -06:00
settings = {
"app.update.auto" = false;
"browser.ctrlTab.sortByRecentlyUsed" = true;
"browser.startup.page" = 3;
"browser.startup.homepage" = "https://thehellings.com";
"doh-rollout.doorhanger-decision" = "UIDisabled";
"doh-rollout.doneFirstRun" = true;
"signon.rememberSignons" = false;
};
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
bitwarden
gsconnect
foxyproxy-standard
multi-account-containers
octotree
2024-09-06 09:38:58 -05:00
okta-browser-plugin
2024-02-26 11:39:56 -06:00
refined-github
tree-style-tab
ublock-origin
];
};
};
};
# This is supposed to be in support of Firefox, but I dunno...
programs.bash.sessionVariables = vars;
programs.xonsh.sessionVariables = vars;
});
}