remove home suites

This commit is contained in:
xunuwu 2025-06-06 11:15:32 +02:00
parent 40b0d84f53
commit 2c475dd099
Signed by: xun
SSH key fingerprint: SHA256:Uot/1WoAjWAeqLOHA5vYy4phhVydsH7jCPmBjaPZfgI
63 changed files with 163 additions and 198 deletions

View file

@ -0,0 +1,9 @@
{pkgs, ...}: {
programs.chromium = {
enable = true;
# package = pkgs.ungoogled-chromium;
extensions = [
{id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";} # ublock origin
];
};
}

View file

@ -0,0 +1,142 @@
{
pkgs,
lib,
config,
inputs,
...
}: {
imports = [
./search-engines.nix
];
xdg.configFile."tridactyl/tridactylrc" = {
text = ''
unbind <C-e>
unbind <C-b>
unbind <C-a>
bind J tabnext
bind K tabprev
set smoothscroll true
set newtab about:blank
set modeindicator false
'';
};
programs.firefox = {
enable = true;
package = pkgs.firefox.override {
nativeMessagingHosts = with pkgs; [
tridactyl-native
keepassxc
];
};
profiles.xun = {
extensions.packages = with inputs.firefox-addons.packages.${pkgs.system}; [
ublock-origin
# (lib.mkIf (config.xun.desktop.colorscheme == "dark") darkreader)
darkreader
sponsorblock
tridactyl
translate-web-pages
cookie-quick-manager
istilldontcareaboutcookies
sidebery
mal-sync
bitwarden
# (lib.mkIf (builtins.elem pkgs.keepassxc config.home.packages) keepassxc-browser)
#(buildFirefoxXpiAddon rec {
# pname = "roseal";
# version = "1.3.44";
# addonId = "{f4f4223a-ff30-4961-b9c0-6a71b7a32aaf}";
# url = "https://addons.mozilla.org/firefox/downloads/file/4323142/roseal-${version}.xpi";
# sha256 = "sha256-Qvd/EUMsSqYCvwUuxjM/ejnn7/TRuhyD82/Azu0dAfE=";
# meta = {};
#})
];
userChrome = builtins.readFile ./userChrome.css;
# extraConfig = let
# inherit (config.xun.desktop) colorscheme;
# in
# lib.mkIf (colorscheme != null)
# "browser.management.setEnabled(\"${
# if colorscheme == "dark"
# then "{30756de5-da3b-43c4-8b35-1db7bb01680a}"
# else if colorscheme == "light"
# then "firefox-compact-light@mozilla.org"
# else null
# }\", true);";
settings = {
"browser.display.use_system_colors" = true; # about:blank colour match colourscheme
"toolkit.legacyUserProfileCustomizations.stylesheets" = true; # enable userChrome
"browser.tabs.inTitleBar" = "0"; # use system title bar
"browser.newtabpage.enabled" = false;
"browser.newtab.url" = "about:blank";
"general.autoScroll" = true; # mmb scroll mode
"accessibility.typeaheadfind.enablesound" = false; # disable system bell when using ctrl+f
"browser.newtabpage.enhanced" = false;
"browser.newtabpage.introShown" = true;
"browser.newtab.preload" = false;
"browser.newtabpage.directory.ping" = "";
"browser.newtabpage.directory.source" = "data:text/plain,{}";
# Reduce search engine noise in the urlbar's completion window. The
# shortcuts and suggestions will still work, but Firefox won't clutter
# its UI with reminders that they exist.
"browser.urlbar.suggest.searches" = false;
"browser.urlbar.shortcuts.bookmarks" = false;
"browser.urlbar.shortcuts.history" = false;
"browser.urlbar.shortcuts.tabs" = false;
"browser.urlbar.showSearchSuggestionsFirst" = false;
"browser.urlbar.speculativeConnect.enabled" = false;
"browser.download.useDownloadDir" = false;
"signon.rememberSignons" = false;
"browser.shell.checkDefaultBrowser" = false;
# Show whole URL in address bar
"browser.urlbar.trimURLs" = false;
# Disable some not so useful functionality.
"browser.disableResetPrompt" = true; # "Looks like you haven't started Firefox in a while."
"browser.onboarding.enabled" = false; # "New to Firefox? Let's get started!" tour
"browser.aboutConfig.showWarning" = false; # Warning when opening about:config
# "media.videocontrols.picture-in-picture.video-toggle.enabled" = false;
"extensions.autoDisableScopes" = "0"; # Automatically enable extensions
# "extensions.pocket.enabled" = true;
"extensions.shield-recipe-client.enabled" = false;
#"reader.parse-on-load.enabled" = false; # "reader view"
# disable telemetry
# https://github.com/hlissner/dotfiles/blob/089f1a9da9018df9e5fc200c2d7bef70f4546026/modules/desktop/browsers/firefox.nix
"toolkit.telemetry.unified" = false;
"toolkit.telemetry.enabled" = false;
"toolkit.telemetry.server" = "data:,";
"toolkit.telemetry.archive.enabled" = false;
"toolkit.telemetry.coverage.opt-out" = true;
"toolkit.coverage.opt-out" = true;
"toolkit.coverage.endpoint.base" = "";
"experiments.supported" = false;
"experiments.enabled" = false;
"experiments.manifest.uri" = "";
"browser.ping-centre.telemetry" = false;
"app.normandy.enabled" = false;
"app.normandy.api_url" = "";
"app.shield.optoutstudies.enabled" = false;
"datareporting.healthreport.uploadEnabled" = false;
"datareporting.healthreport.service.enabled" = false;
"datareporting.policy.dataSubmissionEnabled" = false;
# Disable crash reports
"breakpad.reportURL" = "";
"browser.tabs.crashReporting.sendReport" = false;
"browser.crashReports.unsubmittedCheck.autoSubmit2" = false;
# Disable Form autofill
# https://wiki.mozilla.org/Firefox/Features/Form_Autofill
"browser.formfill.enable" = false;
"extensions.formautofill.addresses.enabled" = false;
"extensions.formautofill.available" = "off";
"extensions.formautofill.creditCards.available" = false;
"extensions.formautofill.creditCards.enabled" = false;
"extensions.formautofill.heuristics.enabled" = false;
};
};
};
}

View file

@ -0,0 +1,78 @@
{
lib,
pkgs,
...
}: {
programs.firefox.profiles.xun.search = let
inherit (lib) attrsToList singleton;
in {
force = true;
default = "google";
order = [
"google"
"Brave"
"ddg"
];
engines = let
mkUrl = x: lib.singleton {template = x;};
in {
"Home Manager" = {
urls = mkUrl "https://home-manager-options.extranix.com?release=master&query={searchTerms}";
icon = "https://home-manager-options.extranix.com/images/favicon.png";
definedAliases = ["@hm"];
};
"Nix Packages" = {
urls = mkUrl "https://search.nixos.org/packages?channel=unstable&query={searchTerms}";
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@np"];
};
"NixOS Options" = {
urls = mkUrl "https://search.nixos.org/options?channel=unstable&query={searchTerms}";
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@no"];
};
"GitHub" = {
urls = mkUrl "https://github.com/search?type=code&q={searchTerms}";
icon = "https://github.githubassets.com/favicons/favicon-dark.svg";
definedAliases = ["@gh"];
};
"GitHub Repos" = {
urls = mkUrl "https://github.com/search?q={searchTerms}";
icon = "https://github.githubassets.com/favicons/favicon-dark.svg";
definedAliases = ["@ghr"];
};
"GitHub Nix" = {
urls = mkUrl "https://github.com/search?type=code&q=lang:nix NOT is:fork {searchTerms}";
icon = "https://github.githubassets.com/favicons/favicon-dark.svg";
definedAliases = ["@ghn"];
};
"Brave" = {
urls = mkUrl "https://search.brave.com/search?q={searchTerms}";
icon = "https://brave.com/static-assets/images/brave-favicon.png";
definedAliases = ["@b"];
};
"youtube" = {
urls = mkUrl "https://www.youtube.com/results?search_query={searchTerms}";
icon = "https://www.youtube.com/favicon.ico";
definedAliases = ["@yt"];
};
"crates.io" = {
urls = mkUrl "https://crates.io/search?q={searchTerms}";
icon = "https://crates.io/favicon.ico";
definedAliases = ["@cr"];
};
"noogle" = {
url = mkUrl "https://noogle.dev/q?term={searchTerms}";
icon = "https://noogle.dev/favicon.png";
definedAliases = ["@noogle"];
};
"google".metaData.alias = "@go";
"ddb".metaData.alias = "@ddg";
"wikipedia".metaData.alias = "@wiki";
"bing".metaData.alias = "@bi";
};
};
}

View file

@ -0,0 +1,19 @@
/* Hide sidebar header */
#sidebar-header {
display: none;
}
/* Hide tab bar */
#TabsToolbar {
visibility: collapse;
}
/* urlbar same color as background */
#urlbar-background, #searchbar {
background-color: var(--toolbar-bgcolor) !important;
}
/* Hide tiny strip below the main top bar */
#navigator-toolbox {
border-bottom: none !important;
}

View file

@ -0,0 +1,7 @@
{pkgs, ...}: {
home.packages = with pkgs; [
(tor-browser.override {
mediaSupport = false;
})
];
}

View file

@ -0,0 +1,16 @@
{
lib,
pkgs,
...
}: {
programs.fuzzel = {
enable = true;
settings = {
main = {
terminal = "${lib.getExe pkgs.foot}";
layer = "overlay";
dpi-aware = false;
};
};
};
}

View file

@ -0,0 +1,5 @@
{pkgs, ...}: {
home.packages = with pkgs; [
wl-clipboard
];
}

View file

@ -0,0 +1,5 @@
{
services.wob = {
enable = true;
};
}

View file

@ -0,0 +1,16 @@
{pkgs, ...}: {
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-wlr
xdg-desktop-portal-gtk
];
config = {
preferred = {
default = "gtk";
"org.freedesktop.impl.portal.Screenshot" = "wlr";
"org.freedesktop.impl.portal.Screencast" = "wlr";
};
};
};
}

View file

@ -0,0 +1,155 @@
{
config,
pkgs,
lib,
osConfig,
...
}: {
imports = [
../common/fuzzel.nix
../common/wob.nix
../common/wl-clipboard.nix
./waybar.nix
];
# services.gnome-keyring = {
# enable = true;
# components = ["secrets"];
# };
services.cliphist = {
enable = true;
systemdTargets = ["sway-session.target"];
extraOptions = ["-max-items" "150"];
};
# notification center
services.swaync = {
enable = true;
settings = {
timeout = 4;
positionX = "right";
positionY = "top";
layer = "overlay";
control-center-layer = "top";
layer-shell = true;
cssPriority = "application";
control-center-margin-top = 0;
control-center-margin-bottom = 0;
control-center-margin-right = 0;
control-center-margin-left = 0;
notification-2fa-action = true;
notification-inline-replies = false;
notification-icon-size = 64;
notification-body-image-height = 100;
notification-body-image-width = 200;
};
};
wayland.systemd.target = "sway-session.target";
wayland.windowManager.sway = {
enable = true;
checkConfig = true; # doesnt work with custom wallpaper
extraSessionCommands = ''
export SDL_VIDEODRIVER=wayland,x11,windows
export NIXOS_OZONE_WL=1
export QT_QPA_PLATFORM=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export _JAVA_AWT_WM_NONREPARENTING=1
'';
config = {
modifier = "Mod4";
input."type:keyboard".xkb_layout = osConfig.services.xserver.xkb.layout;
bars = []; # i use waybar instead
window = {
titlebar = false;
};
floating.criteria = [
{
app_id = "org.keepassxc.KeePassXC";
title = "^KeePassXC - "; # should only match popups
}
];
menu = "${lib.getExe pkgs.fuzzel}";
keybindings = let
mod = config.wayland.windowManager.sway.config.modifier;
wobVolume = "${pkgs.wireplumber}/bin/wpctl get-volume @DEFAULT_SINK@ | awk '{print $2*100}' > $XDG_RUNTIME_DIR/wob.sock";
setVolume = limit: amount: "${pkgs.wireplumber}/bin/wpctl set-volume -l ${limit} @DEFAULT_AUDIO_SINK@ ${amount}";
monitorId = pkgs.writers.writeBash "monitor-id" ''
swaymsg -t get_outputs \
| ${lib.getExe pkgs.jq} -r '.[] | select (.focused == true).name' \
| ${lib.getExe pkgs.perl} -ne '$s=0;for(split//){$s+=ord}print"$s"'
'';
pauseApp = pkgs.writers.writeBash "pause-app" ''
set -e
pid=$(swaymsg -t get_tree \
| ${lib.getExe pkgs.jq} -re '.. | select (.type? == "con" and .focused? == true).pid')
if [ $(cat "/proc/$pid/wchan") == "do_signal_stop" ]; then
kill -s SIGCONT $pid
else
kill -s SIGSTOP $pid
fi
'';
dir = {
inherit (config.wayland.windowManager.sway.config) up down left right;
};
in
lib.mkOptionDefault (
{
"${mod}+n" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -t";
"${mod}+Shift+v" = "exec ${lib.getExe pkgs.cliphist} list | ${lib.getExe pkgs.wofi} --dmenu | ${lib.getExe pkgs.cliphist} decode | ${pkgs.wl-clipboard}/bin/wl-copy";
"${mod}+Ctrl+${dir.left}" = "focus output left";
"${mod}+Ctrl+${dir.right}" = "focus output right";
"${mod}+Ctrl+${dir.up}" = "focus output up";
"${mod}+Ctrl+${dir.down}" = "focus output down";
"${mod}+Ctrl+Shift+${dir.left}" = "move output left";
"${mod}+Ctrl+Shift+${dir.right}" = "move output right";
"${mod}+Ctrl+Shift+${dir.up}" = "move output up";
"${mod}+Ctrl+Shift+${dir.down}" = "move output down";
"${mod}+Shift+t" = "sticky toggle";
"${mod}+Shift+Backspace" = "exec systemctl suspend";
"${mod}+Shift+s" = "exec ${lib.getExe pkgs.wayfreeze} --after-freeze-cmd '${lib.getExe pkgs.sway-contrib.grimshot} copy anything && pkill wayfreeze'";
"${mod}+Ctrl+Shift+s" = "exec ${lib.getExe pkgs.wayfreeze} --after-freeze-cmd '${lib.getExe pkgs.sway-contrib.grimshot} savecopy anything && pkill wayfreeze'";
# "${mod}+Alt+s" = "exec ${lib.getExe pkgs.wayfreeze} --after-freeze-cmd '${lib.getExe pkgs.sway-contrib.grimshot} save anything - | ${lib.getExe pkgs.tesseract} -l eng - - | wl-copy && pkill wayfreeze'";
"${mod}+Alt+s" = "exec ${lib.getExe pkgs.wayfreeze} --after-freeze-cmd '${lib.getExe pkgs.sway-contrib.grimshot} save anything - && pkill wayfreeze' | ${lib.getExe pkgs.satty} --disable-notifications --fullscreen -f -";
"${mod}+Shift+p" = "exec ${pauseApp}";
"${mod}+period" = "exec ${lib.getExe pkgs.bemoji}";
"XF86AudioRaiseVolume" = "exec ${setVolume "1.5" "3%+"} && ${wobVolume}";
"XF86AudioLowerVolume" = "exec ${setVolume "1.5" "3%-"} && ${wobVolume}";
"XF86AudioPlay" = "exec ${lib.getExe pkgs.playerctl} play-pause";
"XF86AudioStop" = "exec ${lib.getExe pkgs.playerctl} stop";
"XF86AudioNext" = "exec ${lib.getExe pkgs.playerctl} next";
"XF86AudioPrev" = "exec ${lib.getExe pkgs.playerctl} previous";
"XF86AudioMute" = "exec ${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_SINK@ toggle";
}
// (let
inherit (builtins) foldl';
inherit (lib) range;
in
foldl' (acc: x:
acc
// (let
y = toString x;
in {
"${mod}+${y}" = "exec swaymsg workspace number \"$(${monitorId})${y}:${y}\"";
"${mod}+Shift+${y}" = "exec swaymsg move container to workspace number \"$(${monitorId})${y}:${y}\"";
}))
{}
(range 0 9))
);
};
extraConfig = ''
bindcode 202 exec ${lib.getExe pkgs.obs-cmd} replay save # F24/numpad 1 on my ID75
'';
};
}

View file

@ -0,0 +1,16 @@
diff --git a/src/modules/sway/workspaces.cpp b/src/modules/sway/workspaces.cpp
index 8f273300..faed503c 100644
--- a/src/modules/sway/workspaces.cpp
+++ b/src/modules/sway/workspaces.cpp
@@ -343,9 +343,9 @@ auto Workspaces::update() -> void {
fmt::arg("output", (*it)["output"].asString()));
}
if (!config_["disable-markup"].asBool()) {
- static_cast<Gtk::Label *>(button.get_children()[0])->set_markup(output);
+ static_cast<Gtk::Label *>(button.get_children()[0])->set_markup(trimWorkspaceName(output));
} else {
- button.set_label(output);
+ button.set_label(trimWorkspaceName(output));
}
onButtonReady(*it, button);
}

View file

@ -0,0 +1,39 @@
{pkgs, ...}: {
programs.waybar = {
enable = true;
package = pkgs.waybar.overrideAttrs (final: prev: {
patches = [./waybar-workspace.patch];
});
settings = [
{
height = 24;
spacing = 4;
position = "top";
modules-left = [
"sway/workspaces"
];
modules-center = [
"sway/window"
];
modules-right = [
"tray"
"clock"
];
"sway/workspaces" = {
format = "{icon}";
};
"sway/window" = {
max-length = 80;
};
clock = {
format = "{:%V|%d %a %H:%M}";
tooltip-format = "<big>{:%a %Y-%m-%d %H:%M}</big>\n<small>{calendar}</small>";
};
}
];
systemd = {
enable = true;
target = "sway-session.target";
};
};
}

View file

@ -0,0 +1,40 @@
{pkgs, ...}: {
home.pointerCursor = {
gtk.enable = true;
x11.enable = true;
package = pkgs.apple-cursor;
name = "macOS-BigSur";
size = 16;
};
# Also sets org.freedesktop.appearance color-scheme
# dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
gtk = {
enable = true;
# theme = {
# package = pkgs.gnome-themes-extra;
# name = "Adwaita-dark";
# };
# iconTheme = {
# package = pkgs.adwaita-icon-theme;
# name = "Adwaita-dark";
# };
font = {
name = "Sans";
size = 11;
};
# gtk2.extraConfig = "gtk-application-prefer-dark-theme=1";
# gtk3.extraConfig.gtk-application-prefer-dark-theme = 1;
# gtk4.extraConfig.gtk-application-prefer-dark-theme = 1;
};
qt = {
enable = true;
# platformTheme.name = "gtk3";
# style = {
# name = "Adwaita-dark";
# package = pkgs.adwaita-qt;
# };
};
}

View file

@ -0,0 +1,3 @@
{
programs.mangohud.enable = true;
}

View file

@ -0,0 +1,8 @@
{pkgs, ...}: {
home.packages = with pkgs; [
wineWow64Packages.stagingFull
bubblewrap
fuse-overlayfs
dwarfs
];
}

View file

@ -0,0 +1,36 @@
{pkgs, ...}: {
programs.mpv = {
enable = true;
config = {
vo = "gpu-next";
gpu-api = "vulkan";
scale = "ewa_lanczos";
deband = true;
sub-auto = "fuzzy";
slang = ["eng" "en"];
save-position-on-quit = true;
# update watch history
ytdl-raw-options = "mark-watched=,cookies-from-browser=firefox";
};
profiles = {
"extension.gif" = {
cache = false;
loop-file = true;
};
"protocol.https" = {
cache-secs = 100;
user-agent = "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0";
};
"protocol.http" = {
cache-secs = 100;
user-agent = "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0";
};
};
scripts = with pkgs.mpvScripts; [
cutter
];
};
}

View file

@ -0,0 +1,10 @@
{pkgs, ...}: {
home.packages = with pkgs; [
vesktop
(discord.override {
withOpenASAR = true;
})
discord-ptb
];
# services.arrpc.enable = true; # RPC with vesktop (has issues with cpu usage sometimes ime)
}

View file

@ -0,0 +1,10 @@
{pkgs, ...}: {
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
obs-vaapi
wlrobs
obs-vkcapture
];
};
}

View file

@ -0,0 +1,73 @@
{pkgs, ...}: let
musicDir = "/server/library/music";
beetsDir = "/home/xun/beets";
in {
programs.beets = {
enable = true;
package = pkgs.beets-unstable;
settings = {
directory = "${musicDir}/beets";
library = "${beetsDir}/beets.db";
import = {
write = true;
move = true;
copy = false;
autotag = true;
confidence = 0.9;
timid = true;
group_albums = true;
};
original_date = true;
plugins = ["lyrics" "missing" "unimported" "edit" "duplicates" "info"];
lyrics = {
synced = true; # prefer synced
sources = ["lrclib" "genius" "google" "tekstowo"];
};
paths = {
# default = "$albumartist/$album$year/$albumartist - $track - $title";
default = "$albumartist/$album%aunique{}/$track $title";
singleton = "single/$artist/$title";
comp = "comp/$album%aunique{}/$track $title";
};
unimported.ignore_extensions = ["jpg" "png"];
# threaded = true;
# timeout = 5;
# verbose = false;
match = {
strong_rec_thresh = 0.1;
medium_rec_thresh = 0.25;
rec_gap_thresh = 0.25;
distance_weights = {
source = 2.0;
artist = 3.0;
album = 3.0;
media = 1.0;
mediums = 1.0;
year = 1.0;
country = 0.5;
label = 0.5;
catalognum = 0.5;
albumdisambig = 0.5;
album_id = 5.0;
tracks = 2.0;
missing_tracks = 0.9;
unmatched_tracks = 0.6;
track_title = 3.0;
track_artist = 2.0;
track_index = 1.0;
track_length = 2.0;
track_id = 5.0;
};
};
};
};
}

View file

@ -0,0 +1,8 @@
{
programs.cmus = {
enable = true;
theme = "spotify";
extraConfig = ''
'';
};
}