programs: rename web-browser -> firefox

This commit is contained in:
Colin 2023-07-15 08:51:36 +00:00
parent 55d64eb598
commit 77e5f82b31
5 changed files with 21 additions and 17 deletions

View File

@ -24,16 +24,6 @@
sops.secrets.colin-passwd.neededForUsers = true;
sane.programs.web-browser.config = {
# compromise impermanence for the sake of usability
persistCache = "private";
persistData = "private";
# i don't do crypto stuff on moby
addons.ether-metamask.enable = false;
# addons.sideberry.enable = false;
};
sane.user.persist.plaintext = [
# TODO: make this just generally conditional upon pulse being enabled?
".config/pulse" # persist pulseaudio volume

View File

@ -1,5 +1,19 @@
# this file configures preferences per program, without actually enabling any programs.
# the goal is to separate the place where we decide *what* to use (i.e. `sane.programs.firefox.enable = true` -- at the toplevel)
# from where we specific how that thing should behave *if* it's in use.
{ pkgs, sane-lib, ... }:
{
sane.programs.firefox.config = {
# compromise impermanence for the sake of usability
persistCache = "private";
persistData = "private";
# i don't do crypto stuff on moby
addons.ether-metamask.enable = false;
# addons.sideberry.enable = false;
};
sane.gui.sxmo = {
settings = {
### hardware: touch screen

View File

@ -7,6 +7,7 @@
./cozy.nix
./epiphany.nix
./evince.nix
./firefox.nix
./fontconfig.nix
./git.nix
./gnome-feeds.nix
@ -35,7 +36,6 @@
./sublime-music.nix
./tangram.nix
./vlc.nix
./web-browser.nix
./wireshark.nix
./zeal.nix
./zsh

View File

@ -9,7 +9,7 @@
{ config, lib, pkgs, ...}:
with lib;
let
cfg = config.sane.programs.web-browser.config;
cfg = config.sane.programs.firefox.config;
# allow easy switching between firefox and librewolf with `defaultSettings`, below
librewolfSettings = {
browser = pkgs.librewolf-unwrapped;
@ -144,11 +144,11 @@ in
{
config = mkMerge [
({
sane.programs.web-browser.configOption = mkOption {
sane.programs.firefox.configOption = mkOption {
type = types.submodule configOpts;
default = {};
};
sane.programs.web-browser.config.addons = {
sane.programs.firefox.config.addons = {
# get names from:
# - ~/ref/nix-community/nur-combined/repos/rycee/pkgs/firefox-addons/generated-firefox-addons.nix
# `wget ...xpi`; `unar ...xpi`; `cat */manifest.json | jq '.browser_specific_settings.gecko.id'`
@ -190,7 +190,7 @@ in
};
})
({
sane.programs.web-browser = {
sane.programs.firefox = {
inherit package;
mime = let
@ -246,7 +246,7 @@ in
'';
};
})
(mkIf config.sane.programs.web-browser.enabled {
(mkIf config.sane.programs.firefox.enabled {
# TODO: move the persistence into the sane.programs API (above)
# flush the cache to disk to avoid it taking up too much tmp.
sane.user.persist.byPath."${cfg.browser.cacheDir}".store =

View File

@ -11,8 +11,8 @@
sane.programs.guiApps = {
package = null;
suggestedPrograms = [
"firefox"
"tuiApps"
"web-browser"
] ++ lib.optional (pkgs.system == "x86_64-linux") "x86GuiApps"
++ [
# "celluloid" # mpv frontend