From 0887e453027ddc23f55732525a90e7b07a8d0e83 Mon Sep 17 00:00:00 2001 From: cobertos Date: Wed, 22 Jul 2026 03:42:51 -0400 Subject: [PATCH 01/10] Readd firefox user chrome, updated for firefox vertical tabs --- desktop-niri.nix | 4 ++++ firefox/user.js | 5 ----- firefox/userChrome.css | 17 ++++++++++++++++- 3 files changed, 20 insertions(+), 6 deletions(-) delete mode 100644 firefox/user.js diff --git a/desktop-niri.nix b/desktop-niri.nix index b0dcb1f..5b822cd 100644 --- a/desktop-niri.nix +++ b/desktop-niri.nix @@ -101,6 +101,7 @@ # "Google".metaData.alias = "@g"; # builtin engines only support specifying one additional alias }; }; + userChrome = builtins.readFile ./firefox/userChrome.css; # TODO: I don't particularly like how this manages the extensions wrt permissions, so I just do this # manually rn # extensions = { @@ -120,6 +121,9 @@ # ]; settings = { + # Make userChrome load + "toolkit.legacyUserProfileCustomizations.stylesheets" = true; + # Defaults I dont want to trigger again "browser.bookmarks.addedImportButton" = true; "browser.bookmarks.restore_default_bookmarks" = false; diff --git a/firefox/user.js b/firefox/user.js deleted file mode 100644 index 6054feb..0000000 --- a/firefox/user.js +++ /dev/null @@ -1,5 +0,0 @@ -// Mozilla User Preferences Overrides -// this overrides stuff in prefs.js - -// Enable usage of userChrome.css -user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true); \ No newline at end of file diff --git a/firefox/userChrome.css b/firefox/userChrome.css index d9f2c1b..c722d93 100644 --- a/firefox/userChrome.css +++ b/firefox/userChrome.css @@ -1,2 +1,17 @@ /* Hide the top tabs, we usin' tree tabs on the sidebar*/ -#TabsToolbar { visibility: collapse !important; } \ No newline at end of file +#TabsToolbar { visibility: collapse !important; } + +/*Tweaks to Firefox's vertical tabs*/ +#tabbrowser-tabs[orient="vertical"] { + & .tabbrowser-tab:not([dragtarget]):not([pinned]) { + /* Make the vertical tabs more compact */ + padding: 0 !important; + /* Make the clickable area a little more legible*/ + border-bottom: #222 1px solid !important; + + & .tab-background { + /* More compact */ + margin: 0 !important; + } + } +} From 94755965765d6f642e07c4e3121292adab3ec862 Mon Sep 17 00:00:00 2001 From: cobertos Date: Wed, 22 Jul 2026 04:00:22 -0400 Subject: [PATCH 02/10] Set firefox configPath explicitly and update home-manager stateVersion to silence annoying af 'error' --- bare.nix | 2 +- desktop-niri.nix | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bare.nix b/bare.nix index 95edec9..56017af 100644 --- a/bare.nix +++ b/bare.nix @@ -3,7 +3,7 @@ home.username = identity.username; home.homeDirectory = "/home/${identity.username}"; - home.stateVersion = "24.11"; + home.stateVersion = "26.05"; # From https://github.com/NixOS/nixpkgs/blob/nixos-26.05/pkgs/top-level/unixtools.nix#L17-L19 # You should always try to use single binaries when available. For diff --git a/desktop-niri.nix b/desktop-niri.nix index 5b822cd..2f98ce3 100644 --- a/desktop-niri.nix +++ b/desktop-niri.nix @@ -77,6 +77,7 @@ programs.firefox = { enable = true; + configPath = "${config.xdg.configHome}/mozilla/firefox"; profiles = { default = { id = 0; From c907aaf079f0a1a7af4eb65fe8db211919806e81 Mon Sep 17 00:00:00 2001 From: cobertos Date: Wed, 22 Jul 2026 04:04:25 -0400 Subject: [PATCH 03/10] Use specific 26.05 home-manager release so I dont get annoying mismatch error --- flake.lock | 7 ++++--- flake.nix | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index c43e7f1..d3795e7 100644 --- a/flake.lock +++ b/flake.lock @@ -32,15 +32,16 @@ ] }, "locked": { - "lastModified": 1780099287, - "narHash": "sha256-efIPwVGtIWIjWcznhaop6XN6HxnOL8800hF6CBNvlqQ=", + "lastModified": 1784350909, + "narHash": "sha256-ZWyzLbS1yKUTeFJLmdVuWNnHttL333/ldJbEE+KzCrM=", "owner": "nix-community", "repo": "home-manager", - "rev": "7d8127d308c3fb9664f7e643eec944be74ebb37d", + "rev": "4ce190229c73d44536caa7072f6308fb2d8feeb3", "type": "github" }, "original": { "owner": "nix-community", + "ref": "release-26.05", "repo": "home-manager", "type": "github" } diff --git a/flake.nix b/flake.nix index 1c33f54..555827b 100644 --- a/flake.nix +++ b/flake.nix @@ -4,7 +4,7 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/release-26.05"; home-manager = { - url = "github:nix-community/home-manager"; + url = "github:nix-community/home-manager/release-26.05"; # Make home-manager use our nixpkgs inputs.nixpkgs.follows = "nixpkgs"; }; From 49c748f09bd4fab1a3ac18fe7668e79178293f09 Mon Sep 17 00:00:00 2001 From: cobertos Date: Thu, 23 Jul 2026 12:26:38 -0400 Subject: [PATCH 04/10] Add micro fzf (ctrl-p-like in Sublime) file finder plugin, tune micro settings more, familiarize self with tabs, add bindings --- .config/micro/bindings.json | 6 ++++++ .config/micro/settings.json | 10 +++++++++- nix/hm-micro-editor.nix | 8 ++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 .config/micro/bindings.json diff --git a/.config/micro/bindings.json b/.config/micro/bindings.json new file mode 100644 index 0000000..c088b72 --- /dev/null +++ b/.config/micro/bindings.json @@ -0,0 +1,6 @@ +{ + "Ctrl-p": "command:fzfinder", + // Ctrl-Shift is "not supported by termnals" according to the docs + "Alt-p": "command:palettero", + "Ctrl-o": "lua:filemanager.toggle_tree" +} diff --git a/.config/micro/settings.json b/.config/micro/settings.json index 7382da1..cbd1947 100644 --- a/.config/micro/settings.json +++ b/.config/micro/settings.json @@ -6,14 +6,22 @@ "colorscheme": "monokai", "scrollbar": true, // Not currently draggable yet ;-;, https://github.com/micro-editor/micro/issues/3414 "keepautoindent": true, // I have a habit of using Enter on the FOLLOWING line sometimes, this makes the new line have indent + "diffgutter": true, // Show diff changes in the gutter + "hlsearch": true, + "statusformatl": "Line $(line), Column $(col)", + "statusformatr": "$(opt:filetype) | $(opt:fileformat) | $(opt:encoding)", // Show whitespace characters very similar to Sublime whitespace visible. // bullet for spaces, and emdash for tabs // (multiple emdashes so all space is filled by them) "showchars": "ispace=·,space=·,itab=————", - //LSP + //Plugins "lsp.server": "typescript=typescript-language-server --stdio", + + "filemanager-openonstart": true, //TODO: Doesnt seem to work... + + "fzfopen": "newtab", //Filetypes "*.jsonc": { diff --git a/nix/hm-micro-editor.nix b/nix/hm-micro-editor.nix index 03afcd8..83c2983 100644 --- a/nix/hm-micro-editor.nix +++ b/nix/hm-micro-editor.nix @@ -34,6 +34,12 @@ let rev = "49cf49961f7526c9bda6e7dacb4ea26acc6d565f"; hash = "sha256-HbkTmt+Nl49lhoW+E+ver35aoSj0Sg2C0RUvNqNbTMY="; }; + microFZFFinderPlugin = pkgs.fetchFromGitHub { + owner = "MuratovAS"; + repo = "micro-fzfinder"; + rev = "c72940bdeb9f3db0f1da2193c1119aaaae4f6b42"; + hash = "sha256-UmGXKY7lfcJLB+odixR+4+IfCc+E1IPfRptPshq73mA="; + }; in { home.packages = with pkgs; [ # Built from source from github, micro-editor/micro @@ -45,9 +51,11 @@ in { # Micro config home.file.".config/micro/settings.json".source = config.lib.file.mkOutOfStoreSymlink "${dotfilesPath}/.config/micro/settings.json"; + home.file.".config/micro/bindings.json".source = config.lib.file.mkOutOfStoreSymlink "${dotfilesPath}/.config/micro/bindings.json"; # Micro plugins home.file.".config/micro/plug/filemanager".source = microFileManagerPlugin; home.file.".config/micro/plug/lsp".source = microLSPPlugin; home.file.".config/micro/plug/palettero".source = microPaletteroPlugin; home.file.".config/micro/plug/kdl".source = microKDLSyntaxPlugin; + home.file.".config/micro/plug/fzfinder".source = microFZFFinderPlugin; } From 96df79237d21df4ba1ab0c4e013b94f90fd984b8 Mon Sep 17 00:00:00 2001 From: cobertos Date: Thu, 23 Jul 2026 12:46:15 -0400 Subject: [PATCH 05/10] Add plugin to micro for setting the terminal title to the currently open tab --- .config/micro/plug/micro-termtitle/repo.json | 15 +++++++++++ .../micro/plug/micro-termtitle/termtitle.lua | 27 +++++++++++++++++++ nix/hm-micro-editor.nix | 1 + 3 files changed, 43 insertions(+) create mode 100644 .config/micro/plug/micro-termtitle/repo.json create mode 100644 .config/micro/plug/micro-termtitle/termtitle.lua diff --git a/.config/micro/plug/micro-termtitle/repo.json b/.config/micro/plug/micro-termtitle/repo.json new file mode 100644 index 0000000..186cacb --- /dev/null +++ b/.config/micro/plug/micro-termtitle/repo.json @@ -0,0 +1,15 @@ +[{ + "Name": "termtitle", + "Description": "Sets the terminal title to the currently open thing", + "Tags": ["title"], + "Website": "https://cobertos.com", + "Versions": [ + { + "Version": "0.0.1", + "Url": "https://cobertos.com", + "Require": { + "micro": ">=2.0.0" + } + } + ] +}] diff --git a/.config/micro/plug/micro-termtitle/termtitle.lua b/.config/micro/plug/micro-termtitle/termtitle.lua new file mode 100644 index 0000000..e82e429 --- /dev/null +++ b/.config/micro/plug/micro-termtitle/termtitle.lua @@ -0,0 +1,27 @@ +-- Initially from https://github.com/micro-editor/micro/issues/3991#issuecomment-3839167057 + +local buffer = import("micro/buffer") + +function change_terminal_title(new_title) + local esc = string.char(0x1b) + io.write(esc, "]0;", new_title, esc, "\\") +end + +function update_title(active_buf) + if active_buf.Type.Kind == buffer.BTRaw then + change_terminal_title("micro: Raw event viewer") + else + local new_title = string.format("micro: %s", active_buf:GetName()) + change_terminal_title(new_title) + end +end + +function onBufferOpen(buf) + update_title(buf) +end + +function onSetActive(bufpane) + if bufpane then + update_title(bufpane.Buf) + end +end diff --git a/nix/hm-micro-editor.nix b/nix/hm-micro-editor.nix index 83c2983..24734e0 100644 --- a/nix/hm-micro-editor.nix +++ b/nix/hm-micro-editor.nix @@ -58,4 +58,5 @@ in { home.file.".config/micro/plug/palettero".source = microPaletteroPlugin; home.file.".config/micro/plug/kdl".source = microKDLSyntaxPlugin; home.file.".config/micro/plug/fzfinder".source = microFZFFinderPlugin; + home.file.".config/micro/plug/termtitle".source = config.lib.file.mkOutOfStoreSymlink "${dotfilesPath}/.config/micro/plug/micro-termtitle"; } From 9995b50709716b7a502c3e8b78ebd5ac461ec3f4 Mon Sep 17 00:00:00 2001 From: cobertos Date: Thu, 23 Jul 2026 13:11:20 -0400 Subject: [PATCH 06/10] Ignore 'filemanager' buffer for updating window title --- .config/micro/plug/micro-termtitle/termtitle.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.config/micro/plug/micro-termtitle/termtitle.lua b/.config/micro/plug/micro-termtitle/termtitle.lua index e82e429..f181375 100644 --- a/.config/micro/plug/micro-termtitle/termtitle.lua +++ b/.config/micro/plug/micro-termtitle/termtitle.lua @@ -11,7 +11,12 @@ function update_title(active_buf) if active_buf.Type.Kind == buffer.BTRaw then change_terminal_title("micro: Raw event viewer") else - local new_title = string.format("micro: %s", active_buf:GetName()) + title = active_buf:GetName() + if title == "filemanager" then + -- Ignore this one + return + end + local new_title = string.format("micro: %s", title) change_terminal_title(new_title) end end From a022b387a727e6c3258fc9cd2eade64c294ab697 Mon Sep 17 00:00:00 2001 From: cobertos Date: Sun, 26 Jul 2026 19:08:23 -0400 Subject: [PATCH 07/10] Change terminal opener keybind to open as same cwd as focused window (using ycwd) --- .config/niri/config.kdl | 3 ++- desktop-niri.nix | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.config/niri/config.kdl b/.config/niri/config.kdl index 6df7b8e..a8b6db2 100644 --- a/.config/niri/config.kdl +++ b/.config/niri/config.kdl @@ -173,7 +173,8 @@ binds { Mod+Shift+E { quit; } Ctrl+Alt+Delete { quit; } - Mod+T hotkey-overlay-title="Open a Terminal: alacritty" { spawn "alacritty"; } + Mod+Shift+T hotkey-overlay-title="Open a Terminal: alacritty" { spawn "alacritty"; } + Mod+T { spawn "bash" "-c" "alacritty --working-directory $(ycwd $(niri msg --json focused-window | jq .pid))"; } Mod+D hotkey-overlay-title="Run an Application: fuzzel" { spawn "fuzzel"; } Mod+E hotkey-overlay-title="Open file explorer" { spawn "nemo"; } Mod+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; } diff --git a/desktop-niri.nix b/desktop-niri.nix index 2f98ce3..2b66615 100644 --- a/desktop-niri.nix +++ b/desktop-niri.nix @@ -24,6 +24,8 @@ # Desktop stuff # Desktop environment niri + ycwd # For keybind to open new terminal in the same cwd as focused one + # Statusbar waybar font-awesome # for waybar From 38418d9ac3177bca5c23c8a3a80756c55cd23423 Mon Sep 17 00:00:00 2001 From: cobertos Date: Wed, 29 Jul 2026 18:27:16 -0400 Subject: [PATCH 08/10] Redo sublime text config in .nix, do plugins without Package Control, move sublime config to .config --- .../User/LSP-typescript.sublime-settings | 0 .../User/Preferences.sublime-settings | 0 .../User/SublimeLinter.sublime-settings | 0 .../Packages/User/YAML.sublime-settings | 0 .../User/sftp/Mariana.sublime-color-scheme | 0 .../User/sftp/Monokai.sublime-color-scheme | 0 desktop-niri.nix | 13 +- flake.nix | 2 +- nix/hm-sublime-text.nix | 218 ++++++++++++++++++ sublime/PLUGINS.md | 28 --- .../User/Package Control.sublime-settings | 25 -- 11 files changed, 229 insertions(+), 57 deletions(-) create mode 100644 .config/sublime-text/Packages/User/LSP-typescript.sublime-settings rename {sublime => .config/sublime-text}/Packages/User/Preferences.sublime-settings (100%) rename {sublime => .config/sublime-text}/Packages/User/SublimeLinter.sublime-settings (100%) rename {sublime => .config/sublime-text}/Packages/User/YAML.sublime-settings (100%) rename {sublime => .config/sublime-text}/Packages/User/sftp/Mariana.sublime-color-scheme (100%) rename {sublime => .config/sublime-text}/Packages/User/sftp/Monokai.sublime-color-scheme (100%) create mode 100644 nix/hm-sublime-text.nix delete mode 100644 sublime/PLUGINS.md delete mode 100644 sublime/Packages/User/Package Control.sublime-settings diff --git a/.config/sublime-text/Packages/User/LSP-typescript.sublime-settings b/.config/sublime-text/Packages/User/LSP-typescript.sublime-settings new file mode 100644 index 0000000..e69de29 diff --git a/sublime/Packages/User/Preferences.sublime-settings b/.config/sublime-text/Packages/User/Preferences.sublime-settings similarity index 100% rename from sublime/Packages/User/Preferences.sublime-settings rename to .config/sublime-text/Packages/User/Preferences.sublime-settings diff --git a/sublime/Packages/User/SublimeLinter.sublime-settings b/.config/sublime-text/Packages/User/SublimeLinter.sublime-settings similarity index 100% rename from sublime/Packages/User/SublimeLinter.sublime-settings rename to .config/sublime-text/Packages/User/SublimeLinter.sublime-settings diff --git a/sublime/Packages/User/YAML.sublime-settings b/.config/sublime-text/Packages/User/YAML.sublime-settings similarity index 100% rename from sublime/Packages/User/YAML.sublime-settings rename to .config/sublime-text/Packages/User/YAML.sublime-settings diff --git a/sublime/Packages/User/sftp/Mariana.sublime-color-scheme b/.config/sublime-text/Packages/User/sftp/Mariana.sublime-color-scheme similarity index 100% rename from sublime/Packages/User/sftp/Mariana.sublime-color-scheme rename to .config/sublime-text/Packages/User/sftp/Mariana.sublime-color-scheme diff --git a/sublime/Packages/User/sftp/Monokai.sublime-color-scheme b/.config/sublime-text/Packages/User/sftp/Monokai.sublime-color-scheme similarity index 100% rename from sublime/Packages/User/sftp/Monokai.sublime-color-scheme rename to .config/sublime-text/Packages/User/sftp/Monokai.sublime-color-scheme diff --git a/desktop-niri.nix b/desktop-niri.nix index 2b66615..f21b5f0 100644 --- a/desktop-niri.nix +++ b/desktop-niri.nix @@ -1,5 +1,8 @@ -{ config, pkgs, nirimon, aw-watcher-afk-input, dotfilesPath, ...}: -{ +{ config, pkgs, nirimon, aw-watcher-afk-input, dotfilesPath, ...}: { + imports = [ + ./nix/hm-sublime-text.nix + ]; + home.packages = with pkgs; [ firefox activitywatch @@ -7,7 +10,7 @@ ffmpeg nmap xclip - nodejs-slim_26 + nodejs_26 # Cannot use slim (need npm or sublime lsp-typescript complains) pnpm typescript typescript-language-server @@ -51,6 +54,10 @@ slurp satty + # This pulls a binary, I'm pretty annoyed with this, but this is how I edit some of my notes + obsidian + #zettlr + #dejavu_fonts ]; home.file.".config/waybar/config.jsonc".source = config.lib.file.mkOutOfStoreSymlink "${dotfilesPath}/.config/waybar/config.jsonc"; diff --git a/flake.nix b/flake.nix index 555827b..66c9686 100644 --- a/flake.nix +++ b/flake.nix @@ -53,7 +53,7 @@ # desktop-niri - Fully configured niri desktop. # Was running with "nixGL niri-session" on Debian Cinnamon after disabling display-manager homeConfigurations."desktop-niri" = home-manager.lib.homeManagerConfiguration { - inherit pkgs; + pkgs = pkgsUnfree; extraSpecialArgs = esa; modules = [ ./bare.nix ./desktop-niri.nix ]; }; diff --git a/nix/hm-sublime-text.nix b/nix/hm-sublime-text.nix new file mode 100644 index 0000000..34121a2 --- /dev/null +++ b/nix/hm-sublime-text.nix @@ -0,0 +1,218 @@ +{ config, pkgs, identity, dotfilesPath, ...}: +let + # === SUBLIME PACKAGES === + # Recent supply chain attacks have made me very very skeptical of auto-updating package systems + # Normally these are installed in Sublime with [Package Control](https://packagecontrol.io). But + # that recently changed hands (to SublimeHQ?) but is still maybe under the control of wbond who + # left the community (according to the Sublime Text discord logs). It seems complicated. + # [Package Control R](https://packages.sublimetext.io/), another community package manager now + # also exists. + # But ultimately I wanted something I could reason about + # ...so + # I stripped down my package list and am now using Nix to manage my plugin manager + # + # + # The package process is pretty simple: + # * Find the package git repository + # * Clone the package repository to [`/home/xxx/.config/sublime-text/Packages`](https://www.sublimetext.com/docs/packages.html#locations) which is where "loose" packages are to be stored + # * Install the Python dependencies of each package noted in their `dependencies.json` into `/home/xxx/.config/lib/python3x/...` (learned from the Discord Sublime server) + # and that's it! + # + + # == Language packages, completely no Python, .tmLanguage + others only == + stJQSyntax = pkgs.fetchFromGitHub { + owner = "zogwarg"; + repo = "SublimeJQ"; + rev = "84770c52bd0d6cea73bd41299a2770ee931320bc"; + hash = "sha256-LExsNmYhCoad8nL4bb+c3/vg4OhP87kiQBNYKxR7HQE="; + }; + stDockerSyntax = pkgs.fetchFromGitHub { + owner = "asbjornenge"; + repo = "Docker.tmbundle"; + tag = "v1.6.5"; + hash = "sha256-iLtCyBgf2Zr6jAyEzH/zprXABBK38biNBB1XhnCV0xs="; + }; + stGraphQLSyntax = pkgs.fetchFromGitHub { + owner = "dncrews"; + repo = "GraphQL-SublimeText3"; + rev = "acc1dfe30dde5091069afd6070b79a68eb1c229a"; + hash = "sha256-cpFcG5XNuGmSyTVr7kjkVGg514UZAFCUeJL7aWx8Xeo="; + }; + stShaderSyntax = pkgs.fetchFromGitHub { + owner = "noct"; + repo = "sublime-shaders"; + tag = "1.0.3"; + hash = "sha256-+mDQn0/N9fhDHi8b1f9qULlxeLeLaFHGX6YXjAXZhM0="; + }; + stNixSyntax = pkgs.fetchFromGitHub { + owner = "wmertens"; + repo = "sublime-nix"; + tag = "V2.4.0"; + hash = "sha256-gZFUFSiY2MxiEiiPDekiyYfQlY8+zUhXb0Y98xCpqrs="; + }; + stTOMLSyntax = pkgs.fetchFromGitHub { + owner = "jasonwilliams"; + repo = "sublime_toml_highlighting"; + tag = "v2.7.0"; + hash = "sha256-FB6PUjYJz51/VAhfM6dp2iRWLOhZATzw4pUDTZF4uvc="; + }; + # == Language package that have some Python (from least to most) == + # Has some trivial python for building something? + stBabelSyntax = pkgs.fetchFromGitHub { + owner = "babel"; + repo = "babel-sublime"; + tag = "v11.2.0"; + hash = "sha256-YL2XVK9RQrxRN4UAd/FHGyXzzBO4ytIO2L2E/4I9Gqs="; + }; + # Has some very small Windows-only Python (dunno if it's even used?) + stIniSyntax = pkgs.fetchFromGitHub { + owner = "jwortmann"; + repo = "ini-syntax"; + rev = "ebfb6d3618e2b3c3ba547e3dbbe01280f548af99"; + hash = "sha256-CGMUUfQ0pxIpIsOnBlnx4ex6WcrjNZk1VsPaMzD9tRU="; + }; + # Has Python completions + stSassSCSS = pkgs.fetchFromGitHub { + owner = "SublimeText"; + repo = "Sass"; + tag = "4.0.2"; + hash = "sha256-2VgrnIgPjfCk4t6pMja4VwO9wm8cLFdfJaqu+ztNVFw="; + }; + # == Python/non-trivial packages == + # Small Python package + stSyncViewScroll = pkgs.fetchFromGitHub { + owner = "zzjin"; + repo = "syncViewScroll"; + rev = "6f0e084aa1f73bde106a543e72c84754c861cddc"; + hash = "sha256-CGMUUfQ0pxIpIsOnBlnx4ex6WcrjNZk1VsPaMzD9tRU="; + }; + # Python, deps are vendored, 4+ years old, uses the jsbeautify lib I contributed to so looks legit + stJsFormat = pkgs.fetchFromGitHub { + owner = "jdavisclark"; + repo = "JsFormat"; + rev = "7e1266c6fd68f61a94676aae7228863f0aa42649"; + hash = "sha256-hqTJ/vpfgg9v5Kyf7dAy8a44WXv1HC8EEjmDnbQoRvw="; + }; + stLSP = pkgs.fetchFromGitHub { + owner = "sublimelsp"; + repo = "LSP"; + tag = "4070-2.13.0"; + hash = "sha256-jzOb4/G/4ZngoTEh0G3tYvAkFPhwpiQS5g91InQkQzk="; + }; + stLSPTypescript = pkgs.fetchFromGitHub { + owner = "sublimelsp"; + repo = "LSP-typescript"; + tag = "3.2.0"; + hash = "sha256-MaxcViJ6SPzeSfTd1tct+KhIBEaJSKAqNh56lxKvwFg="; + }; + + # TODO: old/re-add? + # SFTP - Paid, dont think it has a github repo? Does it even work? Last time I tried to use it was broken + + # LSPs seem to require a lot of the default installed Package Control libraries + # These are from the packages dependencies.json (LSP for example): + # https://github.com/sublimelsp/LSP/blob/fc5a7c75c8cec2e6765e218f7df980315c5c9ff3/dependencies.json + # And then correlated with the Package Control defaults from the v4 channel: + # https://packagecontrol.github.io/channel/channel_v4.json + + pyTypingExtensions = pkgs.fetchPypi { # 3.8 + pname = "typing_extensions"; + version = "4.13.2"; + format = "wheel"; + python = "py3"; # the default, py2.py3 does not exist + dist = "py3"; + hash = "sha256-pDnnwEtJ/sPl0+K+qiF1XK273DkWlOKMzdNspKFAj4w="; + }; + pyBraceX = pkgs.fetchPypi { # 3.8 + pname = "bracex"; + version = "2.5"; + format = "wheel"; + python = "py3"; + dist = "py3"; + hash = "sha256-0vz0tgaoKsMlRxr/4XBt2buqNTbJHvhqMfa3ZvPa0dA="; + }; + pyWCMatch = pkgs.fetchPypi { # 3.8 + pname = "wcmatch"; + version = "10.0"; + format = "wheel"; + python = "py3"; + dist = "py3"; + hash = "sha256-DdknBy0DwKZSeiDS5q1bqNA4DmCHDDg7xTO3F0Tfe3o="; + }; + pyMDPopups = pkgs.fetchurl { # 3.3, 3.8 + url = "https://github.com/facelessuser/sublime-markdown-popups/releases/download/st3-4.3.5/mdpopups-4.3.5-py3-none-any.whl"; + hash = "sha256-oohYhC91jxuD9RnFie4NXYWVgb5KzJgxetVmEHk8qSc="; + }; + pyLSPUtils = pkgs.fetchurl { # 3.8, 3.13, 3.14 + url = "https://github.com/sublimelsp/lsp_utils/releases/download/v3.7.6/lsp_utils-3.7.6-py3-none-any.whl"; + hash = "sha256-9QLdEDOSWflFINo6eQe/6I++huuJ3KWFyju54t5euVI="; + }; + pySublimeLib = pkgs.fetchurl { #3.8, 3.13, 3.14 + url = "https://github.com/SublimeText/sublime_lib/releases/download/v2.1.0/sublime_lib-2.1.0-py3-none-any.whl"; + hash = "sha256-DnQZeTpxBNYau4Qp0QlSBGO3aI7Osyjig723WaSksZU="; + }; + + sublimePythonLibs = pkgs.stdenv.mkDerivation { + name = "sublime-text-python38-libs"; + + srcs = [ + pyTypingExtensions + pyBraceX + pyWCMatch + pyMDPopups + pyLSPUtils + pySublimeLib + ]; + + nativeBuildInputs = [ pkgs.unzip ]; + + unpackPhase = '' + mkdir -p $out + for src in $srcs; do + unzip "$src" -d $out + done + ''; + + dontBuild = true; + dontInstall = true; + }; + +in { + # TODO: + # Sublime pulls a binary and augments it :pensive: + # I tried switching to micro but the LSP and file tree were too fucked for it to be my daily driver right now + # + # * sublime is _subline text 2_, do not use + # * Requires unfree packages + # * In nixpkgs-26.05 - It requires openssl1_1 which is unsupported and requires a special flag to install (I couldn't get it to work) + # * In nixpkgs-unstable - openssl1_1 was removed and the package host fails, so no packages can be used. sublime4 was marked broken + # home.packages = with pkgs; [ + # sublime4 + # ]; + # + # For now, this has to be _manually installed_ on the underlying system (I installed the .deb) + + programs.home-manager.enable = true; + + # Config + home.file.".config/sublime-text/Packages/User".source = config.lib.file.mkOutOfStoreSymlink "${dotfilesPath}/.config/sublime-text/Packages/User"; + + # Packages + home.file.".config/sublime-text/Packages/JQ Syntax".source = stJQSyntax; + home.file.".config/sublime-text/Packages/Dockerfile Syntax Highlighting".source = stDockerSyntax; + home.file.".config/sublime-text/Packages/GraphQL".source = stGraphQLSyntax; + home.file.".config/sublime-text/Packages/Shader Syntax (GLSL HLSL Cg)".source = stShaderSyntax; + home.file.".config/sublime-text/Packages/Nix".source = stNixSyntax; + home.file.".config/sublime-text/Packages/TOML".source = stTOMLSyntax; + home.file.".config/sublime-text/Packages/Babel".source = stBabelSyntax; + home.file.".config/sublime-text/Packages/INI".source = stIniSyntax; + home.file.".config/sublime-text/Packages/Sass".source = stSassSCSS; + home.file.".config/sublime-text/Packages/Sync View Scroll".source = stSyncViewScroll; + home.file.".config/sublime-text/Packages/JsFormat".source = stJsFormat; + home.file.".config/sublime-text/Packages/LSP".source = stLSP; + home.file.".config/sublime-text/Packages/LSP-typescript".source = stLSPTypescript; + + # Libs + # home.file.".config/sublime-text/Lib/python38/typing_extensions".source = pyTypingExtensions; + home.file.".config/sublime-text/Lib/python38".source = sublimePythonLibs; +} diff --git a/sublime/PLUGINS.md b/sublime/PLUGINS.md deleted file mode 100644 index 259129a..0000000 --- a/sublime/PLUGINS.md +++ /dev/null @@ -1,28 +0,0 @@ -# Sublime Plugins - -Recent supply chain attacks have made me very very suspicuous of plugin systems - -I trimmed down my plugins and did research on what remained. - -[Package Control](https://packagecontrol.io) seems to be in a very weird state w.r.t lack of maintenance and community skepticism/moving away from it. While it seems like it's now owned by SublimeHQ (according to Discord), it seems like it's still under control of WBond. There's a rebooted version [Package Control R](https://packages.sublimetext.io/) apparently now too. - -In the future, I would like to move completely away from PackageControl and PackageControlR (if possible). It might be possible with git submodiles or using Gitea/Forgejo + .zip download. Especially for some of these packages that I have left, that have very minimal API surface area or only define new syntax - - -```perl -"ActivityWatch Watcher" # Has Python # https://github.com/kostasdizas/aw-watcher-sublime -"Babel", # Has some trivial python for building something? # https://github.com/babel/babel-sublime -"Dockerfile Syntax Highlighting", # Non-python # https://github.com/asbjornenge/Docker.tmbundle -"GraphQL", # Non-python # https://github.com/dncrews/GraphQL-SublimeText3 -"INI", # Has some very small Windows-only Python # https://github.com/jwortmann/ini-syntax -"JQ Syntax", # Non-python, .tmLanguage and others only # https://github.com/zogwarg/SublimeJQ -"JsFormat", # Python, deps are vendored, 4+ years old, I know the maintainer # https://github.com/wmertens/sublime-nix -"LSP", -"LSP-typescript", -"Nix", # Non-python, .tmLanguage and others only # https://github.com/wmertens/sublime-nix -"Package Control", # -"Sass", # Non-trivial amount of Python # https://github.com/SublimeText/Sass -"SFTP", # Paid, wbond, possibly doesnt even work? -"Shader Syntax (GLSL HLSL Cg)", # Non-python, .tmLanguage and others only, archived # https://github.com/noct/sublime-shaders -"Sync View Scroll", # Python # https://github.com/zzjin/syncViewScroll -``` diff --git a/sublime/Packages/User/Package Control.sublime-settings b/sublime/Packages/User/Package Control.sublime-settings deleted file mode 100644 index 87b6b75..0000000 --- a/sublime/Packages/User/Package Control.sublime-settings +++ /dev/null @@ -1,25 +0,0 @@ -{ - "bootstrapped": true, - "in_process_packages": - [ - ], - "installed_packages": - [ - "ActivityWatch Watcher", - "Babel", - "Dockerfile Syntax Highlighting", - "GraphQL", - "INI", - "JQ Syntax", - "JsFormat", - "LSP", - "LSP-typescript", - "Nix", - "Package Control", - "Sass", - "SFTP", - "Shader Syntax (GLSL HLSL Cg)", - "Sync View Scroll", - "TOML", - ], -} From 62525d70f1126e7dd4728729ea6b83b9dff7540a Mon Sep 17 00:00:00 2001 From: cobertos Date: Wed, 29 Jul 2026 19:18:01 -0400 Subject: [PATCH 09/10] Move firefox to separate nix config --- {firefox => .config/mozilla}/userChrome.css | 0 desktop-niri.nix | 161 ++++---------------- desktop-x11-generic.nix | 142 ++--------------- desktop.nix.unused | 45 ------ nix/hm-firefox.nix | 138 +++++++++++++++++ nix/hm-sublime-text.nix | 5 + 6 files changed, 185 insertions(+), 306 deletions(-) rename {firefox => .config/mozilla}/userChrome.css (100%) delete mode 100644 desktop.nix.unused create mode 100644 nix/hm-firefox.nix diff --git a/firefox/userChrome.css b/.config/mozilla/userChrome.css similarity index 100% rename from firefox/userChrome.css rename to .config/mozilla/userChrome.css diff --git a/desktop-niri.nix b/desktop-niri.nix index f21b5f0..0fda9f3 100644 --- a/desktop-niri.nix +++ b/desktop-niri.nix @@ -1,10 +1,10 @@ { config, pkgs, nirimon, aw-watcher-afk-input, dotfilesPath, ...}: { imports = [ ./nix/hm-sublime-text.nix + ./nix/hm-firefox.nix ]; home.packages = with pkgs; [ - firefox activitywatch dos2unix ffmpeg @@ -15,6 +15,9 @@ typescript typescript-language-server gucharmap + + # TODO: This needs other things to integrate with niri. The Pipewire source doesnt work out of the box + # see https://niri-wm.github.io/niri/Screencasting.html obs-studio # Other dev tools @@ -83,136 +86,28 @@ }; }; }; - - programs.firefox = { - enable = true; - configPath = "${config.xdg.configHome}/mozilla/firefox"; - profiles = { - default = { - id = 0; - name = "default"; - isDefault = true; - settings = { - "browser.startup.homepage" = "https://kagi.com"; - "browser.search.defaultenginename" = "Kagi"; - "browser.search.order.1" = "Kagi"; - }; - search = { - force = true; - default = "Kagi"; - order = [ "Kagi" ]; - engines = { - "Kagi" = { - urls = [{ template = "https://kagi.com/search?q={searchTerms}"; }]; - icon = "https://kagi.com/favicon.ico"; - # updateInterval = 24 * 60 * 60 * 1000; # every day - }; - # "Bing".metaData.hidden = true; - # "Google".metaData.alias = "@g"; # builtin engines only support specifying one additional alias - }; - }; - userChrome = builtins.readFile ./firefox/userChrome.css; - # TODO: I don't particularly like how this manages the extensions wrt permissions, so I just do this - # manually rn - # extensions = { - # packages = with pkgs.nur.repos.rycee.firefox-addons; [ - # ublock-origin - # bitwarden - # youtube enhancer - # tab counter plus, https://addons.mozilla.org/en-US/firefox/addon/tab-counter-plus/ - # return youtube dislike - # facebook container - # firefox multi account containers (MAC) - # - # - # deferred on these ones for now: - # singlefile - # - # ]; - - settings = { - # Make userChrome load - "toolkit.legacyUserProfileCustomizations.stylesheets" = true; - - # Defaults I dont want to trigger again - "browser.bookmarks.addedImportButton" = true; - "browser.bookmarks.restore_default_bookmarks" = false; - "browser.engagement.fxa-toolbar-menu-button.has-used" = true; - "browser.download.panel.shown" = true; - "browser.toolbarbuttons.introduced.sidebar-button" = true; - "identity.fxaccounts.toolbar.syncSetup.panelAccessed" = true; - "toolkit.telemetry.reportingpolicy.firstRun" = false; - "trailhead.firstrun.didSeeAboutWelcome" = true; - - # Content blocking - "browser.contentblocking.category" = "strict"; - - # Disable all the suggestions - "browser.urlbar.suggest.quicksuggest.nonsponsored" = false; # URL bar suggestions that are not helpful - "browser.urlbar.suggest.quicksuggest.sponsored" = false; # - "browser.urlbar.suggest.quicksuggest.all" = false; # - "browser.newtabpage.activity-stream.showWeather" = false; # Home page stuff - "browser.newtabpage.activity-stream.widgets.weather.enabled" = false; # (v169; wasnt in v155) - "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; # - "browser.newtabpage.activity-stream.showSponsored" = false; # - "browser.newtabpage.activity-stream.showSponsoredCheckboxes" = false; # (v169; wasnt in v155) - "browser.newtabpage.activity-stream.showSearch" = false; # - "browser.newtabpage.activity-stream.feeds.topsites" = false; # - "browser.newtabpage.activity-stream.feeds.section.topstories" = false; # - "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" = false; # Recommend things as you browse (features and extension) - "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" = false;# - # ...except this one - "browser.urlbar.suggest.searches" = true; - - # Stop sending random data somewhere - "datareporting.policy.dataSubmissionEnabled" = false; # ((apparently this is a "master switch" for the following, https://github.com/arkenfox/user.js/issues/1979#issuecomment-3092426359)) - "datareporting.usage.uploadEnabled" = false; # (this is "Send daily usage ping to Mozilla") - "datareporting.healthreport.uploadEnabled" = false; # (this is "Send technical and interaction data to Mozilla") - - # Do not update between major version - "nimbus.rollouts.enabled" = false; # (this is "Allow Firefox to run Feature Studies" in the settings, Nimbus is Firefox's experimentation system https://firefox-source-docs.mozilla.org/toolkit/components/nimbus/docs/index.html) - # (this is "Allow Firefox to improve features, performance, and stability between updates") - - # Ignore all the annoying autofill stuff, do not store it with Firefox - "signon.autofillForms" = false; - "signon.rememberSignons" = false; - "signon.management.page.breach-alerts.enabled" = false; - "signon.generation.enabled" = false; - "extensions.formautofill.creditCards.enabled" = false; - "extensions.formautofill.addresses.enabled" = false; - #"extensions.formautofill.creditCards.reauth.optout" = "..."; Unused if not autofilling - # ...except these are useful - "dom.forms.autocomplete.formautofill" = true; - - # New sidebar (closer to tree-style-tabs) - "sidebar.revamp" = true; - "sidebar.verticalTabs" = true; - "sidebar.verticalTabs.dragToPinPromo.dismissed" = true; - "sidebar.new-sidebar.has-used" = true; - - # Eventually... - # user_pref("doh-rollout.doneFirstRun", true); - # user_pref("doh-rollout.home-region", "US"); - # user_pref("doh-rollout.mode", 2); - # user_pref("doh-rollout.self-enabled", true); - # user_pref("doh-rollout.uri", "https://mozilla.cloudflare-dns.com/dns-query"); - # user_pref("extensions.activeThemeID", "default-theme@mozilla.org"); - # user_pref("extensions.ui.dictionary.hidden", true); - # user_pref("extensions.ui.lastCategory", "addons://discover/"); - # user_pref("extensions.ui.locale.hidden", true); - # user_pref("extensions.ui.mlmodel.hidden", true); - # user_pref("extensions.ui.sitepermission.hidden", true); - # user_pref("extensions.webcompat.enable_shims", true); - # user_pref("extensions.webcompat.perform_injections", true); - # user_pref("extensions.webextensions.uuids", "{\"formautofill@mozilla.org\":\"06c055d2-0ab7-4150-94da-2684a4047fac\",\"newtab@mozilla.org\":\"cc7ff77f-048a-4eaf-b2b6-18dca9002f17\",\"pictureinpicture@mozilla.org\":\"6df88524-2ed7-4db1-9180-3923173df2c1\",\"addons-search-detection@mozilla.com\":\"49e85db1-e088-4aa2-98fd-832e71b8e196\",\"webcompat@mozilla.org\":\"9a310967-e580-48bf-b3e8-4eafebbc122d\",\"default-theme@mozilla.org\":\"980e9514-427a-40bd-ad9e-7780aa15af72\"}"); - # user_pref("privacy.trackingprotection.emailtracking.enabled", true); - # user_pref("privacy.trackingprotection.enabled", true); - # user_pref("privacy.trackingprotection.socialtracking.enabled", true); - - #TODO: One thing I did not find a setting for was the "Restore old windows and tabs on open" option - }; - }; - }; - }; - } + +# TODO: +# Krita, symlink the whole config folder +# home.packages = with pkgs; [ krita ]; +# home.file.".local/share/krita".source = config.lib.file.mkOutOfStoreSymlink "/dotfiles/krita"; + +# TODO: I need to audit these more in depth still, or possibly run these differently +# like with a Dockerized desktop? +# home.packages = with pkgs; [ dbeaver-bin ungoogled-chromium seafile-client signal-desktop sqlitebrowser vlc ]; + +#Desktop Files +# TODO: I dont think I need this because I am no longer using an app image? +# home.file.".local/share/applications/obsidian.desktop".source = config.lib.file.mkOutOfStoreSymlink "/dotfiles/desktop/obsidian.desktop"; +# home.file.".local/share/applications/krita.desktop".source = config.lib.file.mkOutOfStoreSymlink "/dotfiles/desktop/krita.desktop"; + +# TODO: Not covered: Balena etcher, activitywatch, DiscordChatExporter, +# TODO: Not researched: Blender + +# TODO: Come back to this if I really end up caring again... +# Fonts +# fontsPath = f"{userHome}/.local/share/fonts" +# SymLinkOp(env(f"{os.path.realpath(scriptDir)}/fonts/Blobmoji.ttf"), f"{fontsPath}/Blobmoji.ttf")() +# SymLinkOp(env(f"{os.path.realpath(scriptDir)}/fonts/TwitterColorEmoji-SVGinOT.ttf"), f"{fontsPath}/TwitterColorEmoji-SVGinOT.ttf")() +# RemoveFileOp(f"/usr/share/fonts/truetype/noto/NotoColorEmoji.ttf")() # Delete normal NotoColorEmoji font diff --git a/desktop-x11-generic.nix b/desktop-x11-generic.nix index 13b203a..a5cd4d9 100644 --- a/desktop-x11-generic.nix +++ b/desktop-x11-generic.nix @@ -1,7 +1,18 @@ -{ config, pkgs, ...}: -{ +{ config, pkgs, ...}: { + imports = [ + ./nix/hm-firefox.nix + ]; home.packages = with pkgs; [ - firefox flameshot activitywatch dos2unix ffmpeg nmap xclip nodejs-slim_26 pnpm typescript typescript-language-server + flameshot + activitywatch + dos2unix + ffmpeg + nmap + xclip + nodejs-slim_26 + pnpm + typescript + typescript-language-server ]; services.activitywatch = { @@ -11,129 +22,4 @@ aw-watcher-window = {}; }; }; - - programs.firefox = { - enable = true; - profiles = { - default = { - id = 0; - name = "default"; - isDefault = true; - settings = { - "browser.startup.homepage" = "https://kagi.com"; - "browser.search.defaultenginename" = "Kagi"; - "browser.search.order.1" = "Kagi"; - }; - search = { - force = true; - default = "Kagi"; - order = [ "Kagi" ]; - engines = { - "Kagi" = { - urls = [{ template = "https://kagi.com/search?q={searchTerms}"; }]; - icon = "https://kagi.com/favicon.ico"; - # updateInterval = 24 * 60 * 60 * 1000; # every day - }; - # "Bing".metaData.hidden = true; - # "Google".metaData.alias = "@g"; # builtin engines only support specifying one additional alias - }; - }; - # TODO: I don't particularly like how this manages the extensions wrt permissions, so I just do this - # manually rn - # extensions = { - # packages = with pkgs.nur.repos.rycee.firefox-addons; [ - # ublock-origin - # bitwarden - # youtube enhancer - # tab counter plus, https://addons.mozilla.org/en-US/firefox/addon/tab-counter-plus/ - # return youtube dislike - # - # - # deferred on these ones for now: - # singlefile - # - # ]; - - settings = { - # Defaults I dont want to trigger again - "browser.bookmarks.addedImportButton" = true; - "browser.bookmarks.restore_default_bookmarks" = false; - "browser.engagement.fxa-toolbar-menu-button.has-used" = true; - "browser.download.panel.shown" = true; - "browser.toolbarbuttons.introduced.sidebar-button" = true; - "identity.fxaccounts.toolbar.syncSetup.panelAccessed" = true; - "toolkit.telemetry.reportingpolicy.firstRun" = false; - "trailhead.firstrun.didSeeAboutWelcome" = true; - - # Content blocking - "browser.contentblocking.category" = "strict"; - - # Disable all the suggestions - "browser.urlbar.suggest.quicksuggest.nonsponsored" = false; # URL bar suggestions that are not helpful - "browser.urlbar.suggest.quicksuggest.sponsored" = false; # - "browser.urlbar.suggest.quicksuggest.all" = false; # - "browser.newtabpage.activity-stream.showWeather" = false; # Home page stuff - "browser.newtabpage.activity-stream.widgets.weather.enabled" = false; # (v169; wasnt in v155) - "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; # - "browser.newtabpage.activity-stream.showSponsored" = false; # - "browser.newtabpage.activity-stream.showSponsoredCheckboxes" = false; # (v169; wasnt in v155) - "browser.newtabpage.activity-stream.showSearch" = false; # - "browser.newtabpage.activity-stream.feeds.topsites" = false; # - "browser.newtabpage.activity-stream.feeds.section.topstories" = false; # - "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" = false; # Recommend things as you browse (features and extension) - "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" = false;# - # ...except this one - "browser.urlbar.suggest.searches" = true; - - # Stop sending random data somewhere - "datareporting.policy.dataSubmissionEnabled" = false; # ((apparently this is a "master switch" for the following, https://github.com/arkenfox/user.js/issues/1979#issuecomment-3092426359)) - "datareporting.usage.uploadEnabled" = false; # (this is "Send daily usage ping to Mozilla") - "datareporting.healthreport.uploadEnabled" = false; # (this is "Send technical and interaction data to Mozilla") - - # Do not update between major version - "nimbus.rollouts.enabled" = false; # (this is "Allow Firefox to run Feature Studies" in the settings, Nimbus is Firefox's experimentation system https://firefox-source-docs.mozilla.org/toolkit/components/nimbus/docs/index.html) - # (this is "Allow Firefox to improve features, performance, and stability between updates") - - # Ignore all the annoying autofill stuff, do not store it with Firefox - "signon.autofillForms" = false; - "signon.rememberSignons" = false; - "signon.management.page.breach-alerts.enabled" = false; - "signon.generation.enabled" = false; - "extensions.formautofill.creditCards.enabled" = false; - "extensions.formautofill.addresses.enabled" = false; - #"extensions.formautofill.creditCards.reauth.optout" = "..."; Unused if not autofilling - # ...except these are useful - "dom.forms.autocomplete.formautofill" = true; - - # New sidebar (closer to tree-style-tabs) - "sidebar.revamp" = true; - "sidebar.verticalTabs" = true; - "sidebar.verticalTabs.dragToPinPromo.dismissed" = true; - "sidebar.new-sidebar.has-used" = true; - - # Eventually... - # user_pref("doh-rollout.doneFirstRun", true); - # user_pref("doh-rollout.home-region", "US"); - # user_pref("doh-rollout.mode", 2); - # user_pref("doh-rollout.self-enabled", true); - # user_pref("doh-rollout.uri", "https://mozilla.cloudflare-dns.com/dns-query"); - # user_pref("extensions.activeThemeID", "default-theme@mozilla.org"); - # user_pref("extensions.ui.dictionary.hidden", true); - # user_pref("extensions.ui.lastCategory", "addons://discover/"); - # user_pref("extensions.ui.locale.hidden", true); - # user_pref("extensions.ui.mlmodel.hidden", true); - # user_pref("extensions.ui.sitepermission.hidden", true); - # user_pref("extensions.webcompat.enable_shims", true); - # user_pref("extensions.webcompat.perform_injections", true); - # user_pref("extensions.webextensions.uuids", "{\"formautofill@mozilla.org\":\"06c055d2-0ab7-4150-94da-2684a4047fac\",\"newtab@mozilla.org\":\"cc7ff77f-048a-4eaf-b2b6-18dca9002f17\",\"pictureinpicture@mozilla.org\":\"6df88524-2ed7-4db1-9180-3923173df2c1\",\"addons-search-detection@mozilla.com\":\"49e85db1-e088-4aa2-98fd-832e71b8e196\",\"webcompat@mozilla.org\":\"9a310967-e580-48bf-b3e8-4eafebbc122d\",\"default-theme@mozilla.org\":\"980e9514-427a-40bd-ad9e-7780aa15af72\"}"); - # user_pref("privacy.trackingprotection.emailtracking.enabled", true); - # user_pref("privacy.trackingprotection.enabled", true); - # user_pref("privacy.trackingprotection.socialtracking.enabled", true); - - #TODO: One thing I did not find a setting for was the "Restore old windows and tabs on open" option - }; - }; - }; - }; - } diff --git a/desktop.nix.unused b/desktop.nix.unused deleted file mode 100644 index 94caa44..0000000 --- a/desktop.nix.unused +++ /dev/null @@ -1,45 +0,0 @@ -{ config, pkgs, ...}: -{ - # Firefox - #home.packages = with pkgs; [ firefox ]; - #home.file.".bashrc".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dotfiles/.bashrc"; - - # TODO: This used to be a glob to SEARCH for the first one, because there might be multiple - local ffBase = ".mozilla/firefox/*.default-release" - home.file.".${ffBase}/chrome/userChrome.css".source = config.lib.file.mkOutOfStoreSymlink "/dotfiles/firefox/userChrome.css"; - home.file.".${ffBase}/chrome/user.js".source = config.lib.file.mkOutOfStoreSymlink "/dotfiles/firefox/user.js"; - - # Krita, symlink the whole config folder - home.packages = with pkgs; [ krita ]; - home.file.".local/share/krita".source = config.lib.file.mkOutOfStoreSymlink "/dotfiles/krita"; - - # Sublime - # Sublime - # sublime-text - # TODO: Readd sublime - home.packages = with pkgs; [ sublime ]; - home.file.".config/sublime-text-3/Packages/User".source = config.lib.file.mkOutOfStoreSymlink "/dotfiles/sublime/Packages/User"; - - # others - home.packages = with pkgs; [ obs-studio flameshot obsidian ]; - - - # TODO: I need to audit these more in depth still, or possibly run these differently - # like with a Dockerized desktop? - # home.packages = with pkgs; [ dbeaver-bin ungoogled-chromium seafile-client signal-desktop sqlitebrowser vlc xclip kmonad ]; - - #Desktop Files - # TODO: I dont think I need this because I am no longer using an app image? - home.file.".local/share/applications/obsidian.desktop".source = config.lib.file.mkOutOfStoreSymlink "/dotfiles/desktop/obsidian.desktop"; - home.file.".local/share/applications/krita.desktop".source = config.lib.file.mkOutOfStoreSymlink "/dotfiles/desktop/krita.desktop"; - - # TODO: Not covered: Balena etcher, activitywatch, DiscordChatExporter, - # TODO: Not researched: Blender -} - -# TODO: Come back to this if I really end up caring again... -# Fonts -# fontsPath = f"{userHome}/.local/share/fonts" -# SymLinkOp(env(f"{os.path.realpath(scriptDir)}/fonts/Blobmoji.ttf"), f"{fontsPath}/Blobmoji.ttf")() -# SymLinkOp(env(f"{os.path.realpath(scriptDir)}/fonts/TwitterColorEmoji-SVGinOT.ttf"), f"{fontsPath}/TwitterColorEmoji-SVGinOT.ttf")() -# RemoveFileOp(f"/usr/share/fonts/truetype/noto/NotoColorEmoji.ttf")() # Delete normal NotoColorEmoji font \ No newline at end of file diff --git a/nix/hm-firefox.nix b/nix/hm-firefox.nix new file mode 100644 index 0000000..6b6e5a3 --- /dev/null +++ b/nix/hm-firefox.nix @@ -0,0 +1,138 @@ +{ config, pkgs, identity, dotfilesPath, ...}: { + programs.home-manager.enable = true; + + home.packages = with pkgs; [ + firefox + ]; + + programs.firefox = { + enable = true; + configPath = "${config.xdg.configHome}/mozilla/firefox"; + profiles = { + default = { + id = 0; + name = "default"; + isDefault = true; + settings = { + "browser.startup.homepage" = "https://kagi.com"; + "browser.search.defaultenginename" = "Kagi"; + "browser.search.order.1" = "Kagi"; + }; + search = { + force = true; + default = "Kagi"; + order = [ "Kagi" ]; + engines = { + "Kagi" = { + urls = [{ template = "https://kagi.com/search?q={searchTerms}"; }]; + icon = "https://kagi.com/favicon.ico"; + # updateInterval = 24 * 60 * 60 * 1000; # every day + }; + # "Bing".metaData.hidden = true; + # "Google".metaData.alias = "@g"; # builtin engines only support specifying one additional alias + }; + }; + userChrome = builtins.readFile ../.config/mozilla/userChrome.css; + # TODO: I don't particularly like how this manages the extensions wrt permissions, so I just do this + # manually rn + # extensions = { + # packages = with pkgs.nur.repos.rycee.firefox-addons; [ + # ublock-origin + # bitwarden + # youtube enhancer + # tab counter plus, https://addons.mozilla.org/en-US/firefox/addon/tab-counter-plus/ + # return youtube dislike + # facebook container + # firefox multi account containers (MAC) + # + # + # deferred on these ones for now: + # singlefile + # + # ]; + + settings = { + # Make userChrome load + "toolkit.legacyUserProfileCustomizations.stylesheets" = true; + + # Defaults I dont want to trigger again + "browser.bookmarks.addedImportButton" = true; + "browser.bookmarks.restore_default_bookmarks" = false; + "browser.engagement.fxa-toolbar-menu-button.has-used" = true; + "browser.download.panel.shown" = true; + "browser.toolbarbuttons.introduced.sidebar-button" = true; + "identity.fxaccounts.toolbar.syncSetup.panelAccessed" = true; + "toolkit.telemetry.reportingpolicy.firstRun" = false; + "trailhead.firstrun.didSeeAboutWelcome" = true; + + # Content blocking + "browser.contentblocking.category" = "strict"; + + # Disable all the suggestions + "browser.urlbar.suggest.quicksuggest.nonsponsored" = false; # URL bar suggestions that are not helpful + "browser.urlbar.suggest.quicksuggest.sponsored" = false; # + "browser.urlbar.suggest.quicksuggest.all" = false; # + "browser.newtabpage.activity-stream.showWeather" = false; # Home page stuff + "browser.newtabpage.activity-stream.widgets.weather.enabled" = false; # (v169; wasnt in v155) + "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; # + "browser.newtabpage.activity-stream.showSponsored" = false; # + "browser.newtabpage.activity-stream.showSponsoredCheckboxes" = false; # (v169; wasnt in v155) + "browser.newtabpage.activity-stream.showSearch" = false; # + "browser.newtabpage.activity-stream.feeds.topsites" = false; # + "browser.newtabpage.activity-stream.feeds.section.topstories" = false; # + "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" = false; # Recommend things as you browse (features and extension) + "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" = false;# + # ...except this one + "browser.urlbar.suggest.searches" = true; + + # Stop sending random data somewhere + "datareporting.policy.dataSubmissionEnabled" = false; # ((apparently this is a "master switch" for the following, https://github.com/arkenfox/user.js/issues/1979#issuecomment-3092426359)) + "datareporting.usage.uploadEnabled" = false; # (this is "Send daily usage ping to Mozilla") + "datareporting.healthreport.uploadEnabled" = false; # (this is "Send technical and interaction data to Mozilla") + + # Do not update between major version + "nimbus.rollouts.enabled" = false; # (this is "Allow Firefox to run Feature Studies" in the settings, Nimbus is Firefox's experimentation system https://firefox-source-docs.mozilla.org/toolkit/components/nimbus/docs/index.html) + # (this is "Allow Firefox to improve features, performance, and stability between updates") + + # Ignore all the annoying autofill stuff, do not store it with Firefox + "signon.autofillForms" = false; + "signon.rememberSignons" = false; + "signon.management.page.breach-alerts.enabled" = false; + "signon.generation.enabled" = false; + "extensions.formautofill.creditCards.enabled" = false; + "extensions.formautofill.addresses.enabled" = false; + #"extensions.formautofill.creditCards.reauth.optout" = "..."; Unused if not autofilling + # ...except these are useful + "dom.forms.autocomplete.formautofill" = true; + + # New sidebar (closer to tree-style-tabs) + "sidebar.revamp" = true; + "sidebar.verticalTabs" = true; + "sidebar.verticalTabs.dragToPinPromo.dismissed" = true; + "sidebar.new-sidebar.has-used" = true; + + # Eventually... + # user_pref("doh-rollout.doneFirstRun", true); + # user_pref("doh-rollout.home-region", "US"); + # user_pref("doh-rollout.mode", 2); + # user_pref("doh-rollout.self-enabled", true); + # user_pref("doh-rollout.uri", "https://mozilla.cloudflare-dns.com/dns-query"); + # user_pref("extensions.activeThemeID", "default-theme@mozilla.org"); + # user_pref("extensions.ui.dictionary.hidden", true); + # user_pref("extensions.ui.lastCategory", "addons://discover/"); + # user_pref("extensions.ui.locale.hidden", true); + # user_pref("extensions.ui.mlmodel.hidden", true); + # user_pref("extensions.ui.sitepermission.hidden", true); + # user_pref("extensions.webcompat.enable_shims", true); + # user_pref("extensions.webcompat.perform_injections", true); + # user_pref("extensions.webextensions.uuids", "{\"formautofill@mozilla.org\":\"06c055d2-0ab7-4150-94da-2684a4047fac\",\"newtab@mozilla.org\":\"cc7ff77f-048a-4eaf-b2b6-18dca9002f17\",\"pictureinpicture@mozilla.org\":\"6df88524-2ed7-4db1-9180-3923173df2c1\",\"addons-search-detection@mozilla.com\":\"49e85db1-e088-4aa2-98fd-832e71b8e196\",\"webcompat@mozilla.org\":\"9a310967-e580-48bf-b3e8-4eafebbc122d\",\"default-theme@mozilla.org\":\"980e9514-427a-40bd-ad9e-7780aa15af72\"}"); + # user_pref("privacy.trackingprotection.emailtracking.enabled", true); + # user_pref("privacy.trackingprotection.enabled", true); + # user_pref("privacy.trackingprotection.socialtracking.enabled", true); + + #TODO: One thing I did not find a setting for was the "Restore old windows and tabs on open" option + }; + }; + }; + }; +} diff --git a/nix/hm-sublime-text.nix b/nix/hm-sublime-text.nix index 34121a2..4adc8fa 100644 --- a/nix/hm-sublime-text.nix +++ b/nix/hm-sublime-text.nix @@ -186,6 +186,11 @@ in { # * Requires unfree packages # * In nixpkgs-26.05 - It requires openssl1_1 which is unsupported and requires a special flag to install (I couldn't get it to work) # * In nixpkgs-unstable - openssl1_1 was removed and the package host fails, so no packages can be used. sublime4 was marked broken + # + # tracking + # https://github.com/sublimehq/sublime_text/issues/5984 + # https://github.com/NixOS/nixpkgs/pull/531298 + # # home.packages = with pkgs; [ # sublime4 # ]; From 86fbd7649b4be284b2b088ba6c44b81d9664c52b Mon Sep 17 00:00:00 2001 From: cobertos Date: Wed, 29 Jul 2026 19:25:31 -0400 Subject: [PATCH 10/10] Disable sublime plugin host python 3.3, reformat to spaces --- .../User/Preferences.sublime-settings | 91 ++++++++++--------- 1 file changed, 46 insertions(+), 45 deletions(-) diff --git a/.config/sublime-text/Packages/User/Preferences.sublime-settings b/.config/sublime-text/Packages/User/Preferences.sublime-settings index 1c86daf..1e7aeb6 100644 --- a/.config/sublime-text/Packages/User/Preferences.sublime-settings +++ b/.config/sublime-text/Packages/User/Preferences.sublime-settings @@ -1,47 +1,48 @@ { - "auto_complete": true, - "auto_complete_commit_on_tab": true, - "auto_complete_triggers": - [ - { - "characters": ".(){}[],'\"=<>/\\+-|&*%=$#@! ", - "selector": "source.python", - }, - { - "characters": ":.(){}[],'\"=<>/\\+-|&*%=$#@! ", - "selector": "source & - source.python - constant.numeric", - }, - { - "characters": " qazwsxedcrfvtgbyhnujmikolpQAZWSXEDCRFVTGBYHNUJMIKOLP", - "selector": "text", - } - ], - "auto_match_enabled": false, - "color_scheme": "Monokai.sublime-color-scheme", - "draw_white_space": "all", - "folder_exclude_patterns": - [ - ".svn", - ".git", - ".hg", - "CVS", - "node_modules" - ], - "font_size": 10, - "ignored_packages": - [ - "Vintage", - ], - "margin": 0, - "rulers": - [ - 80 - ], - "shift_tab_unindent": true, - "show_encoding": true, - "show_line_endings": true, - "tab_size": 2, - "theme": "Adaptive.sublime-theme", - "translate_tabs_to_spaces": true, - "index_files": false, + "disable_plugin_host_3.3": true, + "auto_complete": true, + "auto_complete_commit_on_tab": true, + "auto_complete_triggers": + [ + { + "characters": ".(){}[],'\"=<>/\\+-|&*%=$#@! ", + "selector": "source.python", + }, + { + "characters": ":.(){}[],'\"=<>/\\+-|&*%=$#@! ", + "selector": "source & - source.python - constant.numeric", + }, + { + "characters": " qazwsxedcrfvtgbyhnujmikolpQAZWSXEDCRFVTGBYHNUJMIKOLP", + "selector": "text", + } + ], + "auto_match_enabled": false, + "color_scheme": "Monokai.sublime-color-scheme", + "draw_white_space": "all", + "folder_exclude_patterns": + [ + ".svn", + ".git", + ".hg", + "CVS", + "node_modules" + ], + "font_size": 10, + "ignored_packages": + [ + "Vintage", + ], + "margin": 0, + "rulers": + [ + 80 + ], + "shift_tab_unindent": true, + "show_encoding": true, + "show_line_endings": true, + "tab_size": 2, + "theme": "Adaptive.sublime-theme", + "translate_tabs_to_spaces": true, + "index_files": false, }