move large configs to separate location

This commit is contained in:
SHuRiKeN 2023-06-27 04:11:27 +05:30
parent 97c88ab004
commit 2e656193d4
3 changed files with 79 additions and 70 deletions

49
apps/firefox.nix Normal file
View file

@ -0,0 +1,49 @@
{ pkgs, lib, config, ... }:
{
programs.firefox = let
betterfox = pkgs.fetchFromGitHub {
owner = "yokoffing";
repo = "Betterfox";
rev = "68c1d0cefcda61812b023772198013c57363fd94";
hash = "sha256-xwTSYnXGxAMYZR7T1ROWChhdbd3dV/ndTzKo9PC7eLo=";
};
finalUserJS = lib.strings.concatStrings [
(builtins.readFile "${betterfox}/user.js")
];
in {
enable = true;
profiles.default = {
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
tabliss
canvasblocker
darkreader
metamask
];
extraConfig = finalUserJS;
search = {
engines = {
"Disroot" = {
urls = [{template = "https://search.disroot.org/search?q={searchTerms}"; }];
iconUpdateURL = "https://search.disroot.org/static/themes/beetroot/img/searxng.png";
updateInterval = 24 * 60 * 60 * 1000;
definedAliases = [ "@ds" ];
};
};
default = "Disroot";
force = true;
};
settings = {
"svg.context-properties.content.enabled" = true;
};
userChrome = ''
@import "firefox-gnome-theme/userChrome.css";
@import "firefox-gnome-theme/theme/colors/dark.css";
'';
userContent = ''
@import "firefox-gnome-theme/userContent.css;"
'';
};
};
}

26
apps/starship.nix Normal file
View file

@ -0,0 +1,26 @@
{
programs.starship = {
enable = true;
enableFishIntegration = true;
settings = {
username = {
style_user = "green bold";
style_root = "red bold";
format = "[$user]($style) ";
disabled = false;
show_always = true;
};
hostname = {
ssh_only = false;
format = "on [$hostname](bold purple) ";
trim_at = ".";
disabled = false;
};
character = {
success_symbol = "[](bold green)";
error_symbol = "[](bold red)";
};
};
};
}

View file

@ -1,6 +1,10 @@
{ config, lib, pkgs, ... }:
{
imports = [
./apps/starship.nix
./apps/firefox.nix
];
home.username = "shuriken";
home.homeDirectory = "/home/shuriken";
home.stateVersion = "23.05";
@ -22,30 +26,6 @@
enable = true;
};
programs.starship = {
enable = true;
enableFishIntegration = true;
settings = {
username = {
style_user = "green bold";
style_root = "red bold";
format = "[$user]($style) ";
disabled = false;
show_always = true;
};
hostname = {
ssh_only = false;
format = "on [$hostname](bold purple) ";
trim_at = ".";
disabled = false;
};
character = {
success_symbol = "[](bold green)";
error_symbol = "[](bold red)";
};
};
};
programs.git = {
enable = true;
userEmail = "shuriken@disroot.org";
@ -57,52 +37,6 @@
};
};
programs.firefox = let
betterfox = pkgs.fetchFromGitHub {
owner = "yokoffing";
repo = "Betterfox";
rev = "68c1d0cefcda61812b023772198013c57363fd94";
hash = "sha256-xwTSYnXGxAMYZR7T1ROWChhdbd3dV/ndTzKo9PC7eLo=";
};
finalUserJS = lib.strings.concatStrings [
(builtins.readFile "${betterfox}/user.js")
];
in {
enable = true;
profiles.default = {
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
tabliss
canvasblocker
darkreader
metamask
];
extraConfig = finalUserJS;
search = {
engines = {
"Disroot" = {
urls = [{template = "https://search.disroot.org/search?q={searchTerms}"; }];
iconUpdateURL = "https://search.disroot.org/static/themes/beetroot/img/searxng.png";
updateInterval = 24 * 60 * 60 * 1000;
definedAliases = [ "@ds" ];
};
};
default = "Disroot";
force = true;
};
settings = {
"svg.context-properties.content.enabled" = true;
};
userChrome = ''
@import "firefox-gnome-theme/userChrome.css";
@import "firefox-gnome-theme/theme/colors/dark.css";
'';
userContent = ''
@import "firefox-gnome-theme/userContent.css;"
'';
};
};
gtk = {
enable = true;
theme = {