added stuff

This commit is contained in:
vali 2024-04-09 23:11:33 +02:00
commit 7d4f626b7d
907 changed files with 70990 additions and 0 deletions

View file

@ -0,0 +1,88 @@
{
lib,
pkgs,
osConfig,
...
}: let
inherit (lib) mkIf optionals concatStringsSep;
inherit (osConfig) modules;
env = modules.usrEnv;
sys = modules.system;
prg = sys.programs;
in {
config = mkIf prg.chromium.enable {
programs.chromium = {
enable = true;
extensions = [
{id = "mnjggcdmjocbbbhaepdhchncahnbgone";} # sponsor block
{id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";} # ublock
{id = "nngceckbapebfimnlniiiahkandclblb";} # bitwarden
{id = "iaiomicjabeggjcfkbimgmglanimpnae";} # tab manager
];
package = pkgs.ungoogled-chromium.override {
nss = pkgs.nss_latest;
commandLineArgs =
[
# Ungoogled features
"--disable-search-engine-collection"
"--extension-mime-request-handling=always-prompt-for-install"
"--fingerprinting-canvas-image-data-noise"
"--fingerprinting-canvas-measuretext-noise"
"--fingerprinting-client-rects-noise"
"--popups-to-tabs"
"--show-avatar-button=incognito-and-guest"
# Experimental features
"--enable-features=${
concatStringsSep "," [
"BackForwardCache:enable_same_site/true"
"CopyLinkToText"
"OverlayScrollbar"
"TabHoverCardImages"
"VaapiVideoDecoder"
]
}"
# Aesthetics
"--force-dark-mode"
# Performance
"--enable-gpu-rasterization"
"--enable-oop-rasterization"
"--enable-zero-copy"
"--ignore-gpu-blocklist"
# Etc
# "--gtk-version=4"
"--disk-cache=$XDG_RUNTIME_DIR/chromium-cache"
"--no-default-browser-check"
"--no-service-autorun"
"--disable-features=PreloadMediaEngagementData,MediaEngagementBypassAutoplayPolicies"
"--disable-reading-from-canvas"
"--no-pings"
"--no-first-run"
"--no-experiments"
"--no-crash-upload"
"--disable-wake-on-wifi"
"--disable-breakpad"
"--disable-sync"
"--disable-speech-api"
"--disable-speech-synthesis-api"
]
++ optionals env.isWayland [
# Wayland
# Disabled because hardware acceleration doesn't work
# when disabling --use-gl=egl, it's not gonna show any emoji
# and it's gonna be slow as hell
# "--use-gl=egl"
"--ozone-platform=wayland"
"--enable-features=UseOzonePlatform"
];
};
};
};
}

View file

@ -0,0 +1,15 @@
{
imports = [
./chromium
./discord
./element
./obs
./office
./schizofox
./spotify
./thunderbird
./vscode
./webcord
./zathura
];
}

View file

@ -0,0 +1,32 @@
{
osConfig,
lib,
pkgs,
...
}: let
inherit (lib) mkIf;
inherit (osConfig) modules;
sys = modules.system;
prg = sys.programs;
discord-wrapped =
(pkgs.discord-canary.override {
nss = pkgs.nss_latest;
withOpenASAR = true;
withVencord = true;
})
.overrideAttrs (old: {
libPath = old.libPath + ":${pkgs.libglvnd}/lib";
nativeBuildInputs = old.nativeBuildInputs ++ [pkgs.makeWrapper];
postFixup = ''
wrapProgram $out/opt/DiscordCanary/DiscordCanary \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland}}"
'';
});
in {
config = mkIf prg.discord.enable {
home.packages = [discord-wrapped];
};
}

View file

@ -0,0 +1,32 @@
{
osConfig,
pkgs,
lib,
...
}: let
inherit (lib) mkIf;
inherit (osConfig) modules;
sys = modules.system;
prg = sys.programs;
in {
config = mkIf prg.element.enable {
home.packages = [pkgs.element-desktop];
xdg.configFile = {
"Element/config.json".text = builtins.toJSON {
default_server_config = {
"m.homeserver" = {
base_url = "https://notashelf.dev";
server_name = "notashelf.dev";
};
"m.identity_server" = {base_url = "";};
};
show_labs_settings = true;
default_theme = "dark";
};
};
};
}

View file

@ -0,0 +1,26 @@
{
lib,
pkgs,
osConfig,
...
}: let
inherit (lib) mkIf;
inherit (osConfig) modules;
sys = modules.system;
prg = sys.programs;
in {
config = mkIf prg.obs.enable {
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins;
[
obs-gstreamer
obs-pipewire-audio-capture
obs-vkcapture
]
++ optional env.isWayland
pkgs.obs-studio-plugins.wlrobs;
};
};
}

View file

@ -0,0 +1,22 @@
{
osConfig,
pkgs,
lib,
...
}: let
inherit (lib) mkIf;
inherit (osConfig) modules;
sys = modules.system;
prg = sys.programs;
in {
config = mkIf prg.libreoffice.enable {
home.packages = with pkgs; [
libreoffice-qt
hyphen # text hyphenation library
hunspell
hunspellDicts.en_US-large
hunspellDicts.en_GB-large
];
};
}

View file

@ -0,0 +1,97 @@
{
self',
inputs,
osConfig,
lib,
...
}: let
inherit (lib) mkIf;
inherit (osConfig) modules;
sys = modules.system;
prg = sys.programs;
in {
imports = [inputs.schizofox.homeManagerModule];
config = mkIf prg.firefox.enable {
programs.schizofox = {
enable = true;
theme = {
font = "Inter";
colors = {
background-darker = "181825";
background = "1e1e2e";
foreground = "cdd6f4";
};
};
search = rec {
defaultSearchEngine = "Searxng";
removeEngines = ["Bing" "Amazon.com" "eBay" "Twitter" "Wikipedia" "LibRedirect" "DuckDuckGo"];
searxUrl = "https://search.notashelf.dev";
searxQuery = "${searxUrl}/search?q={searchTerms}&categories=general";
addEngines = [
{
Name = "Searxng";
Description = "Decentralized search engine";
Alias = "sx";
Method = "GET";
URLTemplate = "${searxQuery}";
}
];
};
security = {
sanitizeOnShutdown = false;
sandbox = true;
noSessionRestore = false;
userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0";
};
misc = {
drmFix = true;
disableWebgl = false;
startPageURL = "file://${self'.packages.schizofox-startpage.outPath}/index.html";
bookmarks = [
{
Title = "Nyx";
URL = "https://github.com/NotAShelf/nyx";
Placement = "toolbar";
Folder = "Github";
}
];
};
extensions = {
simplefox.enable = true;
darkreader.enable = true;
extraExtensions = let
mkUrl = name: "https://addons.mozilla.org/firefox/downloads/latest/${name}/latest.xpi";
extensions = [
{
id = "1018e4d6-728f-4b20-ad56-37578a4de76";
name = "flagfox";
}
{
id = "{c2c003ee-bd69-42a2-b0e9-6f34222cb046}";
name = "auto-tab-discard";
}
{
id = "{a4c4eda4-fb84-4a84-b4a1-f7c1cbf2a1ad}";
name = "refined-github-";
}
{
id = "sponsorBlocker@ajay.app";
name = "sponsorblock";
}
{
id = "{446900e4-71c2-419f-a6a7-df9c091e268b}";
name = "bitwarden-password-manager";
}
];
extraExtensions = builtins.foldl' (acc: ext: acc // {ext.id = {install_url = mkUrl ext.name;};}) {} extensions;
in
extraExtensions;
};
};
};
}

View file

@ -0,0 +1,50 @@
{
lib,
osConfig,
inputs,
self',
pkgs,
...
}: let
inherit (lib) mkIf;
inherit (osConfig) modules;
sys = modules.system;
prg = sys.programs;
spicePkgs = inputs.spicetify.packages.${pkgs.system}.default;
in {
imports = [inputs.spicetify.homeManagerModule];
config = mkIf prg.spotify.enable {
programs.spicetify = {
spotifyPackage = self'.packages.spotify-wrapped;
enable = true;
injectCss = true;
replaceColors = true;
overwriteAssets = true;
sidebarConfig = true;
enabledCustomApps = with spicePkgs.apps; [
lyrics-plus
new-releases
];
theme = spicePkgs.themes.catppuccin;
colorScheme = "mocha";
enabledExtensions = with spicePkgs.extensions; [
fullAppDisplay
shuffle # shuffle+ (special characters are sanitized out of ext names)
hidePodcasts
playlistIcons
lastfm
genre
historyShortcut
bookmark
fullAlbumDate
groupSession
popupLyrics
];
};
};
}

View file

@ -0,0 +1,53 @@
{
osConfig,
pkgs,
lib,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.meta) getExe';
inherit (osConfig) modules;
sys = modules.system;
prg = sys.programs;
in {
config = mkIf prg.thunderbird.enable {
home.packages = with pkgs; [birdtray thunderbird];
programs.thunderbird = {
enable = true;
profiles."notashelf" = {
isDefault = true;
userChrome = "";
userContent = "";
withExternalGnupg = true;
};
};
/*
systemd.user.services = {
"birdtray" = {
Install.WantedBy = ["graphical-session.target"];
Service = {
ExecStart = "${getExe' pkgs.birdtray "birdtray"}";
Restart = "always";
# runtime
RuntimeDirectory = "ags";
ProtectSystem = "strict";
ProtectHome = "read-only";
};
Unit = {
Description = "mail system tray notification icon for Thunderbird ";
After = ["graphical-session-pre.target"];
PartOf = [
"tray.target"
"graphical-session.target"
];
};
};
};
*/
};
}

View file

@ -0,0 +1,49 @@
{lib, ...}: let
inherit (lib.generators) toJSON;
extensions = toJSON {} {
"default-theme@mozilla.org" = "5787f490-29b8-436e-a111-640da8590790";
"google@search.mozilla.org" = "cc340383-7068-4b32-a10f-9f19334bfebc";
"ddg@search.mozilla.org" = "0c340210-f7ab-48e8-9778-600ed5d00160";
"amazondotcom@search.mozilla.org" = "881d8fdf-5772-4e33-81ff-faac2d1fa92c";
"wikipedia@search.mozilla.org" = "7ea3d39d-3eea-430f-9bd7-f902d8124d45";
"bing@search.mozilla.org" = "f480cce8-68af-4082-908e-f8996153352b";
"addon@darkreader.org" = "71d6c69d-55f9-4c56-888c-abdcf6efd73d";
"lightningcalendartabs@jlx.84" = "12d48e41-412e-4d09-835a-fa6fb8c180eb";
};
in {
programs.thunderbird.profiles."notashelf".settings = {
"calendar.timezone.useSystemTimezone" = true;
"datareporting.healthreport.uploadEnabled" = false;
"extensions.ui.locale.hidden" = true;
"extensions.webextensions.ExtensionStorageIDB.migrated.addon@darkreader.org" = true;
"extensions.webextensions.uuids" = extensions;
"mail.account.lastKey" = 5;
"mail.close_message_window.on_delete.disabled" = false;
"mail.e2ee.auto_enable" = true;
"mail.imap.chunk_size" = 106496;
"mail.imap.min_chunk_size_threshold" = 159744;
"mail.mdn.report.enabled" = false;
"mail.openMessageBehavior.version" = 1;
"mail.pane_config.dynamic" = 2;
"mail.purge_threshhold_mb" = 20;
"mail.purge_threshold_migrated" = true;
"mail.spam.manualMark" = true;
"mail.spam.version" = 1;
"mail.startup.enabledMailCheckOnce" = true;
"mailnews.mark_message_read.delay" = true;
"mailnews.mark_message_read.delay.interval" = 3;
"mailnews.tags.$label1.color" = "#FF0000";
"mailnews.tags.$label1.tag" = "Important";
"mailnews.tags.$label2.color" = "#FF9900";
"mailnews.tags.$label2.tag" = "Work";
"mailnews.tags.$label3.color" = "#009900";
"mailnews.tags.$label3.tag" = "Personal";
"mailnews.tags.$label4.color" = "#3333FF";
"mailnews.tags.$label4.tag" = "To Do";
"mailnews.tags.$label5.color" = "#993399";
"mailnews.tags.$label5.tag" = "Later";
"pdfjs.enabledCache.state" = true;
"privacy.donottrackheader.enabled" = true;
"privacy.purge_trackers.date_in_cookie_database" = "0";
};
}

View file

@ -0,0 +1,139 @@
{
lib,
pkgs,
osConfig,
...
}: let
inherit (lib) mkIf;
inherit (osConfig) modules;
sys = modules.system;
prg = sys.programs;
in {
config = mkIf prg.vscode.enable {
programs.vscode = {
enable = true;
enableExtensionUpdateCheck = true;
enableUpdateCheck = true;
extensions = with pkgs.vscode-extensions;
[
arrterian.nix-env-selector
bbenoist.nix
catppuccin.catppuccin-vsc
christian-kohler.path-intellisense
dbaeumer.vscode-eslint
eamodio.gitlens
esbenp.prettier-vscode
formulahendry.code-runner
golang.go
ibm.output-colorizer
kamadorueda.alejandra
ms-azuretools.vscode-docker
ms-python.python
ms-python.vscode-pylance
ms-vscode-remote.remote-ssh
ms-vscode.cpptools
naumovs.color-highlight
svelte.svelte-vscode
ms-vsliveshare.vsliveshare
oderwat.indent-rainbow
pkief.material-icon-theme
rust-lang.rust-analyzer
shardulm94.trailing-spaces
sumneko.lua
timonwong.shellcheck
usernamehw.errorlens
xaver.clang-format
yzhang.markdown-all-in-one
james-yu.latex-workshop
redhat.vscode-yaml
ms-azuretools.vscode-docker
irongeek.vscode-env
github.vscode-pull-request-github
github.codespaces
astro-build.astro-vscode
WakaTime.vscode-wakatime
]
++ [
pkgs.vscode-extensions."2gua".rainbow-brackets
]
++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
{
name = "copilot-nightly";
publisher = "github";
version = "1.67.7949";
sha256 = "sha256-ZtUqQeWjXmTz49DUeYkuqSTdVHRC8OfgWv8fuhlHDVc=";
}
{
name = "volar";
publisher = "vue";
version = "1.0.12";
sha256 = "sha256-D9E3KRUOlNVXH4oMv1W0+/mbqO8Se7+6E2F5P/KvCro=";
}
{
name = "vscode-typescript-vue-plugin";
publisher = "vue";
version = "1.0.12";
sha256 = "sha256-WiL+gc9+U861ubLlY/acR+ZcrFT7TdIDR0K1XNNidX8=";
}
{
name = "decay";
publisher = "decaycs";
version = "1.0.6";
sha256 = "sha256-Jtxj6LmHgF7UNaXtXxHkq881BbuPtIJGxR7kdhKr0Uo=";
}
{
name = "vscode-typescript-next";
publisher = "ms-vscode";
version = "5.0.202301100";
sha256 = "sha256-8d/L9F06ZaS9dTOXV6Q40ivI499nfZLQURcLdHXoTSM=";
}
{
name = "vscode-chromium-vector-icons";
publisher = "adolfdaniel";
version = "1.0.2";
sha256 = "sha256-Meo53e/3jUP6YDEXOA/40xghI77jj4iAQus3/S8RPZI=";
}
];
userSettings = {
"workbench.iconTheme" = "material-icon-theme";
"workbench.colorTheme" = "Catppuccin Macchiato";
"catppuccin.accentColor" = "mauve";
"editor.fontFamily" = "JetBrainsMono Nerd Font, Material Design Icons, 'monospace', monospace";
"editor.fontSize" = 16;
"editor.fontLigatures" = true;
"workbench.fontAliasing" = "antialiased";
"files.trimTrailingWhitespace" = true;
"terminal.integrated.fontFamily" = "JetBrainsMono Nerd Font Mono";
"window.titleBarStyle" = "custom";
"terminal.integrated.automationShell.linux" = "nix-shell";
"terminal.integrated.defaultProfile.linux" = "zsh";
"terminal.integrated.cursorBlinking" = true;
"terminal.integrated.enableBell" = false;
"editor.formatOnPaste" = true;
"editor.formatOnSave" = true;
"editor.formatOnType" = false;
"editor.minimap.enabled" = false;
"editor.minimap.renderCharacters" = false;
"editor.overviewRulerBorder" = false;
"editor.renderLineHighlight" = "all";
"editor.inlineSuggest.enabled" = true;
"editor.smoothScrolling" = true;
"editor.suggestSelection" = "first";
"editor.guides.indentation" = true;
"editor.guides.bracketPairs" = true;
"editor.bracketPairColorization.enabled" = true;
"window.nativeTabs" = true;
"window.restoreWindows" = "all";
"window.menuBarVisibility" = "toggle";
"workbench.panel.defaultLocation" = "right";
"workbench.editor.tabCloseButton" = "left";
"workbench.startupEditor" = "none";
"workbench.list.smoothScrolling" = true;
"security.workspace.trust.enabled" = false;
"explorer.confirmDelete" = false;
"breadcrumbs.enabled" = true;
};
};
};
}

View file

@ -0,0 +1,49 @@
{
osConfig,
pkgs,
lib,
...
}: let
inherit (lib) mkIf;
inherit (osConfig) modules;
sys = modules.system;
prg = sys.programs;
catppuccin-mocha = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "discord";
rev = "20abe29b3f0f7c59c4878b1bf6ceae41aeac9afd";
hash = "sha256-Gjrv1VayPfjcsfSmGJdJTA8xEX6gXhpgTLJ2xrSNcEo=";
};
in {
config = mkIf prg.webcord.enable {
home.packages = [
pkgs.webcord-vencord # webcord with vencord extension installed
];
xdg.configFile = {
"WebCord/Themes/mocha" = {
source = "${catppuccin-mocha}/themes/mocha.theme.css";
};
};
# TODO: maybe this should be under services/global because technically it's not an app
# however arrpc is useless on its own (i.e. without webcord) and here it's merely a
# companion app that we enable for rich presence.
services.arrpc = {
enable = true;
package = pkgs.arrpc.overrideAttrs (_: {
pname = "arrpc";
version = "3.3.1";
src = pkgs.fetchFromGitHub {
owner = "OpenAsar";
repo = "arrpc";
rev = "b4796fffe3bf1b1361cc4781024349f7a4f9400e";
hash = "sha256-iEfV85tRl2KyjodoaSxVHiqweBpLeiCAYWc8+afl/sA=";
};
});
};
};
}

View file

@ -0,0 +1,37 @@
{
osConfig,
pkgs,
lib,
...
}: let
inherit (lib) mkIf;
inherit (osConfig) modules;
sys = modules.system;
prg = sys.programs;
in {
config = mkIf prg.zathura.enable {
xdg.configFile."zathura/catppuccin-mocha".source = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/catppuccin/zathura/main/src/catppuccin-mocha";
hash = "sha256-/HXecio3My2eXTpY7JoYiN9mnXsps4PAThDPs4OCsAk=";
};
programs.zathura = {
enable = true;
extraConfig = "include catppuccin-mocha";
options = {
font = "Iosevka 15";
selection-clipboard = "clipboard";
adjust-open = "best-fit";
pages-per-row = "1";
scroll-page-aware = "true";
scroll-full-overlap = "0.01";
scroll-step = "100";
smooth-scroll = true;
zoom-min = "10";
guioptions = "none";
};
};
};
}