profiles and user refactor

This commit is contained in:
kat witch 2021-08-18 03:11:51 +01:00
parent 072cc571f9
commit c9bd5a3766
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
30 changed files with 153 additions and 213 deletions

View file

@ -1,5 +1,5 @@
{ config, ... }:
{
imports = [ ./firefox ./packages.nix ./gtk.nix ./foot.nix ./xdg.nix ./ranger.nix ./fonts.nix ];
imports = [ ./firefox.nix ./firefox-tst.nix ./packages.nix ./gtk.nix ./foot.nix ./xdg.nix ./ranger.nix ./fonts.nix ];
}

View file

@ -1,34 +1,7 @@
{ config, lib, pkgs, superConfig, ... }:
{ config, ... }:
let
commonSettings = {
"app.update.auto" = false;
"identity.fxaccounts.account.device.name" = superConfig.networking.hostName;
"signon.rememberSignons" = false;
"browser.download.lastDir" = "/home/kat/downloads";
"browser.urlbar.placeholderName" = "DuckDuckGo";
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"svg.context-properties.content.enabled" = true;
};
base16 = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb}")
config.lib.arc.base16.schemeForAlias.default;
in
{
programs.zsh.shellAliases = {
ff-pm = "firefox --ProfileManager";
ff-main = "firefox -P main";
};
programs.browserpass = {
enable = true;
browsers = [ "firefox" ];
};
home.sessionVariables = {
XDG_CURRENT_DESKTOP = "sway";
};
home.file.".mozilla/tst.css".text = ''
home.file.".mozilla/tst.css".text = let base16 = config.kw.hexColors; in ''
/* Hide border on tab bar, force its state to 'scroll', adjust margin-left for width of scrollbar. */
#tabbar { border: 0; overflow-y: scroll !important; }
@ -151,46 +124,4 @@ in
opacity: 0.5;
}
'';
programs.firefox = {
enable = true;
package = pkgs.firefox-wayland;
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
sponsorblock
floccus
link-cleaner
octotree
betterttv
canvasblocker
view-image
pkgs.nur.repos.crazazy.firefox-addons.new-tab-override
wappalyzer
auto-tab-discard
bitwarden
darkreader
decentraleyes
foxyproxy-standard
clearurls
df-youtube
old-reddit-redirect
privacy-badger
reddit-enhancement-suite
refined-github
stylus
temporary-containers
browserpass
tree-style-tab
multi-account-containers
ublock-origin
violentmonkey
];
profiles = {
main = {
id = 0;
isDefault = true;
settings = commonSettings // { };
userChrome = import ./userChrome.css.nix { profile = "main"; inherit base16; };
};
};
};
}

View file

@ -0,0 +1,70 @@
{ config, lib, pkgs, superConfig, ... }:
let
commonSettings = {
"app.update.auto" = false;
"identity.fxaccounts.account.device.name" = superConfig.networking.hostName;
"signon.rememberSignons" = false;
"browser.download.lastDir" = "/home/kat/downloads";
"browser.urlbar.placeholderName" = "DuckDuckGo";
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"svg.context-properties.content.enabled" = true;
};
in
{
programs.zsh.shellAliases = {
ff-pm = "firefox --ProfileManager";
ff-main = "firefox -P main";
};
programs.browserpass = {
enable = true;
browsers = [ "firefox" ];
};
home.sessionVariables = {
XDG_CURRENT_DESKTOP = "sway";
};
programs.firefox = {
enable = true;
package = pkgs.firefox-wayland;
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
sponsorblock
floccus
link-cleaner
octotree
betterttv
canvasblocker
view-image
pkgs.nur.repos.crazazy.firefox-addons.new-tab-override
wappalyzer
auto-tab-discard
bitwarden
darkreader
decentraleyes
foxyproxy-standard
clearurls
df-youtube
old-reddit-redirect
privacy-badger
reddit-enhancement-suite
refined-github
stylus
temporary-containers
browserpass
tree-style-tab
multi-account-containers
ublock-origin
violentmonkey
];
profiles = {
main = {
id = 0;
isDefault = true;
settings = commonSettings // { };
userChrome = import ./firefox-ucc.nix { profile = "main"; base16 = config.kw.hexColors; };
};
};
};
}

View file

@ -7,6 +7,5 @@
xdg.configFile."ranger/rc.conf".text = ''
set preview_images true
set preview_images_method iterm2
'';
}