From e835b43fb2014dfd1d67509b11b46748a29806c9 Mon Sep 17 00:00:00 2001 From: isabel Date: Wed, 13 May 2026 10:36:59 +0100 Subject: [PATCH] wip --- flake.lock | 39 +- flake.nix | 8 +- home/default.nix | 37 +- home/isabel/apps/chromium.nix | 166 +++++++ home/isabel/apps/default.nix | 11 + home/isabel/apps/discord.nix | 4 + home/isabel/apps/mpv.nix | 107 +++++ home/isabel/cli/bat.nix | 13 - home/isabel/cli/default.nix | 20 - home/isabel/cli/direnv.nix | 27 -- home/isabel/cli/eza.nix | 17 - home/isabel/cli/fd.nix | 12 - home/isabel/cli/fzf.nix | 34 -- home/isabel/cli/gh.nix | 24 - home/isabel/cli/git.nix | 223 ---------- home/isabel/cli/jj.nix | 23 - home/isabel/cli/nix-your-shell.nix | 6 - home/isabel/cli/ripgrep.nix | 14 - home/isabel/cli/shell/bash.nix | 20 - home/isabel/cli/shell/default.nix | 8 - home/isabel/cli/shell/fish.nix | 60 --- home/isabel/cli/shell/shellAlias.nix | 10 - home/isabel/cli/shell/zsh.nix | 20 - home/isabel/cli/starship.nix | 131 ------ home/isabel/cli/zoxide.nix | 8 - home/isabel/default.nix | 12 +- home/isabel/gui/chromium.nix | 199 --------- home/isabel/gui/default.nix | 15 - home/isabel/gui/discord.nix | 78 ---- home/isabel/gui/ghostty.nix | 38 -- home/isabel/gui/hyprland.nix | 353 --------------- home/isabel/gui/media/creation.nix | 14 - home/isabel/gui/media/default.nix | 10 - home/isabel/gui/media/listening.nix | 41 -- home/isabel/gui/media/streaming.nix | 26 -- home/isabel/gui/media/watching.nix | 188 -------- home/isabel/gui/notes.nix | 79 ---- home/isabel/gui/quickshell.nix | 17 - .../gui/quickshell/components/BarDivider.qml | 11 - .../gui/quickshell/components/Battery.qml | 37 -- .../gui/quickshell/components/Clock.qml | 23 - .../quickshell/components/ExpandablePanel.qml | 60 --- .../gui/quickshell/components/IconButton.qml | 39 -- .../gui/quickshell/components/Launcher.qml | 25 -- .../quickshell/components/MediaPlayers.qml | 186 -------- .../gui/quickshell/components/MyIcon.qml | 28 -- .../gui/quickshell/components/Network.qml | 20 - .../isabel/gui/quickshell/components/Noti.qml | 26 -- .../quickshell/components/PanelListItem.qml | 59 --- .../quickshell/components/QuickSettings.qml | 413 ------------------ .../quickshell/components/StyledSlider.qml | 73 ---- .../gui/quickshell/components/SysTray.qml | 20 - .../gui/quickshell/components/SystrayItem.qml | 238 ---------- .../gui/quickshell/components/Volume.qml | 18 - .../gui/quickshell/components/Workspaces.qml | 68 --- home/isabel/gui/quickshell/data/Runtime.qml | 13 - home/isabel/gui/quickshell/data/Settings.qml | 34 -- home/isabel/gui/quickshell/data/Time.qml | 16 - home/isabel/gui/quickshell/data/Utils.qml | 19 - home/isabel/gui/quickshell/modules/Bar.qml | 103 ----- .../isabel/gui/quickshell/modules/Desktop.qml | 39 -- home/isabel/gui/quickshell/modules/Osd.qml | 252 ----------- .../quickshell/modules/QuickSettingsPopup.qml | 173 -------- .../gui/quickshell/services/Bluetooth.qml | 71 --- .../gui/quickshell/services/Brightness.qml | 60 --- home/isabel/gui/quickshell/services/Media.qml | 11 - .../gui/quickshell/services/Networking.qml | 189 -------- .../gui/quickshell/services/Notifications.qml | 41 -- .../gui/quickshell/services/Pipewire.qml | 90 ---- .../isabel/gui/quickshell/services/UPower.qml | 79 ---- home/isabel/gui/quickshell/shell.qml | 12 - home/isabel/gui/vicinae/default.nix | 42 -- home/isabel/gui/vicinae/extension.nix | 51 --- home/isabel/gui/wezterm.nix | 11 - home/isabel/gui/wezterm/bar.lua | 360 --------------- home/isabel/gui/wezterm/keybinds.lua | 76 ---- home/isabel/gui/wezterm/theme.lua | 365 ---------------- home/isabel/gui/wezterm/utils.lua | 18 - home/isabel/gui/wezterm/wezterm.lua | 92 ---- home/isabel/packages.nix | 4 +- home/isabel/services/default.nix | 8 - home/isabel/services/rnnoise.nix | 51 --- home/isabel/services/tray.nix | 17 - home/isabel/system/default.nix | 9 - home/isabel/system/docs.nix | 5 - home/isabel/system/secrets.nix | 13 - home/isabel/system/ssh.nix | 110 ----- home/isabel/themes/catppuccin.nix | 73 ---- home/isabel/themes/default.nix | 11 - home/isabel/themes/fonts.nix | 6 - home/isabel/themes/global.nix | 12 - home/isabel/themes/gtk.nix | 123 ------ home/isabel/themes/qt.nix | 37 -- home/isabel/tui/default.nix | 10 - home/isabel/tui/izrss.nix | 27 -- home/isabel/tui/lazygit.nix | 22 - home/isabel/tui/navi.nix | 6 - home/isabel/tui/neovim.nix | 17 - home/isabel/wrappers/all-modules.nix | 7 + home/isabel/{cli => wrappers}/atuin.nix | 10 +- home/isabel/wrappers/default.nix | 27 ++ home/isabel/wrappers/fish.nix | 79 ++++ home/isabel/wrappers/ghostty.nix | 6 + home/isabel/wrappers/git.nix | 154 +++++++ modules/base/default.nix | 3 +- modules/{generic => base}/packages.nix | 8 +- modules/{generic => base}/profiles.nix | 0 modules/base/programs.nix | 19 +- modules/base/users/mkuser.nix | 5 +- modules/darwin/extras.nix | 1 - modules/generic/default.nix | 8 - modules/home/default.nix | 17 - modules/home/docs.nix | 13 - modules/home/environment/default.nix | 10 - modules/home/environment/path.nix | 15 - modules/home/environment/shell.nix | 14 - modules/home/environment/variables.nix | 23 - modules/home/environment/xdg.nix | 130 ------ modules/home/extras.nix | 8 - modules/home/home.nix | 13 - modules/home/profiles.nix | 32 -- modules/home/programs/default.nix | 9 - modules/home/programs/defaults.nix | 62 --- modules/home/programs/discord.nix | 79 ---- modules/home/programs/pentesting.nix | 59 --- modules/home/secrets.nix | 17 - modules/home/themes/default.nix | 7 - modules/home/themes/fonts.nix | 151 ------- modules/nixos/extras.nix | 1 - modules/nixos/programs/hyprland.nix | 12 +- systems/amaterasu/users.nix | 32 +- 131 files changed, 622 insertions(+), 6643 deletions(-) create mode 100644 home/isabel/apps/chromium.nix create mode 100644 home/isabel/apps/default.nix create mode 100644 home/isabel/apps/discord.nix create mode 100644 home/isabel/apps/mpv.nix delete mode 100644 home/isabel/cli/bat.nix delete mode 100644 home/isabel/cli/default.nix delete mode 100644 home/isabel/cli/direnv.nix delete mode 100644 home/isabel/cli/eza.nix delete mode 100644 home/isabel/cli/fd.nix delete mode 100644 home/isabel/cli/fzf.nix delete mode 100644 home/isabel/cli/gh.nix delete mode 100644 home/isabel/cli/git.nix delete mode 100644 home/isabel/cli/jj.nix delete mode 100644 home/isabel/cli/nix-your-shell.nix delete mode 100644 home/isabel/cli/ripgrep.nix delete mode 100644 home/isabel/cli/shell/bash.nix delete mode 100644 home/isabel/cli/shell/default.nix delete mode 100644 home/isabel/cli/shell/fish.nix delete mode 100644 home/isabel/cli/shell/shellAlias.nix delete mode 100644 home/isabel/cli/shell/zsh.nix delete mode 100644 home/isabel/cli/starship.nix delete mode 100644 home/isabel/cli/zoxide.nix delete mode 100644 home/isabel/gui/chromium.nix delete mode 100644 home/isabel/gui/default.nix delete mode 100644 home/isabel/gui/discord.nix delete mode 100644 home/isabel/gui/ghostty.nix delete mode 100644 home/isabel/gui/hyprland.nix delete mode 100644 home/isabel/gui/media/creation.nix delete mode 100644 home/isabel/gui/media/default.nix delete mode 100644 home/isabel/gui/media/listening.nix delete mode 100644 home/isabel/gui/media/streaming.nix delete mode 100644 home/isabel/gui/media/watching.nix delete mode 100644 home/isabel/gui/notes.nix delete mode 100644 home/isabel/gui/quickshell.nix delete mode 100644 home/isabel/gui/quickshell/components/BarDivider.qml delete mode 100644 home/isabel/gui/quickshell/components/Battery.qml delete mode 100644 home/isabel/gui/quickshell/components/Clock.qml delete mode 100644 home/isabel/gui/quickshell/components/ExpandablePanel.qml delete mode 100644 home/isabel/gui/quickshell/components/IconButton.qml delete mode 100644 home/isabel/gui/quickshell/components/Launcher.qml delete mode 100644 home/isabel/gui/quickshell/components/MediaPlayers.qml delete mode 100644 home/isabel/gui/quickshell/components/MyIcon.qml delete mode 100644 home/isabel/gui/quickshell/components/Network.qml delete mode 100644 home/isabel/gui/quickshell/components/Noti.qml delete mode 100644 home/isabel/gui/quickshell/components/PanelListItem.qml delete mode 100644 home/isabel/gui/quickshell/components/QuickSettings.qml delete mode 100644 home/isabel/gui/quickshell/components/StyledSlider.qml delete mode 100644 home/isabel/gui/quickshell/components/SysTray.qml delete mode 100644 home/isabel/gui/quickshell/components/SystrayItem.qml delete mode 100644 home/isabel/gui/quickshell/components/Volume.qml delete mode 100644 home/isabel/gui/quickshell/components/Workspaces.qml delete mode 100644 home/isabel/gui/quickshell/data/Runtime.qml delete mode 100644 home/isabel/gui/quickshell/data/Settings.qml delete mode 100644 home/isabel/gui/quickshell/data/Time.qml delete mode 100644 home/isabel/gui/quickshell/data/Utils.qml delete mode 100644 home/isabel/gui/quickshell/modules/Bar.qml delete mode 100644 home/isabel/gui/quickshell/modules/Desktop.qml delete mode 100644 home/isabel/gui/quickshell/modules/Osd.qml delete mode 100644 home/isabel/gui/quickshell/modules/QuickSettingsPopup.qml delete mode 100644 home/isabel/gui/quickshell/services/Bluetooth.qml delete mode 100644 home/isabel/gui/quickshell/services/Brightness.qml delete mode 100644 home/isabel/gui/quickshell/services/Media.qml delete mode 100644 home/isabel/gui/quickshell/services/Networking.qml delete mode 100644 home/isabel/gui/quickshell/services/Notifications.qml delete mode 100644 home/isabel/gui/quickshell/services/Pipewire.qml delete mode 100644 home/isabel/gui/quickshell/services/UPower.qml delete mode 100644 home/isabel/gui/quickshell/shell.qml delete mode 100644 home/isabel/gui/vicinae/default.nix delete mode 100644 home/isabel/gui/vicinae/extension.nix delete mode 100644 home/isabel/gui/wezterm.nix delete mode 100644 home/isabel/gui/wezterm/bar.lua delete mode 100644 home/isabel/gui/wezterm/keybinds.lua delete mode 100644 home/isabel/gui/wezterm/theme.lua delete mode 100644 home/isabel/gui/wezterm/utils.lua delete mode 100644 home/isabel/gui/wezterm/wezterm.lua delete mode 100644 home/isabel/services/default.nix delete mode 100644 home/isabel/services/rnnoise.nix delete mode 100644 home/isabel/services/tray.nix delete mode 100644 home/isabel/system/default.nix delete mode 100644 home/isabel/system/docs.nix delete mode 100644 home/isabel/system/secrets.nix delete mode 100644 home/isabel/system/ssh.nix delete mode 100644 home/isabel/themes/catppuccin.nix delete mode 100644 home/isabel/themes/default.nix delete mode 100644 home/isabel/themes/fonts.nix delete mode 100644 home/isabel/themes/global.nix delete mode 100644 home/isabel/themes/gtk.nix delete mode 100644 home/isabel/themes/qt.nix delete mode 100644 home/isabel/tui/default.nix delete mode 100644 home/isabel/tui/izrss.nix delete mode 100644 home/isabel/tui/lazygit.nix delete mode 100644 home/isabel/tui/navi.nix delete mode 100644 home/isabel/tui/neovim.nix create mode 100644 home/isabel/wrappers/all-modules.nix rename home/isabel/{cli => wrappers}/atuin.nix (59%) create mode 100644 home/isabel/wrappers/default.nix create mode 100644 home/isabel/wrappers/fish.nix create mode 100644 home/isabel/wrappers/ghostty.nix create mode 100644 home/isabel/wrappers/git.nix rename modules/{generic => base}/packages.nix (59%) rename modules/{generic => base}/profiles.nix (100%) delete mode 100644 modules/generic/default.nix delete mode 100644 modules/home/default.nix delete mode 100644 modules/home/docs.nix delete mode 100644 modules/home/environment/default.nix delete mode 100644 modules/home/environment/path.nix delete mode 100644 modules/home/environment/shell.nix delete mode 100644 modules/home/environment/variables.nix delete mode 100644 modules/home/environment/xdg.nix delete mode 100644 modules/home/extras.nix delete mode 100644 modules/home/home.nix delete mode 100644 modules/home/profiles.nix delete mode 100644 modules/home/programs/default.nix delete mode 100644 modules/home/programs/defaults.nix delete mode 100644 modules/home/programs/discord.nix delete mode 100644 modules/home/programs/pentesting.nix delete mode 100644 modules/home/secrets.nix delete mode 100644 modules/home/themes/default.nix delete mode 100644 modules/home/themes/fonts.nix diff --git a/flake.lock b/flake.lock index d6ee89a1..6f8f36e4 100644 --- a/flake.lock +++ b/flake.lock @@ -135,26 +135,6 @@ "type": "github" } }, - "home-manager": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1778628724, - "narHash": "sha256-VNG6hJ146VEenXcDrB3t6MVnrMx+gtyCWTCDkzOp9Qs=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "6a0bbd6b4720da1c9ce7ebf35ff5c41a82db367a", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, "homebrew": { "inputs": { "brew-src": [] @@ -299,7 +279,6 @@ "catppuccin": "catppuccin", "darwin": "darwin", "extersia": "extersia", - "home-manager": "home-manager", "homebrew": "homebrew", "izlix": "izlix", "izvim": "izvim", @@ -309,7 +288,8 @@ "simple-nixos-mailserver": "simple-nixos-mailserver", "sops": "sops", "spicetify": "spicetify", - "tranquil": "tranquil" + "tranquil": "tranquil", + "wrappers": "wrappers" } }, "rust-overlay": { @@ -431,6 +411,21 @@ "type": "git", "url": "https://tangled.org/tranquil.farm/tranquil-pds" } + }, + "wrappers": { + "locked": { + "lastModified": 1778626163, + "narHash": "sha256-ccJMLJ0Ns5Z0aDwFX2GNiqszwrPLaxBvx2BebBLffuA=", + "owner": "isabelroses", + "repo": "wrapper-manager", + "rev": "7e6bf96656d772a041f88cf04bb84e1ea9a69588", + "type": "github" + }, + "original": { + "owner": "isabelroses", + "repo": "wrapper-manager", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index df1bebba..a9cc6a01 100644 --- a/flake.nix +++ b/flake.nix @@ -45,12 +45,10 @@ }; }; - # manage userspace with nix - home-manager = { + wrappers = { type = "github"; - owner = "nix-community"; - repo = "home-manager"; - inputs.nixpkgs.follows = "nixpkgs"; + owner = "isabelroses"; + repo = "wrapper-manager"; }; ### Security stuff diff --git a/home/default.nix b/home/default.nix index f1dccc60..b09da5c7 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,36 +1,5 @@ { - lib, - self, - self', - config, - inputs, - inputs', - ... -}: -let - inherit (lib.attrsets) genAttrs; -in -{ - home-manager = { - verbose = true; - useUserPackages = true; - useGlobalPkgs = true; - backupFileExtension = "bak"; - - users = genAttrs config.garden.system.users (name: { - imports = [ ./${name} ]; - }); - - extraSpecialArgs = { - inherit - self - self' - inputs - inputs' - ; - }; - - # we should define grauntied common modules here - sharedModules = [ (self + /modules/home/default.nix) ]; - }; + imports = [ + ./isabel + ]; } diff --git a/home/isabel/apps/chromium.nix b/home/isabel/apps/chromium.nix new file mode 100644 index 00000000..ffc897e7 --- /dev/null +++ b/home/isabel/apps/chromium.nix @@ -0,0 +1,166 @@ +{ lib, pkgs, ... }: +let + inherit (lib.lists) concatLists; + inherit (lib.strings) concatMapStrings enableFeature; +in +pkgs.chromium.override { + enableWideVine = true; + + # https://github.com/secureblue/hardened-chromium + # https://github.com/secureblue/secureblue/blob/e500f078efc5748d5033a881bbbcdcd2de95a813/files/system/usr/etc/chromium/chromium.conf.md + commandLineArgs = concatLists [ + # Aesthetics + [ + # "--force-dark-mode" + "--gtk-version=4" + ] + + # Performance + [ + (enableFeature true "gpu-rasterization") + (enableFeature true "oop-rasterization") + (enableFeature true "zero-copy") + "--ignore-gpu-blocklist" + ] + + # Wayland + [ + "--ozone-platform=wayland" + "--enable-features=UseOzonePlatform" + ] + + # Etc + [ + "--disk-cache=$XDG_RUNTIME_DIR/chromium-cache" + + # disable canvas reading for privacy + # (enableFeature false "reading-from-canvas") + + "--no-first-run" + "--disable-wake-on-wifi" + "--disable-breakpad" + + # please stop asking me to be the default browser + "--no-default-browser-check" + + # I don't need these, thus I disable them + (enableFeature false "speech-api") + (enableFeature false "speech-synthesis-api") + ] + + # Security + [ + # Use strict extension verification + "--extension-content-verification=enforce_strict" + "--extensions-install-verification=enforce_strict" + + # Disable pings + "--no-pings" + + # Require HTTPS for component updater + "--component-updater=require_encryption" + + # Disable crash upload + "--no-crash-upload" + + # don't run things without asking + "--no-service-autorun" + + # Disable sync + "--disable-sync" + + ( + "--enable-features=" + + concatMapStrings (x: x + ",") [ + # Enable visited link database partitioning + "PartitionVisitedLinkDatabase" + + # Enable prefetch privacy changes + "PrefetchPrivacyChanges" + + # Enable split cache + "SplitCacheByNetworkIsolationKey" + "SplitCodeCacheByNetworkIsolationKey" + + # Enable partitioning connections + "EnableCrossSiteFlagNetworkIsolationKey" + "HttpCacheKeyingExperimentControlGroup" + "PartitionConnectionsByNetworkIsolationKey" + + # Enable strict origin isolation + "StrictOriginIsolation" + + # Enable reduce accept language header + "ReduceAcceptLanguage" + + # Enable content settings partitioning + "ContentSettingsPartitioning" + + # allow --force-dark-mode to work + # "WebContentsForceDark" + ] + ) + + ( + "--disable-features=" + + concatMapStrings (x: x + ",") [ + # Disable autofill + "AutofillPaymentCardBenefits" + "AutofillPaymentCvcStorage" + "AutofillPaymentCardBenefits" + + # Disable third-party cookie deprecation bypasses + "TpcdHeuristicsGrants" + "TpcdMetadataGrants" + + # Disable hyperlink auditing + "EnableHyperlinkAuditing" + + # Disable showing popular sites + "NTPPopularSitesBakedInContent" + "UsePopularSitesSuggestions" + + # Disable article suggestions + "EnableSnippets" + "ArticlesListVisible" + "EnableSnippetsByDse" + + # Disable content feed suggestions + "InterestFeedV2" + + # Disable media DRM preprovisioning + "MediaDrmPreprovisioning" + + # Disable autofill server communication + "AutofillServerCommunication" + + # Disable new privacy sandbox features + "PrivacySandboxSettings4" + "BrowsingTopics" + "BrowsingTopicsDocumentAPI" + "BrowsingTopicsParameters" + + # Disable translate button + "AdaptiveButtonInTopToolbarTranslate" + + # Disable detailed language settings + "DetailedLanguageSettings" + + # Disable fetching optimization guides + "OptimizationHintsFetching" + + # Partition third-party storage + "DisableThirdPartyStoragePartitioningDeprecationTrial2" + + # Disable media engagement + "PreloadMediaEngagementData" + "MediaEngagementBypassAutoplayPolicies" + + # allow manifest v2 + "ExtensionManifestV2Unsupported" + "ExtensionManifestV2Disabled" + ] + ) + ] + ]; +} diff --git a/home/isabel/apps/default.nix b/home/isabel/apps/default.nix new file mode 100644 index 00000000..dda77ac8 --- /dev/null +++ b/home/isabel/apps/default.nix @@ -0,0 +1,11 @@ +{ + lib, + pkgs, + config, + ... +}: +{ + users.users.isabel.packages = map (lib.flip import { inherit lib pkgs config; }) [ + ./chromium.nix + ]; +} diff --git a/home/isabel/apps/discord.nix b/home/isabel/apps/discord.nix new file mode 100644 index 00000000..3ed26c98 --- /dev/null +++ b/home/isabel/apps/discord.nix @@ -0,0 +1,4 @@ +{ pkgs, ... }: +pkgs.discord.override { + withMoonlight = true; +} diff --git a/home/isabel/apps/mpv.nix b/home/isabel/apps/mpv.nix new file mode 100644 index 00000000..a92932bc --- /dev/null +++ b/home/isabel/apps/mpv.nix @@ -0,0 +1,107 @@ +{ lib, pkgs, ... }: +let + inherit (lib.lists) optionals; + inherit (pkgs.stdenv.hostPlatform) isLinux; +in +pkgs.mpv.override { + scripts = + (with pkgs.mpvScripts; [ + sponsorblock + + # unify my clipboard + (videoclip.override { wl-clipboard = pkgs.wl-clipboard-rs; }) + + # modern ui + modernz + thumbfast + + # mpv as our image viewer + mpv-image-viewer.image-positioning + ]) + ++ optionals isLinux [ + pkgs.mpvScripts.mpris + ]; + + extraUmpvWrapperArgs = [ + "--input-conf" + + "--include" + (lib.generators.toINIWithGlobalSection { listsAsDuplicateKeys = true; } { + globalSection = { + osc = "no"; # i am using modernz ^.^ + border = "no"; + msg-color = "yes"; + msg-module = "yes"; + + save-watch-history = "yes"; + + # audio settings + volume-max = 200; + + # video settings + # use hardware decoding when available, prefer vulkan + hwdec = if isLinux then "auto-copy" else "auto"; + gpu-api = if isLinux then "vulkan" else "auto"; + profile = "gpu-hq"; + vo = "gpu-next"; # GPU-Next: https://github.com/mpv-player/mpv/wiki/GPU-Next-vs-GPV + + # screenshot settings + screenshot-directory = + if pkgs.stdenv.hostPlatform.isDarwin then + "~/Pictures/screenshots" + else + "~/media/pictures/screenshots"; + screenshot-template = "%x/screenshot-%F-T%wH.%wM.%wS.%wT-F%{estimated-frame-number}"; + screenshot-format = "png"; + screenshot-png-compression = 4; # Range is 0 to 10. 0 being no compression. + screenshot-tag-colorspace = "yes"; + screenshot-high-bit-depth = "yes"; # Same output bitdepth as the video + + # use English audio and subtitles if available + alang = "en,jpn,jp"; + + # misc + stop-screensaver = "yes"; + cursor-autohide = 100; # auto hide cursor after 100ms + reset-on-next-file = "video-zoom,panscan,video-unscaled,video-rotate,video-align-x,video-align-y"; + ytdl-raw-options = "cookies=~/documents/yt-dlp-cookies.txt"; + }; + + sections = { + image = { + profile-cond = "p[\"current-tracks/video\"] and p[\"current-tracks/video\"].image and not p[\"current-tracks/video\"].albumart"; + profile-restore = "copy-equal"; + + # we need duplicate config options which nix doesn't really handle + script-opts-append = [ + "modernz-fade_alpha=50" + "modernz-window_title=yes" + "modernz-bottomhover_zone=50" + ]; + + title = "\${media-title} [\${?width:\${width}x\${height}}]"; + taskbar-progress = "no"; + video-unscaled = "yes"; + video-recenter = "yes"; + window-dragging = "no"; + + prefetch-playlist = "yes"; + video-aspect-override = "no"; + + # keep the file open + loop-file = "inf"; + image-display-duration = "inf"; + loop-playlist = "inf"; + }; + + # good refrences for mpv config: + # + video = { + profile-cond = "p[\"current-tracks/video\"] and not p[\"current-tracks/video\"].image"; + profile-restore = "copy-equal"; + taskbar-progress = "yes"; + }; + }; + }) + ]; +} diff --git a/home/isabel/cli/bat.nix b/home/isabel/cli/bat.nix deleted file mode 100644 index 70129a51..00000000 --- a/home/isabel/cli/bat.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ config, ... }: -let - inherit (config.garden.programs) defaults; -in -{ - programs.bat = { - inherit (config.garden.profiles.workstation) enable; - - config = { - inherit (defaults) pager; - }; - }; -} diff --git a/home/isabel/cli/default.nix b/home/isabel/cli/default.nix deleted file mode 100644 index aed02b4f..00000000 --- a/home/isabel/cli/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ - imports = [ - # keep-sorted start - ./atuin.nix - ./bat.nix - ./direnv.nix - ./eza.nix - ./fd.nix - ./fzf.nix - ./gh.nix - ./git.nix - ./jj.nix - ./nix-your-shell.nix - ./ripgrep.nix - ./shell # shell configurations - ./starship.nix - ./zoxide.nix - # keep-sorted end - ]; -} diff --git a/home/isabel/cli/direnv.nix b/home/isabel/cli/direnv.nix deleted file mode 100644 index ca2499be..00000000 --- a/home/isabel/cli/direnv.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ pkgs, config, ... }: -{ - programs.direnv = { - inherit (config.garden.profiles.workstation) enable; - silent = true; - - # faster, persistent implementation of use_nix and use_flake - nix-direnv = { - enable = true; - package = pkgs.nix-direnv.override { nix = config.nix.package; }; - }; - - # store direnv in cache and not per project - # - stdlib = '' - : ''${XDG_CACHE_HOME:=$HOME/.cache} - declare -A direnv_layout_dirs - - direnv_layout_dir() { - echo "''${direnv_layout_dirs[$PWD]:=$( - echo -n "$XDG_CACHE_HOME"/direnv/layouts/ - echo -n "$PWD" | sha1sum | cut -d ' ' -f 1 - )}" - } - ''; - }; -} diff --git a/home/isabel/cli/eza.nix b/home/isabel/cli/eza.nix deleted file mode 100644 index a839b629..00000000 --- a/home/isabel/cli/eza.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ config, ... }: -{ - programs.eza = { - inherit (config.garden.profiles.workstation) enable; - icons = "auto"; - - enableNushellIntegration = false; - - extraOptions = [ - "--group" - "--group-directories-first" - "--header" - "--no-permissions" - "--octal-permissions" - ]; - }; -} diff --git a/home/isabel/cli/fd.nix b/home/isabel/cli/fd.nix deleted file mode 100644 index f689cd25..00000000 --- a/home/isabel/cli/fd.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ config, ... }: -{ - programs.fd = { - inherit (config.garden.profiles.workstation) enable; - - hidden = true; - ignores = [ - ".git/" - "*.bak" - ]; - }; -} diff --git a/home/isabel/cli/fzf.nix b/home/isabel/cli/fzf.nix deleted file mode 100644 index d6552eed..00000000 --- a/home/isabel/cli/fzf.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ - lib, - pkgs, - config, - ... -}: -let - inherit (lib.meta) getExe; -in -{ - programs.fzf = { - inherit (config.garden.profiles.workstation) enable; - - colors = { - fg = "#cdd6f4"; - "fg+" = "#cdd6f4"; - hl = "#f38ba8"; - "hl+" = "#f38ba8"; - header = "#ff69b4"; - info = "#cba6f7"; - marker = "#f5e0dc"; - pointer = "#f5e0dc"; - prompt = "#cba6f7"; - spinner = "#f5e0dc"; - }; - - defaultCommand = "${getExe pkgs.fd} --type=f --hidden --exclude=.git"; - defaultOptions = [ - "--height=30%" - "--layout=reverse" - "--info=inline" - ]; - }; -} diff --git a/home/isabel/cli/gh.nix b/home/isabel/cli/gh.nix deleted file mode 100644 index 60c05d49..00000000 --- a/home/isabel/cli/gh.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ - lib, - pkgs, - config, - ... -}: -{ - programs.gh = { - enable = config.programs.git.enable && config.garden.profiles.workstation.enable; - - extensions = lib.attrValues { - inherit (pkgs) - # gh-cal # github activity stats in the CLI (not working, maybe we can fix it?) - # gh-copilot # copilot in the CLI - gh-eco # explore the ecosystem - ; - }; - - settings = { - git_protocol = "ssh"; - prompt = "enabled"; - }; - }; -} diff --git a/home/isabel/cli/git.nix b/home/isabel/cli/git.nix deleted file mode 100644 index 4464effa..00000000 --- a/home/isabel/cli/git.nix +++ /dev/null @@ -1,223 +0,0 @@ -{ - lib, - pkgs, - self, - config, - ... -}: -let - inherit (lib.modules) mkIf; - inherit (lib.attrsets) mergeAttrsList; - inherit (lib.hm.dag) entryBefore; - inherit (self.lib) giturl; -in -{ - sops.secrets.uni-gitconf = { }; - - programs = { - git = { - inherit (config.garden.profiles.workstation) enable; - package = pkgs.gitMinimal; - - includes = [ - { - condition = "gitdir:~/dev/uni/"; - inherit (config.sops.secrets."uni-gitconf") path; - } - { - condition = "gitdir:~/Dev/uni/"; - inherit (config.sops.secrets."uni-gitconf") path; - } - ]; - - lfs = { - enable = false; - skipSmudge = true; # we don't want another ctp/userstyles situation - }; - - # git commit signing - signing = { - format = "ssh"; - key = "${config.home.homeDirectory}/.ssh/id_ed25519.pub"; - signByDefault = true; - }; - - ignores = [ - # system residue - ".cache/" - ".DS_Store" - ".Trashes" - ".Trash-*" - "*.bak" - "*.swp" - "*.swo" - "*.elc" - ".~lock*" - - # build residue - "tmp/" - "target/" - "result" - "result-*" - "*.exe" - "*.exe~" - "*.dll" - "*.so" - "*.dylib" - - # dependencies - ".direnv/" - "node_modules" - "vendor" - ]; - - settings = { - user = { - name = "isabel"; - email = "isabel" + "@" + "isabelroses" + "." + "com"; # obsfuscate email to prevent webscrapper spam - }; - - alias = { - st = "status"; - br = "branch"; - c = "commit -m"; - ca = "commit -am"; - co = "checkout"; - d = "diff"; - df = "!git hist | peco | awk '{print $2}' | xargs -I {} git diff {}^ {}"; - fuck = "commit --amend -m"; - graph = "log --all --decorate --graph"; - ps = "!git push origin $(git rev-parse --abbrev-ref HEAD)"; - pl = "!git pull origin $(git rev-parse --abbrev-ref HEAD)"; - af = "!git add $(git ls-files -m -o --exclude-standard | fzf -m)"; - hist = '' - log --pretty=format:"%Cgreen%h %Creset%cd %Cblue[%cn] %Creset%s%C(yellow)%d%C(reset)" --graph --date=relative --decorate --all - ''; - llog = '' - log --graph --name-status --pretty=format:"%C(red)%h %C(reset)(%cd) %C(green)%an %Creset%s %C(yellow)%d%Creset" --date=relative - ''; - # https://github.com/arichtman/nix/blob/18f5613c2842e12e49350aeceace63863ad59244/modules/home/default-home/default.nix#L11 - fuggit = "!git add . && git commit --amend --no-edit && git push --force"; - # thanks @vbde for this - idc = "!git commit -am '$(curl -s https://whatthecommit.com/index.txt)'"; - }; - - init.defaultBranch = "main"; - repack.usedeltabaseoffset = "true"; - color.ui = "auto"; - help.autocorrect = 10; # 1 second warning to a typo'd command - - diff = { - algorithm = "histogram"; # a much better diff - colorMoved = "plain"; # show moved lines in a different color - mnemonicprefix = true; - }; - - core.whitespace = "fix,-indent-with-non-tab,trailing-space,cr-at-eol"; - - # nice quality of life improvements - branch = { - autosetupmerge = "true"; - - # sorts branches so the newst ones by latest commit are at the top - sort = "committerdate"; - }; - - commit.verbose = true; - - # prune branches that are no longer on the remote - fetch.prune = true; - - pull = { - # the default functionality is to push the current branch that i am on to the remote - default = "current"; - - # equivalent to --ff-only - ff = "only"; - }; - - # if a remote does not have a branch that i have, create it - push.autoSetupRemote = true; - - # nicer diffing for merges - merge = { - stat = "true"; - conflictstyle = "zdiff3"; - tool = "meld"; - }; - - rebase = { - # https://andrewlock.net/working-with-stacked-branches-in-git-is-easier-with-update-refs/ - updateRefs = true; - - autoSquash = true; - autoStash = true; - }; - - rerere = { - enabled = true; - autoupdate = true; - }; - - # prevent data corruption - transfer.fsckObjects = true; - fetch.fsckObjects = true; - receive.fsckObjects = true; - - url = mergeAttrsList ( - map giturl [ - { - domain = "github.com"; - alias = "github"; - } - { - domain = "gitlab.com"; - alias = "gitlab"; - } - { - domain = "aur.archlinux.org"; - alias = "aur"; - user = "aur"; - } - { - domain = "git.sr.ht"; - alias = "srht"; - } - { - domain = "codeberg.org"; - alias = "codeberg"; - } - { - domain = "git.isabelroses.com"; - alias = "me"; - } - { - domain = "tangled.org"; - alias = "tangled"; - } - ] - ); - }; - }; - - # pager / diff tool - delta = { - inherit (config.garden.profiles.workstation) enable; - enableGitIntegration = true; - - options = { - navigate = true; - side-by-side = true; - line-numbers = true; - }; - }; - }; - - # `programs.git` will generate the config file: ~/.config/git/config - # to make git use this config file, `~/.gitconfig` should not exist! - home.activation = mkIf (pkgs.stdenv.hostPlatform.isDarwin && config.programs.git.enable) { - removeExistingGitconfig = entryBefore [ "checkLinkTargets" ] '' - rm -f ~/.gitconfig - ''; - }; -} diff --git a/home/isabel/cli/jj.nix b/home/isabel/cli/jj.nix deleted file mode 100644 index 5cbefc98..00000000 --- a/home/isabel/cli/jj.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ config, ... }: -let - gitcfg = config.programs.git; -in -{ - programs.jujutsu = { - inherit (gitcfg) enable; - - settings = { - user = { - inherit (gitcfg.settings.user) name email; - }; - - ui = { - default-command = "status"; - }; - - template-aliases = { - "format_short_signature(signature)" = "signature.email().local()"; - }; - }; - }; -} diff --git a/home/isabel/cli/nix-your-shell.nix b/home/isabel/cli/nix-your-shell.nix deleted file mode 100644 index 88f939ca..00000000 --- a/home/isabel/cli/nix-your-shell.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ config, ... }: -{ - programs.nix-your-shell = { - inherit (config.garden.profiles.workstation) enable; - }; -} diff --git a/home/isabel/cli/ripgrep.nix b/home/isabel/cli/ripgrep.nix deleted file mode 100644 index c358d40c..00000000 --- a/home/isabel/cli/ripgrep.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ config, ... }: -{ - programs.ripgrep = { - inherit (config.garden.profiles.workstation) enable; - - # https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md#configuration-file - arguments = [ - "--max-columns=150" - "--max-columns-preview" - "--glob=!.git/*" - "--smart-case" - ]; - }; -} diff --git a/home/isabel/cli/shell/bash.nix b/home/isabel/cli/shell/bash.nix deleted file mode 100644 index f2443984..00000000 --- a/home/isabel/cli/shell/bash.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ config, ... }: -{ - programs.bash = { - enable = true; - enableCompletion = true; - - historyFile = "${config.xdg.stateHome}/bash/history"; - historyFileSize = 1000; - historySize = 100; - shellOptions = [ - "cdspell" - "checkjobs" - "checkwinsize" - "dirspell" - "globstar" - "histappend" - "no_empty_cmd_completion" - ]; - }; -} diff --git a/home/isabel/cli/shell/default.nix b/home/isabel/cli/shell/default.nix deleted file mode 100644 index 846566de..00000000 --- a/home/isabel/cli/shell/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - imports = [ - ./bash.nix # bash configurations - ./fish.nix # fish configurations - ./shellAlias.nix # shell alias - ./zsh.nix # zsh configurations - ]; -} diff --git a/home/isabel/cli/shell/fish.nix b/home/isabel/cli/shell/fish.nix deleted file mode 100644 index 59486ff6..00000000 --- a/home/isabel/cli/shell/fish.nix +++ /dev/null @@ -1,60 +0,0 @@ -{ - lib, - pkgs, - config, - ... -}: -let - inherit (lib.strings) optionalString; -in -{ - sops = { - secrets.env = { }; - - templates.fish-env = { - content = '' - function setup_secrets_vars; - if [ -n "$__SECRETS_SOURCED" ] - return - end - set -gx __SECRETS_SOURCED '1' - ${config.sops.placeholder.env} - end - setup_secrets_vars - ''; - - path = "${config.home.homeDirectory}/.config/fish/conf.d/sops-env.fish"; - }; - }; - - programs.fish = { - plugins = [ ]; - - functions = { - bj = "nohup $argv /dev/null &"; - "." = '' - set -l input $argv[1] - if echo $input | grep -q '^[1-9][0-9]*$' - set -l levels $input - for i in (seq $levels) - cd .. - end - else - echo "Invalid input format. Please use '' to go back a specific number of directories." - end - ''; - }; - - loginShellInit = optionalString pkgs.stdenv.hostPlatform.isDarwin '' - fish_add_path --move --prepend --path $HOME/.nix-profile/bin /run/wrappers/bin /etc/profiles/per-user/$USER/bin /run/current-system/sw/bin /nix/var/nix/profiles/default/bin - ''; - - shellInit = '' - # themeing - set fish_greeting - set -g theme_display_date no - set -g theme_nerd_fonts yes - set -g theme_newline_cursor yes - ''; - }; -} diff --git a/home/isabel/cli/shell/shellAlias.nix b/home/isabel/cli/shell/shellAlias.nix deleted file mode 100644 index 4adfc4c1..00000000 --- a/home/isabel/cli/shell/shellAlias.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - # This configuration creates the shell aliases across: bash, zsh and fish - home.shellAliases = { - mkdir = "mkdir -pv"; # always create pearent directory - df = "df -h"; # human readblity - rs = "systemctl reboot"; - jctl = "journalctl -p 3 -xb"; # get error messages from journalctl - lg = "lazygit"; - }; -} diff --git a/home/isabel/cli/shell/zsh.nix b/home/isabel/cli/shell/zsh.nix deleted file mode 100644 index 7bdf275c..00000000 --- a/home/isabel/cli/shell/zsh.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ lib, config, ... }: -let - inherit (lib.modules) mkOrder; -in -{ - programs.zsh = { - autosuggestion.enable = true; - # enableCompletion = true; - syntaxHighlighting.enable = true; - - dotDir = "${config.xdg.configHome}/zsh"; - - initContent = mkOrder 1000 '' - function title_precmd_hook() { - print -Pn "\e]0;$(pwd)\a" - } - precmd_functions+=title_precmd_hook - ''; - }; -} diff --git a/home/isabel/cli/starship.nix b/home/isabel/cli/starship.nix deleted file mode 100644 index ab48a878..00000000 --- a/home/isabel/cli/starship.nix +++ /dev/null @@ -1,131 +0,0 @@ -{ lib, config, ... }: -let - inherit (lib.strings) concatStrings; - - fmt = symbol: { - inherit symbol; - format = "[$symbol]($style)"; - }; -in -{ - programs.starship = { - inherit (config.garden.profiles.workstation) enable; - - settings = { - add_newline = true; - format = concatStrings [ - "[╭╴](238)$os" - "$all[╰─󰁔](237) " - ]; - - character.disabled = true; - battery.disabled = true; - - container = fmt "󰏖"; - python = fmt ""; - nodejs = fmt " "; - lua = fmt "󰢱 "; - rust = fmt ""; - java = fmt " "; - c = fmt " "; - golang = fmt ""; - docker_context = fmt " "; - nix_shell = fmt " "; - - username = { - style_user = "white"; - style_root = "black"; - format = "[$user]($style) "; - show_always = true; - }; - - directory = { - truncation_length = 3; - truncation_symbol = "…/"; - home_symbol = "󰋞 "; - read_only_style = "197"; - read_only = "  "; - format = "at [$path]($style)[$read_only]($read_only_style) "; - - substitutions = { - "󰋞 /Documents" = "󰈙 "; - "󰋞 /documents" = "󰈙 "; - - "󰋞 /Downloads" = " "; - "󰋞 /downloads" = " "; - - "󰋞 /media/music" = " "; - "󰋞 /media/pictures" = " "; - "󰋞 /media/videos" = " "; - "󰋞 /Music" = " "; - "󰋞 /Pictures" = " "; - "󰋞 /Videos" = " "; - - "󰋞 /dev" = "󱌢 "; - "󰋞 /Dev" = "󱌢 "; - - "󰋞 /skl" = "󰑴 "; - "󰋞 /.config" = " "; - }; - }; - - os = { - style = "bold white"; - format = "[$symbol]($style)"; - - symbols = { - Arch = ""; - Artix = ""; - Debian = ""; - # Kali = "󰠥"; - EndeavourOS = ""; - Fedora = ""; - NixOS = ""; - openSUSE = ""; - SUSE = ""; - Ubuntu = ""; - Raspbian = ""; - #elementary = ""; - #Coreos = ""; - Gentoo = ""; - #mageia = "" - CentOS = ""; - #sabayon = ""; - #slackware = ""; - Mint = ""; - Alpine = ""; - #aosc = ""; - #devuan = ""; - Manjaro = ""; - #rhel = ""; - Macos = "󰀵"; - Linux = ""; - Windows = ""; - }; - }; - - git_branch = { - symbol = "󰊢 "; - format = "on [$symbol$branch]($style) "; - truncation_length = 4; - truncation_symbol = "…/"; - style = "bold green"; - }; - git_status = { - format = "[\\($all_status$ahead_behind\\)]($style) "; - style = "bold green"; - conflicted = "🏳"; - up_to_date = " "; - untracked = " "; - ahead = "⇡\${count}"; - diverged = "⇕⇡\${ahead_count}⇣\${behind_count}"; - behind = "⇣\${count}"; - stashed = "󰏗 "; - modified = " "; - staged = "[++\\($count\\)](green)"; - renamed = "󰖷 "; - deleted = " "; - }; - }; - }; -} diff --git a/home/isabel/cli/zoxide.nix b/home/isabel/cli/zoxide.nix deleted file mode 100644 index af572543..00000000 --- a/home/isabel/cli/zoxide.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ config, ... }: -{ - programs.zoxide = { - inherit (config.garden.profiles.workstation) enable; - - options = [ "--cmd cd" ]; - }; -} diff --git a/home/isabel/default.nix b/home/isabel/default.nix index 0ee32091..b75dd49c 100644 --- a/home/isabel/default.nix +++ b/home/isabel/default.nix @@ -1,13 +1,7 @@ { imports = [ - # keep-sorted start - ./cli # command line interface app confurations - ./gui # graphical interface app confurations - ./packages.nix # a top-level list of packages - ./services # system services, organized by display protocol - ./system # important system environment config - ./themes # Application themeing - ./tui # terminal interface app confurations - # keep-sorted end + ./wrappers + ./apps + ./packages.nix ]; } diff --git a/home/isabel/gui/chromium.nix b/home/isabel/gui/chromium.nix deleted file mode 100644 index d22a457a..00000000 --- a/home/isabel/gui/chromium.nix +++ /dev/null @@ -1,199 +0,0 @@ -{ - lib, - pkgs, - config, - ... -}: -let - inherit (lib.lists) concatLists; - inherit (lib.modules) mkIf; - inherit (lib.strings) concatMapStrings enableFeature; -in -{ - programs.chromium = { - extensions = [ - "cjpalhdlnbpafiamejdnhcphjbkeiagm" # uBlock Origin - "clngdbkpkpeebahjckkjfobafhncgmne" # stylus - "nngceckbapebfimnlniiiahkandclblb" # Bitwarden - "aihndpeeoneojofmliffjknbegmipbim" # at://wormhole - "mnjggcdmjocbbbhaepdhchncahnbgone" # SponsorBlock - "jghecgabfgfdldnmbfkhmffcabddioke" # Volume Master - "ndcooeababalnlpkfedmmbbbgkljhpjf" # scriptcat - "ephjcajbkgplkjmelpglennepbpmdpjg" # ff2mpv - "kpmjjdhbcfebfjgdnpjagcndoelnidfj" # Control Panel for Twitter - "hlepfoohegkhhmjieoechaddaejaokhf" # refined github - ]; - - package = pkgs.chromium.override { - enableWideVine = true; - - # https://github.com/secureblue/hardened-chromium - # https://github.com/secureblue/secureblue/blob/e500f078efc5748d5033a881bbbcdcd2de95a813/files/system/usr/etc/chromium/chromium.conf.md - commandLineArgs = concatLists [ - # Aesthetics - [ - # "--force-dark-mode" - "--gtk-version=4" - ] - - # Performance - [ - (enableFeature true "gpu-rasterization") - (enableFeature true "oop-rasterization") - (enableFeature true "zero-copy") - "--ignore-gpu-blocklist" - ] - - # Wayland - [ - "--ozone-platform=wayland" - "--enable-features=UseOzonePlatform" - ] - - # Etc - [ - "--disk-cache=$XDG_RUNTIME_DIR/chromium-cache" - - # disable canvas reading for privacy - # (enableFeature false "reading-from-canvas") - - "--no-first-run" - "--disable-wake-on-wifi" - "--disable-breakpad" - - # please stop asking me to be the default browser - "--no-default-browser-check" - - # I don't need these, thus I disable them - (enableFeature false "speech-api") - (enableFeature false "speech-synthesis-api") - ] - - # Security - [ - # Use strict extension verification - "--extension-content-verification=enforce_strict" - "--extensions-install-verification=enforce_strict" - - # Disable pings - "--no-pings" - - # Require HTTPS for component updater - "--component-updater=require_encryption" - - # Disable crash upload - "--no-crash-upload" - - # don't run things without asking - "--no-service-autorun" - - # Disable sync - "--disable-sync" - - ( - "--enable-features=" - + concatMapStrings (x: x + ",") [ - # Enable visited link database partitioning - "PartitionVisitedLinkDatabase" - - # Enable prefetch privacy changes - "PrefetchPrivacyChanges" - - # Enable split cache - "SplitCacheByNetworkIsolationKey" - "SplitCodeCacheByNetworkIsolationKey" - - # Enable partitioning connections - "EnableCrossSiteFlagNetworkIsolationKey" - "HttpCacheKeyingExperimentControlGroup" - "PartitionConnectionsByNetworkIsolationKey" - - # Enable strict origin isolation - "StrictOriginIsolation" - - # Enable reduce accept language header - "ReduceAcceptLanguage" - - # Enable content settings partitioning - "ContentSettingsPartitioning" - - # allow --force-dark-mode to work - # "WebContentsForceDark" - ] - ) - - ( - "--disable-features=" - + concatMapStrings (x: x + ",") [ - # Disable autofill - "AutofillPaymentCardBenefits" - "AutofillPaymentCvcStorage" - "AutofillPaymentCardBenefits" - - # Disable third-party cookie deprecation bypasses - "TpcdHeuristicsGrants" - "TpcdMetadataGrants" - - # Disable hyperlink auditing - "EnableHyperlinkAuditing" - - # Disable showing popular sites - "NTPPopularSitesBakedInContent" - "UsePopularSitesSuggestions" - - # Disable article suggestions - "EnableSnippets" - "ArticlesListVisible" - "EnableSnippetsByDse" - - # Disable content feed suggestions - "InterestFeedV2" - - # Disable media DRM preprovisioning - "MediaDrmPreprovisioning" - - # Disable autofill server communication - "AutofillServerCommunication" - - # Disable new privacy sandbox features - "PrivacySandboxSettings4" - "BrowsingTopics" - "BrowsingTopicsDocumentAPI" - "BrowsingTopicsParameters" - - # Disable translate button - "AdaptiveButtonInTopToolbarTranslate" - - # Disable detailed language settings - "DetailedLanguageSettings" - - # Disable fetching optimization guides - "OptimizationHintsFetching" - - # Partition third-party storage - "DisableThirdPartyStoragePartitioningDeprecationTrial2" - - # Disable media engagement - "PreloadMediaEngagementData" - "MediaEngagementBypassAutoplayPolicies" - - # allow manifest v2 - "ExtensionManifestV2Unsupported" - "ExtensionManifestV2Disabled" - ] - ) - ] - ]; - }; - }; - - xdg.configFile = mkIf (pkgs.stdenv.hostPlatform.isLinux && config.programs.chromium.enable) { - "chromium/NativeMessagingHosts/ff2mpv.json".source = - "${pkgs.ff2mpv-rust}/etc/chromium/native-messaging-hosts/ff2mpv.json"; - }; - - home.file = mkIf pkgs.stdenv.hostPlatform.isDarwin { - "Library/Application Support/Chromium/NativeMessagingHosts/ff2mpv.json".source = - "${pkgs.ff2mpv-rust}/etc/chromium/native-messaging-hosts/ff2mpv.json"; - }; -} diff --git a/home/isabel/gui/default.nix b/home/isabel/gui/default.nix deleted file mode 100644 index d5f4860c..00000000 --- a/home/isabel/gui/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - imports = [ - # keep-sorted start - ./chromium.nix - ./discord.nix - ./ghostty.nix - ./hyprland.nix - ./media - ./notes.nix - ./quickshell.nix - ./vicinae - ./wezterm.nix - # keep-sorted end - ]; -} diff --git a/home/isabel/gui/discord.nix b/home/isabel/gui/discord.nix deleted file mode 100644 index ef26162e..00000000 --- a/home/isabel/gui/discord.nix +++ /dev/null @@ -1,78 +0,0 @@ -# this is a custom module provided by this flake. it is not in home-manager -{ pkgs, ... }: -{ - programs.discord = { - settings = { - SKIP_HOST_UPDATE = true; - DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOUR_DOING = true; - MIN_WIDTH = 940; - MIN_HEIGHT = 500; - openasar = { - setup = true; - quickstart = true; - }; - chromiumSwitches = { }; - IS_MAXIMIZED = true; - IS_MINIMIZED = false; - trayBalloonShown = true; - }; - - moonlight = { - enable = true; - settings = { - extensions = { - # keep-sorted start block=yes - betterCodeblocks = true; - betterEmbedsYT = true; - clearUrls = true; - cloneExpressions = true; - copyWebp = true; - disableSentry = true; - domOptimizer = true; - experiments = true; - favouriteGifSearch = true; - freeMoji = false; - freeScreenShare = true; - greentext = false; - httpCats = true; - imageViewer = true; - inviteToNowhere = true; - lastFmRpc = false; - memberCount = true; - moonbase = true; - nativeFixes = { - enabled = pkgs.stdenv.hostPlatform.isLinux; - config.vaapiIgnoreDriverChecks = true; - }; - noHideToken = true; - noReplyChainNag = true; - noTrack = true; - onePingPerDM = true; - openExternally = true; - ownerCrown = true; - pronouns = true; - svgEmbed = true; - textReplacer = { - enabled = true; - config = { - patterns = { - "://instagram.com/" = "://vxinstagram.com/"; - "://reddit.com/" = "://rxddit.com/"; - "://tiktok.com/" = "://tnktok.com/"; - "://twitter.com/" = "://vxtwitter.com/"; - "://vm.tiktok.com/" = "://vm.tnktok.com/"; - "://www.instagram.com/" = "://vxinstagram.com/"; - "://www.reddit.com/" = "://rxddit.com/"; - "://x.com/" = "://vxtwitter.com/"; - }; - }; - }; - volumeManipulator = true; - # keep-sorted end - }; - - repositories = [ "https://moonlight-mod.github.io/extensions-dist/repo.json" ]; - }; - }; - }; -} diff --git a/home/isabel/gui/ghostty.nix b/home/isabel/gui/ghostty.nix deleted file mode 100644 index 4bbe769a..00000000 --- a/home/isabel/gui/ghostty.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ - lib, - pkgs, - config, - ... -}: -let - inherit (pkgs.stdenv.hostPlatform) isLinux isDarwin; -in -{ - programs.ghostty = { - # FIXME: ghostty is broken on darwin - package = if isLinux then pkgs.ghostty else null; - - settings = { - command = "/run/current-system/sw/bin/fish"; - - background-opacity = 0.90; - cursor-style = "bar"; - window-padding-x = "4,4"; - gtk-titlebar = false; - - window-save-state = "always"; - - # let fontconfig handle this on linux - font-family = lib.mkIf isDarwin config.garden.style.fonts.name; - font-size = lib.mkIf isDarwin 13; - - # home-manager does this for us - shell-integration = "none"; - shell-integration-features = "ssh-env"; - - keybind = [ - "super+u=copy_url_to_clipboard" - ]; - }; - }; -} diff --git a/home/isabel/gui/hyprland.nix b/home/isabel/gui/hyprland.nix deleted file mode 100644 index fd67a8de..00000000 --- a/home/isabel/gui/hyprland.nix +++ /dev/null @@ -1,353 +0,0 @@ -{ - lib, - pkgs, - config, - osConfig, - ... -}: -let - inherit (lib.attrsets) attrNames attrValues; - inherit (lib.lists) - elemAt - genList - concatLists - imap0 - foldl' - length - ; - inherit (lib.strings) optionalString concatLines; - inherit (lib.trivial) mod min id; - - inherit (config.garden.programs) defaults; - inherit (osConfig.garden.device) monitors keyboard; - - mapMonitors = concatLines ( - imap0 ( - i: m: - "monitor=${m.name},${toString m.width}x${toString m.height}@${toString m.refresh-rate},${toString (i * 1920)}x0,${toString m.scale}" - ) (attrValues monitors) - ); - - mapMonitorsToWs = - let - names = attrNames monitors; - count = length names; - splitBy = builtins.div 10 count; - remainder = mod 10 count; - firstSplitBy = splitBy + remainder; - in - concatLines - (foldl' - ( - acc: i: - let - currentSplitBy = if acc.elem == 0 then firstSplitBy else splitBy; - shouldIncrement = acc.usedFor >= currentSplitBy; - newElem = min (if shouldIncrement then acc.elem + 1 else acc.elem) (count - 1); - asStr = "workspace=${toString (i + 1)}, monitor:${elemAt names newElem}${ - if i == 0 then ", default:true" else "" - }"; - in - { - usedFor = if shouldIncrement then 1 else acc.usedFor + 1; - elem = newElem; - out = acc.out ++ [ asStr ]; - } - ) - { - usedFor = 0; - elem = 0; - out = [ ]; - } - (genList id 10) - ).out; -in -{ - options.programs.hyprland.enable = lib.mkEnableOption "Enable Hyprland as the Wayland window manager"; - - config = lib.mkIf config.programs.hyprland.enable { - garden.packages = { inherit (pkgs) hyprpicker cosmic-files; }; - - wayland.windowManager.hyprland = { - enable = true; - - package = null; - portalPackage = null; - - systemd = { - enable = true; - variables = [ "--all" ]; - extraCommands = [ - "systemctl --user stop graphical-session.target" - "systemctl --user start hyprland-session.target" - ]; - }; - - settings = { - "$mod" = "SUPER"; - - animations = { - enabled = true; - - bezier = [ - "wind, 0.05, 0.9, 0.1, 1.05" - "winIn, 0.1, 1.1, 0.1, 1.1" - "winOut, 0.3, -0.3, 0, 1" - "liner, 1, 1, 1, 1" - ]; - animation = [ - "windows, 1, 6, wind, slide" - "windowsIn, 1, 6, winIn, slide" - "windowsOut, 1, 5, winOut, slide" - "windowsMove, 1, 5, wind, slide" - "border, 1, 1, liner" - "borderangle, 1, 30, liner, loop" - "fade, 1, 10, default" - "workspaces, 1, 5, wind" - ]; - }; - - bind = [ - # launchers - "$mod, D, exec, vicinae toggle" - "$mod, B, exec, chromium" - "$mod, E, exec, cosmic-files" - "$mod, C, exec, ${defaults.editor}" - "$mod, Return, exec, ${defaults.terminal}" - "$mod, L, exec, ${defaults.screenLocker}" - "$mod, O, exec, obsidian" - "$mod SHIFT, V, exec, vicinae deeplink vicinae://launch/clipboard/history" - - # window management - "$mod, Q, killactive," - # "$mod SHIFT, Q, exit," - "$mod, F, fullscreen," - "$mod, Space, togglefloating," - "$mod, P, pseudo," # dwindle - "$mod, S, togglesplit," # dwindle - - # grouping - "$mod, g, togglegroup" - "$mod, tab, changegroupactive" - - # special workspace stuff - "$mod, grave, togglespecialworkspace" - "$mod SHIFT, grave, movetoworkspace, special" - - # screen shot - ", Print, exec, grim -g \"$(slurp)\" - | wl-copy" - "$mod SHIFT, s, exec, grim -g \"$(slurp)\" - | wl-copy" - - # scroll wheel binds - "$mod, mouse_down, workspace, e+1" - "$mod, mouse_up, workspace, e-1" - - ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" - ", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" - - ", XF86AudioPlay, exec, playerctl play-pause" - ", XF86AudioPause, exec, playerctl play-pause" - ", XF86AudioNext, exec, playerctl next" - ", XF86AudioPrev, exec, playerctl previous" - ] - ++ (concatLists ( - genList ( - x: - let - ws = - let - c = (x + 1) / 10; - in - toString (x + 1 - (c * 10)); - in - [ - "$mod, ${ws}, workspace, ${toString (x + 1)}" - "$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}" - ] - ) 10 - )); - - # mouse binds - bindm = [ - "$mod, mouse:272, movewindow" - "$mod, mouse:273, resizewindow" - ]; - - # hold to repeat action buttons - binde = [ - ", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+" - ", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" - ", XF86MonBrightnessUp, exec, brightnessctl set 5%+ -q" - ", XF86MonBrightnessDown, exec, brightnessctl set 5%- -q" - ]; - - decoration = { - rounding = 15; - - # 0.8 is nice if we opacity - active_opacity = 1.00; - inactive_opacity = 1.00; - fullscreen_opacity = 1.00; - - shadow = { - enabled = true; - color = "rgb(11111B)"; - color_inactive = "rgba(11111B00)"; - }; - - blur = { - enabled = true; - passes = 2; - size = 2; - - brightness = 1; - contrast = 1.3; - noise = 1.17e-2; - ignore_opacity = true; - - new_optimizations = true; - xray = true; - }; - }; - - layerrule = [ - "blur on, ignore_alpha 0, match:namespace vicinae" - "no_anim on, match:namespace vicinae" - ]; - - general = { - gaps_in = 8; - gaps_out = 8; - gaps_workspaces = 0; - border_size = 2; - - "col.active_border" = "$pink"; - "col.inactive_border" = "$surface1"; - }; - - group = { - insert_after_current = true; - # focus on the window that has just been moved out of the group - focus_removed_window = true; - - "col.border_active" = "$rosewater"; - "col.border_inactive" = "$surface1"; - - groupbar = { - gradients = false; - font_size = 12; - - render_titles = false; - scrolling = true; # change focused window with scroll - }; - }; - - input = { - kb_layout = keyboard; - follow_mouse = 1; - sensitivity = if keyboard == "us" then -0.8 else 0; # -1.0 - 1.0, 0 means no modification. - numlock_by_default = true; # numlock enable - - # swap caps lock and escape - # kb_options = "caps:swapescape"; - - touchpad = { - tap-to-click = true; - natural_scroll = false; # this is not natural - disable_while_typing = false; # this is annoying - }; - }; - - cursor = { - no_hardware_cursors = true; - }; - - dwindle = { - pseudotile = true; - preserve_split = true; - }; - - gesture = [ - "3,horizontal,workspace" - "4,horizontal,workspace" - ]; - - misc = { - disable_hyprland_logo = true; - disable_splash_rendering = true; - force_default_wallpaper = 0; - enable_anr_dialog = false; - - # window swallowing - enable_swallow = false; # hide windows that spawn other windows - swallow_regex = "wezterm|foot|cosmic-files|nemo|com.mitchellh.ghostty"; - - # dpms - mouse_move_enables_dpms = true; # enable dpms on mouse/touchpad action - key_press_enables_dpms = true; # enable dpms on keyboard action - disable_autoreload = true; # autoreload is unnecessary on nixos, because the config is readonly anyway - }; - - windowrule = [ - "float on, match:title ^(nm-connection-editor)$" - "float on, match:title ^(Network)$" - "float on, match:title ^(xdg-desktop-portal-gtk)$" - "float on, match:class gay.vaskel.soteria" - "float on, match:title ^(Picture-in-Picture)$" - "float on, match:class ^(download)$" - - "center on, float on, size (monitor_w*0.4) (monitor_h*0.6), match:initial_title (Open Files)" - "center on, float on, size (monitor_w*0.4) (monitor_h*0.6), match:class .blueman-manager-wrapped" - "center on, float on, size (monitor_w*0.4) (monitor_h*0.6), match:class com.saivert.pwvucontrol" - "float on, size 800 600, match:title Bitwarden" - - "workspace 6, match:class discord" # move discord to workspace 6 - "workspace 7, match:class spotify" # move spotify to workspace 7 - - # throw sharing indicators away - "workspace special silent, match:title ^(Firefox — Sharing Indicator)$" - "workspace special silent, match:title ^(.*is sharing (your screen|a window).)$" - ]; - }; - - extraConfig = '' - ${mapMonitors} - ${optionalString (length (attrNames monitors) != 1) "${mapMonitorsToWs}"} - - # █▀▄▀█ █▀█ █░█ █▀▀ - # █░▀░█ █▄█ ▀▄▀ ██▄ - bind=SUPER, M, submap, move - submap=move - - binde = , left, movewindow, l - binde = , right, movewindow, r - binde = , up, movewindow, u - binde = , down, movewindow, d - binde = , j, movewindow, l - binde = , l, movewindow, r - binde = , i, movewindow, u - binde = , k, movewindow, d - - bind=,escape,submap,reset - submap=reset - - # █▀█ █▀▀ █▀ █ ▀█ █▀▀ - # █▀▄ ██▄ ▄█ █ █▄ ██▄ - bind=SUPER, R, submap, resize - submap=resize - - binde = , left, resizeactive, -20 0 - binde = , right, resizeactive, 20 0 - binde = , up, resizeactive, 0 -20 - binde = , down, resizeactive, 0 20 - binde = , h, resizeactive, -20 0 - binde = , j, resizeactive, 20 0 - binde = , i, resizeactive, 0 -20 - binde = , k, resizeactive, 0 20 - - bind=,escape,submap,reset - submap=reset - ''; - }; - }; -} diff --git a/home/isabel/gui/media/creation.nix b/home/isabel/gui/media/creation.nix deleted file mode 100644 index 9f42e450..00000000 --- a/home/isabel/gui/media/creation.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - lib, - pkgs, - config, - ... -}: -{ - garden.packages = lib.mkIf config.garden.profiles.media.creation.enable { - inherit (pkgs) - inkscape # vector graphics editor - gimp # image editor - ; - }; -} diff --git a/home/isabel/gui/media/default.nix b/home/isabel/gui/media/default.nix deleted file mode 100644 index 04a54b4b..00000000 --- a/home/isabel/gui/media/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - imports = [ - # keep-sorted start - ./creation.nix - ./listening.nix - ./streaming.nix - ./watching.nix - # keep-sorted end - ]; -} diff --git a/home/isabel/gui/media/listening.nix b/home/isabel/gui/media/listening.nix deleted file mode 100644 index 06ac9ffa..00000000 --- a/home/isabel/gui/media/listening.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ - lib, - pkgs, - config, - inputs, - inputs', - ... -}: -let - inherit (lib.modules) mkIf; - - spicePkgs = inputs'.spicetify.legacyPackages; -in -{ - imports = [ inputs.spicetify.homeManagerModules.spicetify ]; - - config = mkIf config.garden.profiles.media.watching.enable { - programs.spicetify = { - enable = true; - - spotifyPackage = - if pkgs.stdenv.hostPlatform.isLinux then - pkgs.spotify.override { ffmpeg_4 = pkgs.ffmpeg; } - else - pkgs.spotify; - - colorScheme = "CatppuccinMocha"; - theme = spicePkgs.themes.text; - - enabledExtensions = with spicePkgs.extensions; [ - shuffle - copyToClipboard - # lastfm - hidePodcasts - adblock - volumePercentage - aiBandBlocker - ]; - }; - }; -} diff --git a/home/isabel/gui/media/streaming.nix b/home/isabel/gui/media/streaming.nix deleted file mode 100644 index 781baaba..00000000 --- a/home/isabel/gui/media/streaming.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - lib, - pkgs, - config, - ... -}: -{ - config = lib.mkIf config.garden.profiles.media.streaming.enable { - garden.packages = { - inherit (pkgs) chatterino7; - }; - - programs.obs-studio = { - enable = true; - package = pkgs.obs-studio.override { - cudaSupport = true; - }; - - plugins = with pkgs.obs-studio-plugins; [ - wlrobs - obs-multi-rtmp - obs-move-transition - ]; - }; - }; -} diff --git a/home/isabel/gui/media/watching.nix b/home/isabel/gui/media/watching.nix deleted file mode 100644 index 79bb3f79..00000000 --- a/home/isabel/gui/media/watching.nix +++ /dev/null @@ -1,188 +0,0 @@ -{ - lib, - pkgs, - config, - ... -}: -let - inherit (lib.modules) mkIf mkMerge; - inherit (pkgs.stdenv.hostPlatform) isLinux; -in -{ - config = mkIf config.garden.profiles.media.watching.enable { - garden.packages = mkMerge [ - { - inherit (pkgs) yt-dlp ff2mpv-rust; - } - - (mkIf pkgs.stdenv.hostPlatform.isLinux { - inherit (pkgs) - syncplay - ffmpeg - playerctl - ; - }) - ]; - - # i don't really like it LOL - catppuccin.mpv.enable = false; - - programs.mpv = { - enable = true; - - scripts = - (with pkgs.mpvScripts; [ - sponsorblock - - # unify my clipboard - (videoclip.override { wl-clipboard = pkgs.wl-clipboard-rs; }) - - # modern ui - modernz - thumbfast - - # mpv as our image viewer - mpv-image-viewer.image-positioning - ]) - ++ lib.optionals pkgs.stdenv.hostPlatform.isLinux [ - pkgs.mpvScripts.mpris - ]; - - bindings = { - # sane defaults - "AXIS_UP" = "add volume 2"; - "AXIS_DOWN" = "add volume -2"; - "UP" = "add volume 2"; - "DOWN" = "add volume -2"; - "Shift+RIGHT" = "frame-step"; - "Shift+LEFT" = "frame-back-step"; - "Shift+UP" = "add volume 10"; - "Shift+DOWN" = "add volume -10"; - "y" = "cycle deband"; - "z" = "cycle deband"; - "ctrl+d" = "vf toggle yadif"; - "e" = "add sub-delay +0.042"; - "w" = "add sub-delay -0.042"; - "b" = "add audio-delay +0.042"; - "n" = "add audio-delay -0.042"; - "a" = "cycle-values video-aspect \"16:9\" \"4:3\" \"2.35:1\" \"-1\""; - - # videoclip script - "c" = "script-binding videoclip-menu-open"; - - # mpv as a image viewer - MBTN_RIGHT = "script-binding drag-to-pan"; - "alt+down" = "repeatable script-message pan-image y -0.01 yes yes"; - "alt+up" = "repeatable script-message pan-image y +0.01 yes yes"; - "alt+right" = "repeatable script-message pan-image x -0.01 yes yes"; - "alt+left" = "repeatable script-message pan-image x +0.01 yes yes"; - }; - - config = { - # osc settings - osc = "no"; # i am using modernz ^.^ - border = "no"; - msg-color = "yes"; - msg-module = "yes"; - - save-watch-history = "yes"; - - # audio settings - volume-max = 200; - - # video settings - # use hardware decoding when available, prefer vulkan - hwdec = if isLinux then "auto-copy" else "auto"; - gpu-api = if isLinux then "vulkan" else "auto"; - profile = "gpu-hq"; - vo = "gpu-next"; # GPU-Next: https://github.com/mpv-player/mpv/wiki/GPU-Next-vs-GPV - - # screenshot settings - screenshot-directory = - if pkgs.stdenv.hostPlatform.isDarwin then - "~/Pictures/screenshots" - else - "~/media/pictures/screenshots"; - screenshot-template = "%x/screenshot-%F-T%wH.%wM.%wS.%wT-F%{estimated-frame-number}"; - screenshot-format = "png"; - screenshot-png-compression = 4; # Range is 0 to 10. 0 being no compression. - screenshot-tag-colorspace = "yes"; - screenshot-high-bit-depth = "yes"; # Same output bitdepth as the video - - # use English audio and subtitles if available - alang = "en,jpn,jp"; - - # misc - stop-screensaver = "yes"; - cursor-autohide = 100; # auto hide cursor after 100ms - reset-on-next-file = "video-zoom,panscan,video-unscaled,video-rotate,video-align-x,video-align-y"; - ytdl-raw-options = "cookies=~/documents/yt-dlp-cookies.txt"; - }; - - profiles = { - image = { - profile-cond = "p[\"current-tracks/video\"] and p[\"current-tracks/video\"].image and not p[\"current-tracks/video\"].albumart"; - profile-restore = "copy-equal"; - - # we need duplicate config options which nix doesn't really handle - include = toString ( - pkgs.writeText "mpv-image-viewer.conf" '' - script-opts-append=modernz-fade_alpha=50 - script-opts-append=modernz-window_title=yes - script-opts-append=modernz-bottomhover_zone=50 - '' - ); - - title = "\${media-title} [\${?width:\${width}x\${height}}]"; - taskbar-progress = "no"; - video-unscaled = "yes"; - video-recenter = "yes"; - window-dragging = "no"; - - prefetch-playlist = "yes"; - video-aspect-override = "no"; - - # keep the file open - loop-file = "inf"; - image-display-duration = "inf"; - loop-playlist = "inf"; - }; - - # good refrences for mpv config: - # - video = { - profile-cond = "p[\"current-tracks/video\"] and not p[\"current-tracks/video\"].image"; - profile-restore = "copy-equal"; - taskbar-progress = "yes"; - }; - }; - - scriptOpts = { - modernz = { - idlescreen = "no"; - download_path = "~/media/videos"; - - # change some buttons - ontop_button = "no"; - speed_button = "yes"; - info_button = "no"; - fullscreen_button = "no"; - - hover_effect = "color"; - hover_effect_color = "#74c7ec"; - seekbarfg_color = "#74c7ec"; - seekbarbg_color = "#181825"; - }; - - videoclip = { - video_folder_path = - if pkgs.stdenv.hostPlatform.isDarwin then "~/Movies/clips" else "~/media/videos/clips"; - audio_folder_path = - if pkgs.stdenv.hostPlatform.isDarwin then "~/Music/clips" else "~/media/music/clips"; - video_quality = 10; - custom_upload_command = "gup -c -s %f"; - }; - }; - }; - }; -} diff --git a/home/isabel/gui/notes.nix b/home/isabel/gui/notes.nix deleted file mode 100644 index 1dc0a03e..00000000 --- a/home/isabel/gui/notes.nix +++ /dev/null @@ -1,79 +0,0 @@ -{ - lib, - pkgs, - config, - ... -}: -let - inherit (config.garden.programs) defaults; - - cond = - config.garden.profiles.workstation.enable - && (config.garden.profiles.graphical.enable || pkgs.stdenv.hostPlatform.isDarwin); -in -{ - config = lib.mkIf cond { - garden.packages = { - inherit (pkgs) - obsidian - pandoc - ; - }; - - programs.zk = { - enable = true; - settings = { - note = { - # The default title used for new note, if no `--title` flag is provided. - default-title = "untitled"; - - # The charset used for random IDs. You can use: - # * letters: only letters from a to z. - # * numbers: 0 to 9 - # * alphanum: letters + numbers - # * hex: hexadecimal, from a to f and 0 to 9 - # * custom string: will use any character from the provided value - id-charset = "hex"; - - # Length of the generated IDs. - id-length = 6; - }; - - tool = { - inherit (defaults) editor pager; - - # Command used to preview a note during interactive fzf mode. - # Set it to an empty string "" to disable preview. - fzf-preview = "bat -p --color always {-1}"; - }; - - alias = { - list = "zk list --quiet -f oneline $@"; - ls = "zk list $@"; - wc = "zk list --sort word-count $@"; - - search = "zk list -i $@"; - - # Edit the last modified note. - editlast = "zk edit --limit 1 --sort modified- $@"; - - # Edit the notes selected interactively among the notes created the last two weeks. - # This alias doesn't take any argument, so we don't use $@. - recent = "zk edit --sort created- --created-after 'last two weeks' --interactive"; - - # Print paths separated with colons for the notes found with the given - # arguments. This can be useful to expand a complex search query into a flag - # taking only paths. For example: - # zk list --link-to "`zk path -m potato`" - path = "zk list --quiet --format {{path}} --delimiter , $@"; - - # Returns the Git history for the notes found with the given arguments. - # Note the use of a pipe and the location of $@. - hist = "zk list --format path --delimiter0 --quiet $@ | xargs -t -0 git log --patch --"; - - tags = "zk tag list $@"; - }; - }; - }; - }; -} diff --git a/home/isabel/gui/quickshell.nix b/home/isabel/gui/quickshell.nix deleted file mode 100644 index 651d2bf1..00000000 --- a/home/isabel/gui/quickshell.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ pkgs, ... }: -{ - programs.quickshell = { - package = pkgs.symlinkJoin { - name = "quickshell-wrapped"; - paths = [ - pkgs.quickshell - pkgs.kdePackages.qtimageformats - pkgs.adwaita-icon-theme - pkgs.kdePackages.kirigami.unwrapped - ]; - meta.mainProgram = pkgs.quickshell.meta.mainProgram; - }; - - systemd.enable = true; - }; -} diff --git a/home/isabel/gui/quickshell/components/BarDivider.qml b/home/isabel/gui/quickshell/components/BarDivider.qml deleted file mode 100644 index 45865ed2..00000000 --- a/home/isabel/gui/quickshell/components/BarDivider.qml +++ /dev/null @@ -1,11 +0,0 @@ -import QtQuick -import QtQuick.Layouts -import "root:/data" - -Rectangle { - Layout.alignment: Qt.AlignHCenter - width: 20 - height: 1 - color: Settings.colors.foreground - opacity: 0.2 -} diff --git a/home/isabel/gui/quickshell/components/Battery.qml b/home/isabel/gui/quickshell/components/Battery.qml deleted file mode 100644 index 57beaf94..00000000 --- a/home/isabel/gui/quickshell/components/Battery.qml +++ /dev/null @@ -1,37 +0,0 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Controls -import "root:/data" -import "root:/components" -import "root:/services" - -Item { - id: root - - Layout.alignment: Qt.AlignCenter - implicitWidth: 20 - implicitHeight: 20 - - // Only show if battery is present - visible: UPower.isPresent - - MyIcon { - anchors.centerIn: parent - icon: UPower.icon - size: 18 - } - - // Tooltip showing percentage and status - ToolTip { - id: tooltip - visible: mouseArea.containsMouse - text: `${Math.round(UPower.percentage)}% - ${UPower.statusText}` - delay: 500 - } - - MouseArea { - id: mouseArea - anchors.fill: parent - hoverEnabled: true - } -} diff --git a/home/isabel/gui/quickshell/components/Clock.qml b/home/isabel/gui/quickshell/components/Clock.qml deleted file mode 100644 index a494faff..00000000 --- a/home/isabel/gui/quickshell/components/Clock.qml +++ /dev/null @@ -1,23 +0,0 @@ -import QtQuick -import QtQuick.Layouts -import "root:/data" - -Item { - id: root - - Layout.alignment: Qt.AlignCenter - implicitWidth: 30 - implicitHeight: 50 - - Text { - id: clockText - anchors.centerIn: parent - text: Time.time - color: Settings.colors.foreground - font { - pixelSize: 14 - weight: Font.Medium - } - horizontalAlignment: Text.AlignHCenter - } -} diff --git a/home/isabel/gui/quickshell/components/ExpandablePanel.qml b/home/isabel/gui/quickshell/components/ExpandablePanel.qml deleted file mode 100644 index f2eb1f5c..00000000 --- a/home/isabel/gui/quickshell/components/ExpandablePanel.qml +++ /dev/null @@ -1,60 +0,0 @@ -import QtQuick -import QtQuick.Layouts -import Quickshell -import Quickshell.Widgets -import "root:/data" - -Rectangle { - id: root - - property string title: "" - property string subtitle: "" - property bool expanded: false - property alias content: contentLoader.sourceComponent - property int contentHeight: 150 - - Layout.fillWidth: true - Layout.preferredHeight: expanded ? contentLoader.item?.height + 48 : 0 - visible: expanded - radius: 8 - color: Settings.colors.backgroundLighter - clip: true - - Behavior on Layout.preferredHeight { - NumberAnimation { duration: 150; easing.type: Easing.OutCubic } - } - - ColumnLayout { - anchors.fill: parent - anchors.margins: 12 - spacing: 8 - - RowLayout { - Layout.fillWidth: true - - Text { - text: root.title - color: Settings.colors.foreground - font { - pixelSize: 13 - weight: Font.Medium - } - } - - Item { Layout.fillWidth: true } - - Text { - text: root.subtitle - color: Settings.colors.accent - font.pixelSize: 11 - visible: root.subtitle !== "" - } - } - - Loader { - id: contentLoader - Layout.fillWidth: true - Layout.preferredHeight: Math.min(item?.implicitHeight ?? 0, root.contentHeight) - } - } -} diff --git a/home/isabel/gui/quickshell/components/IconButton.qml b/home/isabel/gui/quickshell/components/IconButton.qml deleted file mode 100644 index 33bd0271..00000000 --- a/home/isabel/gui/quickshell/components/IconButton.qml +++ /dev/null @@ -1,39 +0,0 @@ -import QtQuick -import Quickshell -import Quickshell.Widgets -import "root:/data" -import "root:/components" - -Item { - id: root - - property string icon: "" - property int size: 18 - property bool invert: false - - signal clicked - - implicitWidth: size - implicitHeight: size - - MyIcon { - anchors.centerIn: parent - icon: root.icon - size: root.size - invert: root.invert - } - - MouseArea { - id: mouseArea - anchors.fill: parent - hoverEnabled: true - cursorShape: Qt.PointingHandCursor - onClicked: root.clicked() - } - - scale: mouseArea.pressed ? 0.9 : 1.0 - - Behavior on scale { - NumberAnimation { duration: 100 } - } -} diff --git a/home/isabel/gui/quickshell/components/Launcher.qml b/home/isabel/gui/quickshell/components/Launcher.qml deleted file mode 100644 index 4675e98f..00000000 --- a/home/isabel/gui/quickshell/components/Launcher.qml +++ /dev/null @@ -1,25 +0,0 @@ -import QtQuick -import QtQuick.Layouts -import Quickshell -import Quickshell.Io -import "root:/data" - -Item { - id: root - - Layout.alignment: Qt.AlignCenter - implicitWidth: 24 - implicitHeight: 24 - - IconButton { - anchors.centerIn: parent - icon: "nix-snowflake" - size: 20 - onClicked: launcherProcess.running = true - } - - Process { - id: launcherProcess - command: ["vicinae", "toggle"] - } -} diff --git a/home/isabel/gui/quickshell/components/MediaPlayers.qml b/home/isabel/gui/quickshell/components/MediaPlayers.qml deleted file mode 100644 index 172c8080..00000000 --- a/home/isabel/gui/quickshell/components/MediaPlayers.qml +++ /dev/null @@ -1,186 +0,0 @@ -import QtQuick -import QtQuick.Layouts -import Quickshell.Widgets -import Quickshell.Services.Mpris -import "root:/data" -import "root:/services" - -ColumnLayout { - id: root - - Layout.fillWidth: true - spacing: 8 - visible: Media.players.length > 0 - - RowLayout { - Layout.fillWidth: true - spacing: 8 - - Text { - text: "Now Playing" - color: Settings.colors.foreground - font { - pixelSize: 14 - weight: Font.Bold - } - } - - Item { Layout.fillWidth: true } - - // Player selector (if multiple players) - Row { - spacing: 4 - visible: Media.players.length > 1 - - Repeater { - model: Media.players - - Rectangle { - required property MprisPlayer modelData - required property int index - width: 8 - height: 8 - radius: 4 - color: Media.selectedPlayer === modelData ? Settings.colors.accent : Settings.colors.backgroundLightest - - MouseArea { - anchors.fill: parent - cursorShape: Qt.PointingHandCursor - onClicked: Media.selectedPlayer = modelData - } - } - } - } - } - - // Current Player - ListView { - id: mediaPlayerList - Layout.fillWidth: true - Layout.preferredHeight: contentHeight - model: Media.players - spacing: 8 - clip: true - interactive: false - - delegate: Rectangle { - required property MprisPlayer modelData - required property int index - width: ListView.view.width - height: 90 - radius: 8 - color: Settings.colors.backgroundLighter - opacity: Media.selectedPlayer === modelData ? 1.0 : 0.6 - - MouseArea { - anchors.fill: parent - onClicked: Media.selectedPlayer = modelData - } - - RowLayout { - anchors { - fill: parent - margins: 10 - } - spacing: 10 - - // Album Art - ClippingWrapperRectangle { - radius: 6 - Layout.preferredWidth: 70 - Layout.preferredHeight: 70 - - Image { - anchors.fill: parent - source: modelData.trackArtUrl - fillMode: Image.PreserveAspectCrop - } - } - - // Track Info & Controls - ColumnLayout { - Layout.fillWidth: true - Layout.fillHeight: true - spacing: 2 - - RowLayout { - Layout.fillWidth: true - spacing: 4 - - Text { - text: modelData.trackTitle ?? "Unknown" - color: Settings.colors.foreground - font { - pixelSize: 13 - weight: Font.Medium - } - elide: Text.ElideRight - Layout.fillWidth: true - } - - // Player app name badge - Rectangle { - visible: Media.players.length > 1 - Layout.preferredHeight: 16 - Layout.preferredWidth: appNameText.width + 8 - radius: 4 - color: Settings.colors.backgroundLightest - - Text { - id: appNameText - anchors.centerIn: parent - text: modelData.identity ?? "" - color: Settings.colors.foreground - opacity: 0.7 - font.pixelSize: 9 - } - } - } - - Text { - text: modelData.trackArtist ?? "" - color: Settings.colors.foreground - opacity: 0.7 - font.pixelSize: 11 - elide: Text.ElideRight - Layout.fillWidth: true - } - - Item { Layout.fillHeight: true } - - // Playback Controls - RowLayout { - spacing: 14 - Layout.alignment: Qt.AlignLeft - - IconButton { - icon: "media-skip-backward-symbolic" - size: 14 - onClicked: modelData.previous() - } - - IconButton { - icon: modelData.playbackState === MprisPlaybackState.Playing - ? "media-playback-pause-symbolic" - : "media-playback-start-symbolic" - size: 18 - onClicked: { - if (modelData.playbackState === MprisPlaybackState.Playing) { - modelData.pause(); - } else { - modelData.play(); - } - } - } - - IconButton { - icon: "media-skip-forward-symbolic" - size: 14 - onClicked: modelData.next() - } - } - } - } - } - } -} diff --git a/home/isabel/gui/quickshell/components/MyIcon.qml b/home/isabel/gui/quickshell/components/MyIcon.qml deleted file mode 100644 index 2b34b7e2..00000000 --- a/home/isabel/gui/quickshell/components/MyIcon.qml +++ /dev/null @@ -1,28 +0,0 @@ -import org.kde.kirigami -import QtQuick -import QtQuick.Effects -import Quickshell -import Quickshell.Widgets -import "root:/data" - -Item { - id: root - - property string icon: "" - property int size: 18 - property bool invert: false - - implicitWidth: size - implicitHeight: size - - Icon { - id: iconSource - anchors.fill: parent - source: Quickshell.iconPath(root.icon) - - isMask: true - // FIXME: - // color: Settings.colors.foreground - color: invert ? "#1e1e2e" : "#cdd6f4" - } -} diff --git a/home/isabel/gui/quickshell/components/Network.qml b/home/isabel/gui/quickshell/components/Network.qml deleted file mode 100644 index 94563820..00000000 --- a/home/isabel/gui/quickshell/components/Network.qml +++ /dev/null @@ -1,20 +0,0 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Controls.Basic -import "root:/data" -import "root:/components" -import "root:/services" - -Item { - id: root - - Layout.alignment: Qt.AlignCenter - implicitWidth: 20 - implicitHeight: 20 - - MyIcon { - anchors.centerIn: parent - icon: Networking.icon - size: 18 - } -} diff --git a/home/isabel/gui/quickshell/components/Noti.qml b/home/isabel/gui/quickshell/components/Noti.qml deleted file mode 100644 index ea72c25c..00000000 --- a/home/isabel/gui/quickshell/components/Noti.qml +++ /dev/null @@ -1,26 +0,0 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Controls -import Quickshell -import Quickshell.Widgets -import Quickshell.Services.Notifications as QsNotifications -import "root:/data" -import "root:/services" - -Item { - id: root - - property bool hasNotifications: Notifications.list.length > 0 || Notifications.dndEnabled - - visible: hasNotifications - - Layout.alignment: Qt.AlignCenter - implicitWidth: 24 - implicitHeight: 24 - - MyIcon { - anchors.centerIn: parent - icon: Notifications.dndEnabled ? "notifications-disabled-symbolic" : "preferences-system-notifications-symbolic" - size: 18 - } -} diff --git a/home/isabel/gui/quickshell/components/PanelListItem.qml b/home/isabel/gui/quickshell/components/PanelListItem.qml deleted file mode 100644 index 95730fc4..00000000 --- a/home/isabel/gui/quickshell/components/PanelListItem.qml +++ /dev/null @@ -1,59 +0,0 @@ -import QtQuick -import QtQuick.Layouts -import "root:/data" - -Rectangle { - id: root - - property string icon: "" - property string text: "" - property string badge: "" - property bool active: false - property bool showBadge: badge !== "" - - signal clicked() - - width: parent?.width ?? 100 - height: 36 - radius: 6 - color: active ? Settings.colors.accent : "transparent" - border.color: Settings.colors.border - border.width: 1 - - MouseArea { - id: mouseArea - anchors.fill: parent - cursorShape: Qt.PointingHandCursor - hoverEnabled: true - onEntered: if (!root.active) parent.color = Settings.colors.backgroundLightest - onExited: parent.color = root.active ? Settings.colors.accent : "transparent" - onClicked: root.clicked() - } - - RowLayout { - anchors.fill: parent - anchors.margins: 8 - spacing: 8 - - MyIcon { - icon: root.icon - size: 16 - } - - Text { - text: root.text - color: root.active ? Settings.colors.background : Settings.colors.foreground - font.pixelSize: 12 - elide: Text.ElideRight - Layout.fillWidth: true - } - - Text { - visible: root.showBadge - text: root.badge - color: root.active ? Settings.colors.background : Settings.colors.foreground - opacity: 0.7 - font.pixelSize: 11 - } - } -} diff --git a/home/isabel/gui/quickshell/components/QuickSettings.qml b/home/isabel/gui/quickshell/components/QuickSettings.qml deleted file mode 100644 index 771c7567..00000000 --- a/home/isabel/gui/quickshell/components/QuickSettings.qml +++ /dev/null @@ -1,413 +0,0 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Controls.Basic -import Quickshell -import Quickshell.Io -import Quickshell.Widgets -import "root:/data" -import "root:/services" - -ColumnLayout { - id: root - - Layout.fillWidth: true - spacing: 12 - - Process { - id: openConfigProc - command: ["ghostty", "-e", "nvim", "~/.config/flake"] - } - - Process { - id: powerOffProc - command: ["systemctl", "poweroff"] - } - - Text { - text: "Quick Settings" - color: Settings.colors.foreground - font { - pixelSize: 14 - weight: Font.Bold - } - } - - // Network Panel (expandable) - Rectangle { - id: networkPanel - Layout.fillWidth: true - Layout.preferredHeight: visible ? Math.min(networkColumn.implicitHeight + 20, 350) : 0 - visible: false - radius: 8 - color: Settings.colors.backgroundLighter - border.color: Settings.colors.border - border.width: 1 - clip: true - - Behavior on Layout.preferredHeight { - NumberAnimation { duration: 150; easing.type: Easing.OutCubic } - } - - ColumnLayout { - id: networkColumn - anchors.fill: parent - anchors.margins: 12 - spacing: 8 - - RowLayout { - Layout.fillWidth: true - - Text { - text: "Networks" - color: Settings.colors.foreground - font { - pixelSize: 13 - weight: Font.Medium - } - } - - Item { Layout.fillWidth: true } - - IconButton { - icon: "view-refresh-symbolic" - size: 14 - onClicked: Networking.reload() - } - } - - ScrollView { - Layout.fillWidth: true - Layout.preferredHeight: Math.min(networkListView.contentHeight, 280) - clip: true - - ListView { - id: networkListView - width: parent.width - model: Networking.networks - spacing: 4 - - delegate: PanelListItem { - required property var modelData - width: ListView.view.width - icon: modelData.icon - text: modelData.ssid || "Unknown" - badge: modelData.strength + "%" - active: modelData.active - onClicked: { - if (!modelData.active) { - Networking.connectToNetwork(modelData.ssid); - } - } - } - } - } - - Text { - text: Networking.networks?.count === 0 ? "No networks found" : "" - color: Settings.colors.foreground - opacity: 0.5 - font.pixelSize: 12 - visible: Networking.networks?.count === 0 - Layout.alignment: Qt.AlignHCenter - } - - Item { Layout.fillHeight: true } - } - } - - // Bluetooth Panel (expandable) - Rectangle { - id: bluetoothPanel - Layout.fillWidth: true - Layout.preferredHeight: visible ? Math.min(bluetoothColumn.implicitHeight + 20, 350) : 0 - visible: false - radius: 8 - color: Settings.colors.backgroundLighter - border.color: Settings.colors.border - border.width: 1 - clip: true - - Behavior on Layout.preferredHeight { - NumberAnimation { duration: 150; easing.type: Easing.OutCubic } - } - - ColumnLayout { - id: bluetoothColumn - anchors.fill: parent - anchors.margins: 12 - spacing: 8 - - RowLayout { - Layout.fillWidth: true - - Text { - text: "Bluetooth Devices" - color: Settings.colors.foreground - font { - pixelSize: 13 - weight: Font.Medium - } - } - - Item { Layout.fillWidth: true } - - // Scan button - IconButton { - icon: Bluetooth.adapter?.discovering ? "process-stop-symbolic" : "view-refresh-symbolic" - size: 14 - onClicked: { - if (Bluetooth.adapter?.discovering) { - Bluetooth.stopDiscovery(); - } else { - Bluetooth.startDiscovery(); - } - } - } - - Text { - text: Bluetooth.connected ? Bluetooth.connectedDevice?.name ?? "" : "" - color: Settings.colors.accent - font.pixelSize: 11 - visible: Bluetooth.connected - } - } - - ScrollView { - Layout.fillWidth: true - Layout.preferredHeight: Math.min(bluetoothListView.contentHeight, 280) - clip: true - - ListView { - id: bluetoothListView - width: parent.width - model: Bluetooth.devices - spacing: 8 - clip: true - - delegate: PanelListItem { - required property var modelData - width: ListView.view.width - icon: modelData.icon || "bluetooth-symbolic" - text: modelData.name - badge: modelData.connected ? "Connected" : (modelData.paired ? "Paired" : "") - active: modelData.connected - onClicked: { - if (modelData.connected) { - modelData.disconnect(); - } else if (modelData.paired) { - modelData.connect(); - } else { - // Pair and connect - modelData.pair(); - } - } - } - } - } - - Text { - text: { - if (!Bluetooth.adapter) return "No Bluetooth adapter"; - if (Bluetooth.devices?.count === 0) return "No devices found"; - return ""; - } - color: Settings.colors.foreground - opacity: 0.5 - font.pixelSize: 12 - visible: !Bluetooth.adapter || Bluetooth.devices?.count === 0 - Layout.alignment: Qt.AlignHCenter - } - - Item { Layout.fillHeight: true } - } - } - - // Toggle Buttons Row - RowLayout { - Layout.fillWidth: true - spacing: 8 - - // Netoworking Toggle - QuickSettingButton { - icon: Networking.icon - label: "Networking" - active: Networking.connected - onClicked: (mouse) => { - // Do nothing if ethernet is connected - if (Networking.ethernetConnected) return; - - if (mouse.button === Qt.RightButton) { - networkPanel.visible = !networkPanel.visible - } - - // otherwise lets actually do wifi stuff - Networking.toggleWifi() - } - } - - // Bluetooth Toggle - QuickSettingButton { - icon: Bluetooth.icon - label: "Bluetooth" - active: Bluetooth.powered - onClicked: (mouse) => { - if (mouse.button === Qt.RightButton) { - bluetoothPanel.visible = !bluetoothPanel.visible - return; - } - - Bluetooth.toggle() - } - } - - // Do Not Disturb Toggle - QuickSettingButton { - icon: Notifications.dndEnabled ? "notifications-disabled-symbolic" : "preferences-system-notifications-symbolic" - label: "DND" - active: Notifications.dndEnabled - onClicked: Notifications.dndEnabled = !Notifications.dndEnabled - } - } - - // Volume Slider - StyledSlider { - icon: Pipewire.sinkIcon - value: Pipewire.sinkVolume - iconClickable: true - onIconClicked: Pipewire.toggleSinkMute() - onMoved: (val) => Pipewire.setSinkVolume(val) - } - - // Brightness Slider - StyledSlider { - visible: Brightness.available - icon: "display-brightness-symbolic" - value: Brightness.brightness - from: 0.05 - accentColor: Settings.colors.warning - onMoved: (val) => Brightness.setBrightness(val) - } - - // User Profile Section - Rectangle { - Layout.fillWidth: true - Layout.preferredHeight: 72 - radius: 8 - color: Settings.colors.backgroundLighter - border.color: Settings.colors.border - border.width: 1 - - RowLayout { - anchors { - fill: parent - margins: 12 - } - spacing: 12 - - // Profile Picture - ClippingWrapperRectangle { - Layout.preferredWidth: 48 - Layout.preferredHeight: 48 - radius: 24 - color: Settings.colors.backgroundLightest - - Image { - id: profileImage - anchors.fill: parent - source: Settings.profilePicture - - onStatusChanged: { - if (status === Image.Error) { - console.error("Failed to load background image:", source); - } - } - } - } - - // Username and greeting - ColumnLayout { - Layout.fillWidth: true - spacing: 2 - - Text { - text: Settings.username - color: Settings.colors.foreground - font { - pixelSize: 14 - weight: Font.Bold - } - } - - Text { - text: { - const hour = new Date().getHours(); - if (hour < 12) return "Good morning"; - if (hour < 18) return "Good afternoon"; - return "Good evening"; - } - color: Settings.colors.foreground - opacity: 0.7 - font.pixelSize: 12 - } - } - - - // Settings button - IconButton { - icon: "applications-system-symbolic" - size: 18 - onClicked: openConfigProc.startDetached() - } - - // Power off button - IconButton { - icon: "system-shutdown-symbolic" - size: 18 - onClicked: powerOffProc.startDetached() - } - } - } - - // Quick Setting Button Component - component QuickSettingButton: Rectangle { - id: qsButton - Layout.fillWidth: true - Layout.preferredHeight: 64 - radius: 8 - color: active ? Settings.colors.accent : Settings.colors.backgroundLighter - border.color: Settings.colors.border - border.width: 1 - - property string icon: "" - property string label: "" - property bool active: false - - signal clicked(mouse: MouseEvent) - - ColumnLayout { - anchors.centerIn: parent - spacing: 6 - - MyIcon { - icon: qsButton.icon - size: 20 - Layout.alignment: Qt.AlignHCenter - invert: active - } - - Text { - text: qsButton.label - color: qsButton.active ? Settings.colors.background : Settings.colors.foreground - font.pixelSize: 11 - Layout.alignment: Qt.AlignHCenter - } - } - - MouseArea { - anchors.fill: parent - cursorShape: Qt.PointingHandCursor - onClicked: (mouse) => qsButton.clicked(mouse) - acceptedButtons: Qt.LeftButton | Qt.RightButton - } - } -} diff --git a/home/isabel/gui/quickshell/components/StyledSlider.qml b/home/isabel/gui/quickshell/components/StyledSlider.qml deleted file mode 100644 index 68bd3481..00000000 --- a/home/isabel/gui/quickshell/components/StyledSlider.qml +++ /dev/null @@ -1,73 +0,0 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Controls.Basic -import "root:/data" -import "root:/components" - -RowLayout { - id: root - - property string icon: "" - property real value: 0 - property real from: 0 - property real to: 1 - property color accentColor: Settings.colors.accent - property bool showPercentage: true - property bool iconClickable: false - - signal moved(real value) - signal iconClicked() - - Layout.fillWidth: true - spacing: 12 - - IconButton { - icon: root.icon - size: 18 - onClicked: root.iconClicked() - } - - Slider { - id: slider - Layout.fillWidth: true - from: root.from - to: root.to - value: root.value - - onMoved: root.moved(value) - - background: Rectangle { - x: slider.leftPadding - y: slider.topPadding + slider.availableHeight / 2 - height / 2 - width: slider.availableWidth - height: 4 - radius: 2 - color: Settings.colors.backgroundLightest - - Rectangle { - width: slider.visualPosition * parent.width - height: parent.height - radius: 2 - color: root.accentColor - } - } - - handle: Rectangle { - x: slider.leftPadding + slider.visualPosition * (slider.availableWidth - width) - y: slider.topPadding + slider.availableHeight / 2 - height / 2 - width: 14 - height: 14 - radius: 7 - color: slider.pressed ? root.accentColor : Settings.colors.foreground - } - } - - Text { - visible: root.showPercentage - text: Math.round((slider.value - root.from) / (root.to - root.from) * 100) + "%" - color: Settings.colors.foreground - opacity: 0.7 - font.pixelSize: 12 - Layout.preferredWidth: 36 - } -} diff --git a/home/isabel/gui/quickshell/components/SysTray.qml b/home/isabel/gui/quickshell/components/SysTray.qml deleted file mode 100644 index a7a152b8..00000000 --- a/home/isabel/gui/quickshell/components/SysTray.qml +++ /dev/null @@ -1,20 +0,0 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Controls -import Quickshell -import Quickshell.Services.SystemTray -import "root:/data" -import "root:/components" - -ColumnLayout { - id: root - - Layout.alignment: Qt.AlignCenter - spacing: 6 - - Repeater { - model: SystemTray.items - - delegate: SystrayItem {} - } -} diff --git a/home/isabel/gui/quickshell/components/SystrayItem.qml b/home/isabel/gui/quickshell/components/SystrayItem.qml deleted file mode 100644 index 867ffcaf..00000000 --- a/home/isabel/gui/quickshell/components/SystrayItem.qml +++ /dev/null @@ -1,238 +0,0 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Controls -import Quickshell -import Quickshell.Widgets -import Quickshell.Services.SystemTray -import "root:/data" - -Item { - id: trayItem - required property SystemTrayItem modelData - - Layout.alignment: Qt.AlignHCenter - implicitWidth: 24 - implicitHeight: 24 - - IconImage { - source: Utils.getIcon(modelData.icon) - implicitSize: 18 - anchors.centerIn: parent - mipmap: true - } - - MouseArea { - anchors.fill: parent - hoverEnabled: true - cursorShape: Qt.PointingHandCursor - acceptedButtons: Qt.LeftButton | Qt.RightButton - onClicked: (mouse) => { - if (mouse.button === Qt.RightButton || modelData.onlyMenu) { - popupLoader.item.visible = !popupLoader.item.visible; - } else { - modelData.activate(); - } - } - } - - ToolTip { - visible: trayMouseArea.containsMouse && modelData.tooltipTitle !== "" - text: modelData.tooltipTitle - delay: 500 - } - - MouseArea { - id: trayMouseArea - anchors.fill: parent - hoverEnabled: true - acceptedButtons: Qt.NoButton - } - - QsMenuOpener { - id: menu - menu: modelData.menu - } - - LazyLoader { - id: popupLoader - loading: true - - PopupWindow { - id: popup - anchor.window: trayItem.QsWindow.window - anchor.rect.x: (trayItem.QsWindow.window?.width ?? 0) * 1.15 - anchor.rect.y: (trayItem.QsWindow.window?.height ?? 0) / 1.25 - visible: false - color: "transparent" - - implicitWidth: 220 - implicitHeight: menuColumn.implicitHeight + 16 - - Rectangle { - anchors.fill: parent - color: Settings.colors.background - radius: 10 - - // Shadow effect - layer.enabled: true - layer.effect: null - } - - ColumnLayout { - id: menuColumn - anchors { - fill: parent - margins: 8 - } - spacing: 2 - - // Header with app name - Text { - text: modelData.title || modelData.id - color: Settings.colors.foreground - font { - pixelSize: 12 - weight: Font.Bold - } - opacity: 0.7 - Layout.fillWidth: true - Layout.leftMargin: 8 - Layout.bottomMargin: 4 - elide: Text.ElideRight - visible: text !== "" - } - - Rectangle { - Layout.fillWidth: true - Layout.preferredHeight: 1 - Layout.leftMargin: 4 - Layout.rightMargin: 4 - Layout.bottomMargin: 4 - color: Settings.colors.foreground - opacity: 0.1 - visible: (modelData.title || modelData.id) !== "" - } - - Repeater { - model: menu.children - - delegate: Loader { - id: menuItemLoader - required property var modelData - - Layout.fillWidth: true - sourceComponent: modelData.isSeparator ? separatorComponent : menuItemComponent - - Component { - id: separatorComponent - - Rectangle { - height: 9 - color: "transparent" - - Rectangle { - anchors.centerIn: parent - width: parent.width - 16 - height: 1 - color: Settings.colors.foreground - opacity: 0.1 - } - } - } - - Component { - id: menuItemComponent - - Rectangle { - id: menuItemRect - height: 32 - radius: 6 - color: menuMouse.containsMouse && menuItemLoader.modelData.enabled - ? Settings.colors.backgroundLighter - : "transparent" - opacity: menuItemLoader.modelData.enabled ? 1.0 : 0.5 - - RowLayout { - anchors { - fill: parent - leftMargin: 10 - rightMargin: 10 - } - spacing: 8 - - // Checkbox/Radio indicator - Rectangle { - visible: menuItemLoader.modelData.buttonType !== 0 // QsMenuButtonType.None - Layout.preferredWidth: 16 - Layout.preferredHeight: 16 - radius: menuItemLoader.modelData.buttonType === 2 ? 8 : 3 // RadioButton = 2 - color: "transparent" - border.width: 1.5 - border.color: menuItemLoader.modelData.checkState !== Qt.Unchecked - ? Settings.colors.accent - : Settings.colors.foreground - opacity: menuItemLoader.modelData.checkState !== Qt.Unchecked ? 1.0 : 0.5 - - Rectangle { - anchors.centerIn: parent - width: 8 - height: 8 - radius: menuItemLoader.modelData.buttonType === 2 ? 4 : 2 - color: Settings.colors.accent - visible: menuItemLoader.modelData.checkState !== Qt.Unchecked - } - } - - // Icon - Image { - visible: menuItemLoader.modelData.icon !== "" && menuItemLoader.modelData.buttonType === 0 - source: menuItemLoader.modelData.icon - Layout.preferredWidth: 16 - Layout.preferredHeight: 16 - sourceSize.width: 16 - sourceSize.height: 16 - smooth: true - } - - // Text - Text { - text: menuItemLoader.modelData.text - color: Settings.colors.foreground - font.pixelSize: 13 - elide: Text.ElideRight - Layout.fillWidth: true - } - - // Submenu indicator - MyIcon { - visible: menuItemLoader.modelData.hasChildren - icon: "go-next-symbolic" - size: 12 - opacity: 0.6 - } - } - - MouseArea { - id: menuMouse - anchors.fill: parent - hoverEnabled: true - cursorShape: menuItemLoader.modelData.enabled ? Qt.PointingHandCursor : Qt.ArrowCursor - onClicked: { - if (!menuItemLoader.modelData.enabled) return; - - if (menuItemLoader.modelData.hasChildren) { - // TODO: Handle submenu - } else { - menuItemLoader.modelData.triggered(); - popup.visible = false; - } - } - } - } - } - } - } - } - } - } -} diff --git a/home/isabel/gui/quickshell/components/Volume.qml b/home/isabel/gui/quickshell/components/Volume.qml deleted file mode 100644 index 2a465c2c..00000000 --- a/home/isabel/gui/quickshell/components/Volume.qml +++ /dev/null @@ -1,18 +0,0 @@ -import QtQuick -import QtQuick.Layouts -import "root:/data" -import "root:/services" - -Item { - id: root - - Layout.alignment: Qt.AlignCenter - implicitWidth: 20 - implicitHeight: 20 - - MyIcon { - anchors.centerIn: parent - icon: Pipewire.sinkIcon - size: 18 - } -} diff --git a/home/isabel/gui/quickshell/components/Workspaces.qml b/home/isabel/gui/quickshell/components/Workspaces.qml deleted file mode 100644 index 445bae43..00000000 --- a/home/isabel/gui/quickshell/components/Workspaces.qml +++ /dev/null @@ -1,68 +0,0 @@ -import QtQuick -import Quickshell -import Quickshell.Io -import QtQuick.Layouts -import Quickshell.Hyprland -import "root:/data" - -Item { - id: root - - Layout.alignment: Qt.AlignCenter - implicitWidth: 24 - implicitHeight: workspaceColumn.implicitHeight - - ColumnLayout { - id: workspaceColumn - anchors.horizontalCenter: parent.horizontalCenter - spacing: 4 - - Repeater { - model: Hyprland.workspaces - - delegate: Item { - id: workspaceItem - required property HyprlandWorkspace modelData - - Layout.alignment: Qt.AlignHCenter - implicitWidth: 24 - implicitHeight: 24 - - Rectangle { - anchors.centerIn: parent - width: 22 - height: 22 - radius: 6 - color: "transparent" - - Text { - anchors.centerIn: parent - text: workspaceItem.modelData.id - color: workspaceItem.modelData.focused - ? Settings.colors.accent - : Settings.colors.foreground - font { - pixelSize: 14 - weight: Font.Medium - } - opacity: workspaceItem.modelData.focused ? 1.0 : 0.6 - - Behavior on color { - ColorAnimation { duration: 150 } - } - Behavior on opacity { - NumberAnimation { duration: 150 } - } - } - } - - MouseArea { - anchors.fill: parent - hoverEnabled: true - cursorShape: Qt.PointingHandCursor - onClicked: workspaceItem.modelData.activate() - } - } - } - } -} diff --git a/home/isabel/gui/quickshell/data/Runtime.qml b/home/isabel/gui/quickshell/data/Runtime.qml deleted file mode 100644 index c2b6572c..00000000 --- a/home/isabel/gui/quickshell/data/Runtime.qml +++ /dev/null @@ -1,13 +0,0 @@ -pragma Singleton - -import QtQuick -import Quickshell - -Singleton { - id: root - - function toggleQuickSettings() { - quickSettingsOpen = !quickSettingsOpen; - } - property bool quickSettingsOpen: false -} diff --git a/home/isabel/gui/quickshell/data/Settings.qml b/home/isabel/gui/quickshell/data/Settings.qml deleted file mode 100644 index a0fdf839..00000000 --- a/home/isabel/gui/quickshell/data/Settings.qml +++ /dev/null @@ -1,34 +0,0 @@ -pragma Singleton - -import QtQuick -import Quickshell - -Singleton { - id: root - - property Colors colors: Colors {} - - component Colors: QtObject { - property color backgroundLightest: "#313244" - property color backgroundLighter: "#000000" - property color background: "#010101" - property color backgroundDarker: "#020202" - property color foreground: "#cdd6f4" - property color accent: "#89b4fa" - property color error: "#f38ba8" - property color warning: "#fab387" - property color success: "#a6e3a1" - property color info: "#94e2d5" - property color border: "#45475a" - } - - property string username: "isabel" - property string profilePicture: "/home/isabel/media/pictures/pfps/_current" - property string wallpaper: "/home/isabel/media/pictures/wallpapers/rn.jpg"; - property int rounding: 14 - - // Notification settings - property list notificationBlacklist: [ - "Spotify" - ] -} diff --git a/home/isabel/gui/quickshell/data/Time.qml b/home/isabel/gui/quickshell/data/Time.qml deleted file mode 100644 index e94133a1..00000000 --- a/home/isabel/gui/quickshell/data/Time.qml +++ /dev/null @@ -1,16 +0,0 @@ -pragma Singleton - -import Quickshell -import QtQuick - -Singleton { - id: root - readonly property string time: { - Qt.formatTime(clock.date, "hh\nmmAP").slice(0, -2) - } - - SystemClock { - id: clock - precision: SystemClock.Minutes - } -} diff --git a/home/isabel/gui/quickshell/data/Utils.qml b/home/isabel/gui/quickshell/data/Utils.qml deleted file mode 100644 index 24cbcca8..00000000 --- a/home/isabel/gui/quickshell/data/Utils.qml +++ /dev/null @@ -1,19 +0,0 @@ -pragma Singleton - -import QtQuick -import Quickshell - -Singleton { - id: root - - // modified from - // - function getIcon(icon: string): string { - if (icon.includes("?path=")) { - const [name, path] = icon.split("?path="); - icon = Qt.resolvedUrl(`${path}/${name.slice(name.lastIndexOf("/") + 1)}`); - } - - return icon; - } -} diff --git a/home/isabel/gui/quickshell/modules/Bar.qml b/home/isabel/gui/quickshell/modules/Bar.qml deleted file mode 100644 index 5c19b71b..00000000 --- a/home/isabel/gui/quickshell/modules/Bar.qml +++ /dev/null @@ -1,103 +0,0 @@ -import Quickshell -import Quickshell.Io -import QtQuick -import QtQuick.Layouts -import QtQuick.Controls -import "root:/data" -import "root:/components" - -Scope { - id: root - - Variants { - model: Quickshell.screens - - PanelWindow { - property var modelData - screen: modelData - implicitWidth: 48 - color: "transparent" - - anchors { - top: true - left: true - bottom: true - } - - margins { - left: 10 - top: 10 - bottom: 10 - } - - Rectangle { - id: bar - anchors.fill: parent - radius: Settings.rounding - color: Settings.colors.background - border.color: Settings.colors.border - border.width: 1 - - // Top section - Launcher & Workspaces - ColumnLayout { - anchors { - horizontalCenter: parent.horizontalCenter - top: parent.top - topMargin: 12 - } - spacing: 16 - - Launcher {} - - BarDivider {} - - Workspaces {} - } - - // Center section - Clock - ColumnLayout { - anchors { - horizontalCenter: parent.horizontalCenter - verticalCenter: parent.verticalCenter - } - spacing: 16 - - Clock {} - } - - // Bottom section - System tray, Notis, Volume, Network - Item { - anchors { - horizontalCenter: parent.horizontalCenter - bottom: parent.bottom - bottomMargin: 12 - } - implicitWidth: bottomColumn.implicitWidth - implicitHeight: bottomColumn.implicitHeight - - MouseArea { - anchors.fill: parent - hoverEnabled: true - cursorShape: Qt.PointingHandCursor - onClicked: Runtime.toggleQuickSettings() - } - - ColumnLayout { - id: bottomColumn - anchors.fill: parent - spacing: 12 - - SysTray {} - - BarDivider {} - - Noti { } - Volume {} - Network {} - Battery {} - } - } - } - } - } -} diff --git a/home/isabel/gui/quickshell/modules/Desktop.qml b/home/isabel/gui/quickshell/modules/Desktop.qml deleted file mode 100644 index acbe5772..00000000 --- a/home/isabel/gui/quickshell/modules/Desktop.qml +++ /dev/null @@ -1,39 +0,0 @@ -import "root:/components" -import "root:/data" -import Quickshell -import Quickshell.Wayland -import QtQuick - -Variants { - model: Quickshell.screens - - PanelWindow { - id: backgroundPanel - property var modelData - screen: modelData - - WlrLayershell.exclusionMode: ExclusionMode.Ignore - WlrLayershell.layer: WlrLayer.Background - - anchors { - top: true - bottom: true - left: true - right: true - } - - Image { - id: backgroundImage - - anchors.fill: parent - fillMode: Image.PreserveAspectCrop - source: Settings.wallpaper - - onStatusChanged: { - if (status === Image.Error) { - console.error("Failed to load background image:", source); - } - } - } - } -} diff --git a/home/isabel/gui/quickshell/modules/Osd.qml b/home/isabel/gui/quickshell/modules/Osd.qml deleted file mode 100644 index a124a4bf..00000000 --- a/home/isabel/gui/quickshell/modules/Osd.qml +++ /dev/null @@ -1,252 +0,0 @@ -import QtQuick -import QtQuick.Layouts -import Quickshell -import Quickshell.Widgets -import Quickshell.Wayland -import Quickshell.Services.Notifications as QsNotifications -import "root:/data" -import "root:/components" -import "root:/services" - -Scope { - id: root - - // OSD State - property string osdType: "" - property real progress: 0 - property string iconSource: "" - property string osdText: "" - property bool osdVisible: false - - // Notification State - property var currentNotification: null - property bool notificationVisible: false - - // Connect to Pipewire service for volume changes - Connections { - target: Pipewire - function onSinkVolumeChanged() { showVolumeOsd(); } - function onSinkMutedChanged() { showVolumeOsd(); } - } - - function showVolumeOsd(): void { - root.osdType = "volume"; - root.progress = Pipewire.sinkVolume; - root.iconSource = Pipewire.sinkIcon; - root.osdText = Pipewire.sinkVolumeText; - root.osdVisible = true; - osdHideTimer.restart(); - } - - function showNotification(notification: QsNotifications.Notification): void { - root.currentNotification = notification; - root.notificationVisible = true; - notificationHideTimer.restart(); - } - - Timer { - id: osdHideTimer - interval: 1500 - onTriggered: root.osdVisible = false - } - - Timer { - id: notificationHideTimer - interval: 4000 - onTriggered: root.notificationVisible = false - } - - // Connect to the shared notification service - Connections { - target: Notifications - function onNewNotification(notification) { - root.showNotification(notification); - } - } - - - PanelWindow { - id: osdWindow - property var modelData - screen: modelData - - visible: root.osdVisible - color: "transparent" - - WlrLayershell.namespace: "osd" - WlrLayershell.layer: WlrLayer.Overlay - exclusionMode: ExclusionMode.Ignore - - anchors { - bottom: true - } - - implicitWidth: 320 - implicitHeight: 80 - - margins { - bottom: 80 - } - - Rectangle { - id: osdContainer - anchors.centerIn: parent - width: 300 - height: 56 - radius: 14 - color: Settings.colors.background - - RowLayout { - anchors { - fill: parent - leftMargin: 18 - rightMargin: 18 - } - spacing: 14 - - MyIcon { - icon: root.iconSource - size: 22 - Layout.alignment: Qt.AlignVCenter - } - - Rectangle { - Layout.fillWidth: true - Layout.preferredHeight: 6 - Layout.alignment: Qt.AlignVCenter - radius: 3 - color: Settings.colors.backgroundLighter - - Rectangle { - width: parent.width * Math.min(root.progress, 1.0) - height: parent.height - radius: 3 - color: root.muted ? Settings.colors.error : Settings.colors.accent - - Behavior on width { - SmoothedAnimation { velocity: 600 } - } - } - } - - Text { - text: root.osdText - color: Settings.colors.foreground - font { - pixelSize: 13 - weight: Font.Medium - } - Layout.preferredWidth: 40 - Layout.alignment: Qt.AlignVCenter - horizontalAlignment: Text.AlignRight - } - } - } - } - - // Notification Popup - PanelWindow { - id: notificationWindow - property var modelData - screen: modelData - - visible: root.notificationVisible && root.currentNotification !== null - color: "transparent" - - WlrLayershell.namespace: "notification" - WlrLayershell.layer: WlrLayer.Overlay - exclusionMode: ExclusionMode.Ignore - - anchors { - top: true - } - - implicitWidth: 420 - implicitHeight: 100 - - margins { - top: 16 - } - - Rectangle { - id: notificationContainer - anchors { - fill: parent - margins: 8 - } - radius: 12 - color: Settings.colors.background - - RowLayout { - anchors { - fill: parent - margins: 14 - } - spacing: 12 - - IconImage { - source: Quickshell.iconPath(root.currentNotification?.appIcon ? Utils.getIcon(root.currentNotification.appIcon) : "application-x-executable") - implicitSize: 40 - Layout.alignment: Qt.AlignTop - } - - ColumnLayout { - Layout.fillWidth: true - Layout.fillHeight: true - spacing: 4 - - Text { - text: root.currentNotification?.appName ?? "" - color: Settings.colors.foreground - font { - pixelSize: 13 - weight: Font.Bold - } - elide: Text.ElideRight - Layout.fillWidth: true - } - - Text { - text: root.currentNotification?.summary ?? "" - color: Settings.colors.foreground - font { - pixelSize: 12 - weight: Font.Medium - } - elide: Text.ElideRight - Layout.fillWidth: true - visible: text !== "" - } - - Text { - text: root.currentNotification?.body ?? "" - color: Settings.colors.foreground - opacity: 0.8 - font.pixelSize: 11 - elide: Text.ElideRight - wrapMode: Text.WordWrap - maximumLineCount: 2 - Layout.fillWidth: true - } - } - - IconButton { - icon: "window-close-symbolic" - size: 14 - Layout.alignment: Qt.AlignTop - onClicked: { - root.currentNotification?.dismiss(); - root.notificationVisible = false; - } - } - } - - // Click to dismiss - MouseArea { - anchors.fill: parent - z: -1 - onClicked: root.notificationVisible = false - } - } - } -} diff --git a/home/isabel/gui/quickshell/modules/QuickSettingsPopup.qml b/home/isabel/gui/quickshell/modules/QuickSettingsPopup.qml deleted file mode 100644 index 7b760d2d..00000000 --- a/home/isabel/gui/quickshell/modules/QuickSettingsPopup.qml +++ /dev/null @@ -1,173 +0,0 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Controls -import Quickshell -import Quickshell.Widgets -import Quickshell.Wayland -import Quickshell.Io -import Quickshell.Services.Notifications as QsNotifications -import "root:/data" -import "root:/components" -import "root:/services" - -LazyLoader { - id: loader - active: Runtime.quickSettingsOpen - - PanelWindow { - id: popup - color: "transparent" - - anchors.left: true - margins.left: 70 - - implicitWidth: screen.width * 0.21 - implicitHeight: screen.height * 0.98 - exclusionMode: ExclusionMode.Ignore - WlrLayershell.layer: WlrLayer.Overlay - - Rectangle { - anchors.fill: parent - radius: Settings.rounding - color: Settings.colors.background - border.color: Settings.colors.border - border.width: 1 - - ColumnLayout { - spacing: 12 - anchors { - fill: parent - margins: 16 - } - - // Header - RowLayout { - Layout.fillWidth: true - spacing: 8 - - Text { - text: "Notifications" - color: Settings.colors.foreground - font { - pixelSize: 18 - weight: Font.Bold - } - } - - Item { Layout.fillWidth: true } - - IconButton { - icon: "edit-clear-all-symbolic" - size: 16 - onClicked: { - for (const n of Notifications.list) { - n.dismiss(); - } - popup.visible = false; - } - } - } - - // Notifications List - ListView { - id: notiList - model: Notifications.list - Layout.fillWidth: true - Layout.fillHeight: true - spacing: 8 - clip: true - - ScrollBar.vertical: ScrollBar { - policy: ScrollBar.AsNeeded - } - - delegate: Rectangle { - required property QsNotifications.Notification modelData - width: ListView.view.width - height: 72 - radius: 8 - color: Settings.colors.backgroundLighter - border.color: Settings.colors.border - border.width: 1 - - RowLayout { - anchors { - fill: parent - margins: 10 - } - spacing: 10 - - IconImage { - source: Quickshell.iconPath(modelData?.appIcon ? Utils.getIcon(modelData.appIcon) : "application-x-executable") - - implicitSize: 40 - Layout.alignment: Qt.AlignVCenter - } - - ColumnLayout { - Layout.fillWidth: true - Layout.fillHeight: true - spacing: 2 - - Text { - text: modelData.appName - color: Settings.colors.foreground - font { - pixelSize: 13 - weight: Font.Medium - } - elide: Text.ElideRight - Layout.fillWidth: true - } - - Text { - text: modelData.body - color: Settings.colors.foreground - opacity: 0.8 - font.pixelSize: 12 - elide: Text.ElideRight - maximumLineCount: 2 - wrapMode: Text.WordWrap - Layout.fillWidth: true - } - } - - IconButton { - icon: "window-close-symbolic" - size: 14 - Layout.alignment: Qt.AlignTop - onClicked: { - modelData.dismiss(); - if (Notifications.list.length <= 0) { - popup.visible = false; - } - } - } - } - } - } - - // Separator before Media - Rectangle { - Layout.fillWidth: true - Layout.preferredHeight: 1 - color: Settings.colors.backgroundLightest - visible: Media.players.length > 0 - } - - // Media Players Section - MediaPlayers {} - - // Separator - Rectangle { - Layout.fillWidth: true - Layout.preferredHeight: 1 - color: Settings.colors.backgroundLightest - } - - // Quick Settings Section - QuickSettings {} - } - } - } -} diff --git a/home/isabel/gui/quickshell/services/Bluetooth.qml b/home/isabel/gui/quickshell/services/Bluetooth.qml deleted file mode 100644 index 8377a8b2..00000000 --- a/home/isabel/gui/quickshell/services/Bluetooth.qml +++ /dev/null @@ -1,71 +0,0 @@ -pragma Singleton - -import Quickshell -import Quickshell.Bluetooth -import QtQuick - -Singleton { - id: root - - // Adapter state - readonly property BluetoothAdapter adapter: Bluetooth.defaultAdapter - readonly property bool powered: adapter?.enabled ?? false - readonly property int state: adapter?.state ?? BluetoothAdapterState.Disabled - - // Device state - readonly property var devices: adapter?.devices ?? [] - readonly property BluetoothDevice connectedDevice: { - if (!adapter) return null; - for (let i = 0; i < devices.count; i++) { - const device = devices.values[i]; - if (device.connected) return device; - } - return null; - } - readonly property bool connected: connectedDevice !== null - - // Icon based on state - readonly property string icon: { - if (state === BluetoothAdapterState.Blocked) return "bluetooth-disabled-symbolic"; - if (!powered) return "bluetooth-disabled-symbolic"; - if (connected) return "bluetooth-active-symbolic"; - return "bluetooth-symbolic"; - } - - readonly property string statusText: { - if (state === BluetoothAdapterState.Blocked) return "Blocked"; - if (state === BluetoothAdapterState.Enabling) return "Enabling..."; - if (state === BluetoothAdapterState.Disabling) return "Disabling..."; - if (!powered) return "Bluetooth Off"; - if (connected) return connectedDevice.name; - return "Not Connected"; - } - - reloadableId: "bluetooth" - - function toggle() { - if (adapter) { - adapter.enabled = !adapter.enabled; - } - } - - function connectDevice(device) { - device.connect(); - } - - function disconnectDevice(device) { - device.disconnect(); - } - - function startDiscovery() { - if (adapter) { - adapter.discovering = true; - } - } - - function stopDiscovery() { - if (adapter) { - adapter.discovering = false; - } - } -} diff --git a/home/isabel/gui/quickshell/services/Brightness.qml b/home/isabel/gui/quickshell/services/Brightness.qml deleted file mode 100644 index 7d607d8e..00000000 --- a/home/isabel/gui/quickshell/services/Brightness.qml +++ /dev/null @@ -1,60 +0,0 @@ -pragma Singleton - -import Quickshell -import Quickshell.Io -import QtQuick - -Singleton { - id: root - - // Brightness state - property real brightness: 1.0 - property bool available: false - - // Icon based on brightness level - readonly property string icon: { - if (brightness > 0.66) return "display-brightness-high-symbolic"; - if (brightness > 0.33) return "display-brightness-medium-symbolic"; - return "display-brightness-low-symbolic"; - } - - // Brightness percentage string - readonly property string brightnessText: Math.round(brightness * 100) + "%" - - function setBrightness(value: real): void { - const clampedValue = Math.max(0.05, Math.min(1, value)); - brightness = clampedValue; - setBrightnessProc.command = ["brightnessctl", "set", Math.round(clampedValue * 100) + "%"]; - setBrightnessProc.running = true; - } - - function increaseBrightness(step = 0.05): void { - setBrightness(brightness + step); - } - - function decreaseBrightness(step = 0.05): void { - setBrightness(brightness - step); - } - - Component.onCompleted: getBrightnessProc.running = true - - Process { - id: getBrightnessProc - command: ["bash", "-c", "brightnessctl -m 2>/dev/null | cut -d, -f4 | tr -d '%'"] - stdout: SplitParser { - onRead: data => { - const val = parseInt(data.trim()); - if (!isNaN(val)) { - root.brightness = val / 100; - root.available = true; - } - } - } - } - - Process { - id: setBrightnessProc - } - - reloadableId: "brightness" -} diff --git a/home/isabel/gui/quickshell/services/Media.qml b/home/isabel/gui/quickshell/services/Media.qml deleted file mode 100644 index bb6af237..00000000 --- a/home/isabel/gui/quickshell/services/Media.qml +++ /dev/null @@ -1,11 +0,0 @@ -pragma Singleton - -import Quickshell -import Quickshell.Services.Mpris - -Singleton { - id: root - - property MprisPlayer selectedPlayer: players[0] - property list players: Mpris.players.values.filter(player => player.length != 0 && player?.trackTitle != "") -} diff --git a/home/isabel/gui/quickshell/services/Networking.qml b/home/isabel/gui/quickshell/services/Networking.qml deleted file mode 100644 index 0292564e..00000000 --- a/home/isabel/gui/quickshell/services/Networking.qml +++ /dev/null @@ -1,189 +0,0 @@ -// Network service with WiFi and Ethernet support - -pragma Singleton - -import Quickshell -import Quickshell.Io -import QtQuick - -Singleton { - id: root - - // WiFi - readonly property list networks: [] - readonly property AccessPoint activeWifi: networks.find(n => n.active) ?? null - readonly property bool wifiEnabled: internal.wifiEnabled - - // Ethernet - readonly property bool ethernetConnected: internal.ethernetConnected - readonly property string ethernetDevice: internal.ethernetDevice - - // Combined state - readonly property bool connected: ethernetConnected || activeWifi !== null - readonly property string connectionType: ethernetConnected ? "ethernet" : (activeWifi ? "wifi" : "none") - - readonly property string icon: { - if (ethernetConnected) return "network-wired-symbolic"; - if (activeWifi) return activeWifi.icon; - if (!wifiEnabled) return "network-wireless-disabled-symbolic"; - return "network-wireless-offline-symbolic"; - } - - readonly property string statusText: { - if (ethernetConnected) return ethernetDevice; - if (activeWifi) return activeWifi.ssid; - return "Disconnected"; - } - - reloadableId: "network" - - function toggleWifi() { - toggleWifiProc.running = true; - } - - function reload() { - checkStatus.running = true; - } - - function connectToNetwork(ssid) { - connectProc.command = ["nmcli", "d", "wifi", "connect", ssid]; - connectProc.running = true; - } - - QtObject { - id: internal - property bool wifiEnabled: true - property bool ethernetConnected: false - property string ethernetDevice: "" - } - - // Monitor for network changes - Process { - running: true - command: ["nmcli", "m"] - stdout: SplitParser { - onRead: checkStatus.running = true - } - } - - // Check overall network status - Process { - id: checkStatus - running: true - command: ["bash", "-c", ` - # Check WiFi status - wifi_status=$(nmcli radio wifi 2>/dev/null) - echo "WIFI:$wifi_status" - - # Check Ethernet - eth_info=$(nmcli -t -f TYPE,STATE,DEVICE,CONNECTION device 2>/dev/null | grep '^ethernet:connected' | head -1) - if [ -n "$eth_info" ]; then - eth_name=$(echo "$eth_info" | cut -d: -f4) - echo "ETH:connected:$eth_name" - else - echo "ETH:disconnected:" - fi - `] - environment: ({ LANG: "C", LC_ALL: "C" }) - stdout: SplitParser { - onRead: data => { - const line = data.trim(); - if (line.startsWith("WIFI:")) { - internal.wifiEnabled = line.includes("enabled"); - } else if (line.startsWith("ETH:")) { - const parts = line.split(":"); - internal.ethernetConnected = parts[1] === "connected"; - internal.ethernetDevice = parts[2] || ""; - } - } - } - onExited: { - if (internal.wifiEnabled) { - getNetworks.running = true; - } - } - } - - Process { - id: toggleWifiProc - command: ["nmcli", "radio", "wifi", internal.wifiEnabled ? "off" : "on"] - onExited: checkStatus.running = true - } - - Process { - id: connectProc - onExited: checkStatus.running = true - } - - Process { - id: getNetworks - command: ["nmcli", "-g", "ACTIVE,SIGNAL,FREQ,SSID,BSSID", "d", "w"] - environment: ({ LANG: "C", LC_ALL: "C" }) - stdout: StdioCollector { - onStreamFinished: { - const PLACEHOLDER = "STRINGWHICHHOPEFULLYWONTBEUSED"; - const rep = new RegExp("\\\\:", "g"); - const rep2 = new RegExp(PLACEHOLDER, "g"); - - const networks = text.trim().split("\n").filter(l => l.length > 0).map(n => { - const net = n.replace(rep, PLACEHOLDER).split(":"); - return { - active: net[0] === "yes", - strength: parseInt(net[1]) || 0, - frequency: parseInt(net[2]) || 0, - ssid: net[3] || "", - bssid: net[4]?.replace(rep2, ":") ?? "" - }; - }).filter(n => n.ssid !== ""); - - const rNetworks = root.networks; - - // Remove networks that no longer exist - const destroyed = rNetworks.filter(rn => !networks.find(n => - n.frequency === rn.frequency && n.ssid === rn.ssid && n.bssid === rn.bssid - )); - for (const network of destroyed) { - const idx = rNetworks.indexOf(network); - if (idx >= 0) { - rNetworks.splice(idx, 1); - network.destroy(); - } - } - - // Update or add networks - for (const network of networks) { - const match = rNetworks.find(n => - n.frequency === network.frequency && n.ssid === network.ssid && n.bssid === network.bssid - ); - if (match) { - match.lastIpcObject = network; - } else { - rNetworks.push(apComp.createObject(root, { lastIpcObject: network })); - } - } - } - } - } - - component AccessPoint: QtObject { - required property var lastIpcObject - readonly property string ssid: lastIpcObject.ssid - readonly property string bssid: lastIpcObject.bssid - readonly property int strength: lastIpcObject.strength - readonly property int frequency: lastIpcObject.frequency - readonly property bool active: lastIpcObject.active - readonly property string icon: { - if (strength >= 75) return "network-wireless-signal-excellent-symbolic"; - if (strength >= 50) return "network-wireless-signal-good-symbolic"; - if (strength >= 25) return "network-wireless-signal-ok-symbolic"; - if (strength > 0) return "network-wireless-signal-weak-symbolic"; - return "network-wireless-signal-none-symbolic"; - } - } - - Component { - id: apComp - AccessPoint {} - } -} - diff --git a/home/isabel/gui/quickshell/services/Notifications.qml b/home/isabel/gui/quickshell/services/Notifications.qml deleted file mode 100644 index a31d5a6b..00000000 --- a/home/isabel/gui/quickshell/services/Notifications.qml +++ /dev/null @@ -1,41 +0,0 @@ -pragma Singleton - -import Quickshell -import Quickshell.Io -import Quickshell.Services.Notifications -import "root:/data" - -Singleton { - id: root - - property bool dndEnabled: false - property list list: notifactionServer.trackedNotifications.values.filter( - notification => notification.tracked && !root.dndEnabled && !Settings.notificationBlacklist.includes(notification.appName) - ) - - signal newNotification(Notification notification) - - NotificationServer { - id: notifactionServer - onNotification: (notification) => { - notification.tracked = true - // Only emit signal if not in DND and not blacklisted - if (!root.dndEnabled && !Settings.notificationBlacklist.includes(notification.appName)) { - root.newNotification(notification) - } - } - - actionsSupported: true - } - - IpcHandler { - target: "notifcations" - - function clear(): void { - for (const notification of notifactionServer.trackedNotifications.values) { - notification.tracked = false; - } - } - } -} - diff --git a/home/isabel/gui/quickshell/services/Pipewire.qml b/home/isabel/gui/quickshell/services/Pipewire.qml deleted file mode 100644 index 32524965..00000000 --- a/home/isabel/gui/quickshell/services/Pipewire.qml +++ /dev/null @@ -1,90 +0,0 @@ -pragma Singleton - -import Quickshell -import Quickshell.Services.Pipewire as QsPipewire -import QtQuick - -Singleton { - id: root - - // Track the default audio sink - QsPipewire.PwObjectTracker { - objects: [QsPipewire.Pipewire.defaultAudioSink, QsPipewire.Pipewire.defaultAudioSource] - } - - // Default audio sink (speakers/headphones) - readonly property QsPipewire.PwNode sink: QsPipewire.Pipewire.defaultAudioSink - readonly property real sinkVolume: sink?.audio?.volume ?? 0 - readonly property bool sinkMuted: sink?.audio?.muted ?? false - - // Default audio source (microphone) - readonly property QsPipewire.PwNode source: QsPipewire.Pipewire.defaultAudioSource - readonly property real sourceVolume: source?.audio?.volume ?? 0 - readonly property bool sourceMuted: source?.audio?.muted ?? false - - // All nodes for detailed view - readonly property var nodes: QsPipewire.Pipewire.nodes - - // Icon based on volume and mute state for sink - readonly property string sinkIcon: { - if (sinkMuted) return "audio-volume-muted-symbolic"; - if (sinkVolume > 0.66) return "audio-volume-high-symbolic"; - if (sinkVolume > 0.33) return "audio-volume-medium-symbolic"; - if (sinkVolume > 0) return "audio-volume-low-symbolic"; - return "audio-volume-muted-symbolic"; - } - - // Icon based on volume and mute state for source - readonly property string sourceIcon: { - if (sourceMuted) return "microphone-sensitivity-muted-symbolic"; - if (sourceVolume > 0.66) return "microphone-sensitivity-high-symbolic"; - if (sourceVolume > 0.33) return "microphone-sensitivity-medium-symbolic"; - if (sourceVolume > 0) return "microphone-sensitivity-low-symbolic"; - return "microphone-sensitivity-muted-symbolic"; - } - - // Volume percentage string - readonly property string sinkVolumeText: Math.round(sinkVolume * 100) + "%" - readonly property string sourceVolumeText: Math.round(sourceVolume * 100) + "%" - - // Functions to control sink (speakers) - function setSinkVolume(volume: real): void { - if (sink?.audio) { - sink.audio.volume = Math.max(0, Math.min(1, volume)); - } - } - - function toggleSinkMute(): void { - if (sink?.audio) { - sink.audio.muted = !sink.audio.muted; - } - } - - function setSinkMuted(muted: bool): void { - if (sink?.audio) { - sink.audio.muted = muted; - } - } - - // Functions to control source (microphone) - function setSourceVolume(volume: real): void { - if (source?.audio) { - source.audio.volume = Math.max(0, Math.min(1, volume)); - } - } - - function toggleSourceMute(): void { - if (source?.audio) { - source.audio.muted = !source.audio.muted; - } - } - - function setSourceMuted(muted: bool): void { - if (source?.audio) { - source.audio.muted = muted; - } - } - - reloadableId: "pipewire" -} - diff --git a/home/isabel/gui/quickshell/services/UPower.qml b/home/isabel/gui/quickshell/services/UPower.qml deleted file mode 100644 index 87245339..00000000 --- a/home/isabel/gui/quickshell/services/UPower.qml +++ /dev/null @@ -1,79 +0,0 @@ -pragma Singleton - -import Quickshell -import Quickshell.Services.UPower as QsUPower -import QtQuick - -Singleton { - id: root - - // Display device represents the overall system battery - readonly property QsUPower.UPowerDevice displayDevice: QsUPower.UPower.displayDevice - - // Battery state - readonly property bool isPresent: displayDevice?.isPresent ?? false - readonly property real percentage: displayDevice?.percentage ?? 0 - readonly property int state: displayDevice?.state ?? QsUPower.UPowerDeviceState.Unknown - readonly property bool charging: state === QsUPower.UPowerDeviceState.Charging - readonly property bool discharging: state === QsUPower.UPowerDeviceState.Discharging - readonly property bool fullyCharged: state === QsUPower.UPowerDeviceState.FullyCharged - - // Time estimates (in seconds) - readonly property real timeToEmpty: displayDevice?.timeToEmpty ?? 0 - readonly property real timeToFull: displayDevice?.timeToFull ?? 0 - - // Energy info - readonly property real energy: displayDevice?.energy ?? 0 - readonly property real energyFull: displayDevice?.energyFull ?? 0 - readonly property real energyRate: displayDevice?.energyRate ?? 0 - - // Icon based on percentage and charging state - readonly property string icon: { - if (!isPresent) return "battery-missing-symbolic"; - - const level = percentage; - let iconName = "battery"; - - if (level >= 90) iconName = "battery-full"; - else if (level >= 60) iconName = "battery-good"; - else if (level >= 30) iconName = "battery-medium"; - else if (level >= 10) iconName = "battery-low"; - else iconName = "battery-empty"; - - if (charging) iconName += "-charging"; - - return iconName + "-symbolic"; - } - - // Status text - readonly property string statusText: { - if (!isPresent) return "No Battery"; - if (fullyCharged) return "Fully Charged"; - if (charging) { - const time = formatTime(timeToFull); - return time ? `Charging (${time})` : "Charging"; - } - if (discharging) { - const time = formatTime(timeToEmpty); - return time ? `${time} remaining` : "Discharging"; - } - return `${Math.round(percentage)}%`; - } - - // Format time in seconds to human-readable string - function formatTime(seconds: real): string { - if (seconds <= 0) return ""; - const hours = Math.floor(seconds / 3600); - const minutes = Math.floor((seconds % 3600) / 60); - if (hours > 0) { - return `${hours}h ${minutes}m`; - } - return `${minutes}m`; - } - - // All power devices (for detailed view) - readonly property var devices: QsUPower.UPower.devices - - reloadableId: "upower" -} - diff --git a/home/isabel/gui/quickshell/shell.qml b/home/isabel/gui/quickshell/shell.qml deleted file mode 100644 index 1dcea931..00000000 --- a/home/isabel/gui/quickshell/shell.qml +++ /dev/null @@ -1,12 +0,0 @@ -//@ pragma IconTheme Adwaita - -import Quickshell -import "root:/modules" -import "root:/services" - -Scope { - Bar {} - Desktop {} - Osd {} - QuickSettingsPopup {} -} diff --git a/home/isabel/gui/vicinae/default.nix b/home/isabel/gui/vicinae/default.nix deleted file mode 100644 index 298e33ab..00000000 --- a/home/isabel/gui/vicinae/default.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ pkgs, config, ... }: -let - mkMyVicinaeExt = pkgs.callPackage ./extension.nix { }; -in -{ - programs.vicinae = { - enable = config.garden.profiles.graphical.enable && pkgs.stdenv.hostPlatform.isLinux; - systemd.enable = true; - - settings = { - window.opacity = 1; - }; - - # NOTE: I only do it this way because I hate IFD, normal people should use - # `config.lib.vicinae.mkExtension` - extensions = map mkMyVicinaeExt [ - { - extName = "nix"; - npmDepsHash = "sha256-HPWNUznCWVPz39PlPEBR7GpgbC0DuIAvVBdB2GAs47A="; - } - { - extName = "wifi-commander"; - npmDepsHash = "sha256-ufVZm0mpRPAgWRXP+h6yNM7cEfM/tdcc0FUBmZiBvBA="; - } - { - extName = "bluetooth"; - npmDepsHash = "sha256-2F7D7DwNG/GAiE+o7srZhcOZzUiRjEVS9uWZAoD7sjo="; - } - { - extName = "pdsls"; - type = "raycast"; - npmDepsHash = "sha256-vx/n64UZBZt1ntPbCILWhp/NJ56zCp9oUTDgqQB8Ny8="; - } - - # broken - # { - # extName = "mullvad"; - # npmDepsHash = "sha256-WbnZtsTUMDHh2BojAjHUrca8aBw+OGXMMgX79Ek8wQ0="; - # } - ]; - }; -} diff --git a/home/isabel/gui/vicinae/extension.nix b/home/isabel/gui/vicinae/extension.nix deleted file mode 100644 index 7f6d930e..00000000 --- a/home/isabel/gui/vicinae/extension.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ - lib, - buildNpmPackage, - fetchFromGitHub, -}: -lib.extendMkDerivation { - constructDrv = buildNpmPackage; - - extendDrvArgs = - finalAttrs: - { - extName, - version ? "0", - type ? "vicinae", - ... - }@args: - lib.checkListOfEnum "${finalAttrs.pname}: type must be one of vicinae or raycast" - [ "vicinae" "raycast" ] - [ type ] - { - pname = args.pname or "${type}-extension-${extName}"; - inherit version; - - src = - args.src or ( - if type == "vicinae" then - fetchFromGitHub { - owner = "vicinaehq"; - repo = "extensions"; - rev = "ffbb04567d5108a0fb197aedb7642a0aa6ae7aad"; - hash = "sha256-1Q/vrarA1M5rIIOZeSmqpC2e33ncpI7dL8AkNIHgtVo="; - } - else - fetchFromGitHub { - owner = "raycast"; - repo = "extensions"; - rev = "9b5cbcb7204b895e478f58db1485559b7f7d28d8"; - hash = "sha256-ARrEyBSqw0RSSoRZBCLoiN3Bg1OSKC+uPkwfO29KkfA="; - - # littrally grind to a halt if we don't add this - sparseCheckout = [ "/extensions/${extName}" ]; - } - ) - + "/extensions/${extName}"; - - dontNpmInstall = true; - buildPhase = '' - npm run build -- -o=$out - ''; - }; -} diff --git a/home/isabel/gui/wezterm.nix b/home/isabel/gui/wezterm.nix deleted file mode 100644 index c39e8f8a..00000000 --- a/home/isabel/gui/wezterm.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ lib, config, ... }: -{ - config = lib.mkIf config.programs.wezterm.enable { - catppuccin.wezterm.enable = false; - - xdg.configFile."wezterm" = { - source = ./wezterm; - recursive = true; - }; - }; -} diff --git a/home/isabel/gui/wezterm/bar.lua b/home/isabel/gui/wezterm/bar.lua deleted file mode 100644 index bec46ea3..00000000 --- a/home/isabel/gui/wezterm/bar.lua +++ /dev/null @@ -1,360 +0,0 @@ --- https://github.com/nekowinston/wezterm-bar -local wezterm = require("wezterm") - -local M = {} - --- default configuration -local config = { - position = "top", -- or "bottom" - max_width = 32, - dividers = "slant_right", -- "slant_right" or "slant_left", "arrows", "rounded", false - indicator = { - leader = { - enabled = true, - off = " ", - on = " ", - }, - mode = { - enabled = true, - names = { - resize_mode = "RESIZE", - copy_mode = "VISUAL", - search_mode = "SEARCH", - }, - }, - }, - tabs = { - numerals = "arabic", -- or "roman" - pane_count = "superscript", -- or "subscript", false - brackets = { - active = { "", ":" }, - inactive = { "", ":" }, - }, - }, - clock = { - enabled = false, - format = "%I:%M %P", -- https://docs.rs/chrono/latest/chrono/format/strftime/index.html - }, -} - --- parsed config -local C = {} - -local function tableMerge(t1, t2) - for k, v in pairs(t2) do - if type(v) == "table" then - if type(t1[k] or false) == "table" then - tableMerge(t1[k] or {}, t2[k] or {}) - else - t1[k] = v - end - else - t1[k] = v - end - end - return t1 -end - -local dividers = { - slant_right = { - left = utf8.char(0xe0be), - right = utf8.char(0xe0bc), - }, - slant_left = { - left = utf8.char(0xe0bb), - right = utf8.char(0xe0b8), - }, - arrows = { - left = utf8.char(0xe0b2), - right = utf8.char(0xe0b0), - }, - rounded = { - left = utf8.char(0xe0b6), - right = utf8.char(0xe0b4), - }, -} - --- conforming to https://github.com/wez/wezterm/commit/e4ae8a844d8feaa43e1de34c5cc8b4f07ce525dd --- exporting an apply_to_config function, even though we don't change the users config -M.apply_to_config = function(c, opts) - -- make the opts arg optional - if not opts then - opts = {} - end - - -- combine user config with defaults - config = tableMerge(config, opts) - C.div = { - l = "", - r = "", - } - - if config.dividers then - C.div.l = dividers[config.dividers].left - C.div.r = dividers[config.dividers].right - end - - C.leader = { - enabled = config.indicator.leader.enabled and true, - off = config.indicator.leader.off, - on = config.indicator.leader.on, - } - - C.mode = { - enabled = config.indicator.mode.enabled, - names = config.indicator.mode.names, - } - - C.tabs = { - numerals = config.tabs.numerals, - pane_count_style = config.tabs.pane_count, - brackets = { - active = config.tabs.brackets.active, - inactive = config.tabs.brackets.inactive, - }, - } - - C.clock = { - enabled = config.clock.enabled, - format = config.clock.format, - } - - -- set the right-hand padding to 0 spaces, if the rounded style is active - C.p = (config.dividers == "rounded") and "" or " " - - -- set wezterm config options according to the parsed config - c.use_fancy_tab_bar = false - c.tab_bar_at_bottom = config.position == "bottom" - c.tab_max_width = config.max_width -end - --- superscript/subscript -local function numberStyle(number, script) - local scripts = { - superscript = { - "⁰", - "¹", - "²", - "³", - "⁴", - "⁵", - "⁶", - "⁷", - "⁸", - "⁹", - }, - subscript = { - "₀", - "₁", - "₂", - "₃", - "₄", - "₅", - "₆", - "₇", - "₈", - "₉", - }, - } - local numbers = scripts[script] - local number_string = tostring(number) - local result = "" - for i = 1, #number_string do - local char = number_string:sub(i, i) - local num = tonumber(char) - if num then - result = result .. numbers[num + 1] - else - result = result .. char - end - end - return result -end - -local roman_numerals = { - "Ⅰ", - "Ⅱ", - "Ⅲ", - "Ⅳ", - "Ⅴ", - "Ⅵ", - "Ⅶ", - "Ⅷ", - "Ⅸ", - "Ⅹ", - "Ⅺ", - "Ⅻ", -} - --- custom tab bar -wezterm.on("format-tab-title", function(tab, tabs, _panes, conf, _hover, _max_width) - local colours = conf.resolved_palette.tab_bar - - local active_tab_index = 0 - for _, t in ipairs(tabs) do - if t.is_active == true then - active_tab_index = t.tab_index - end - end - - local rainbow = { - conf.resolved_palette.ansi[2], - conf.resolved_palette.indexed[16], - conf.resolved_palette.ansi[4], - conf.resolved_palette.ansi[3], - conf.resolved_palette.ansi[5], - conf.resolved_palette.ansi[6], - } - - local i = tab.tab_index % 6 - local active_bg = rainbow[i + 1] - local active_fg = colours.background - local inactive_bg = colours.inactive_tab.bg_color - local inactive_fg = colours.inactive_tab.fg_color - local new_tab_bg = colours.new_tab.bg_color - - local s_bg, s_fg, e_bg, e_fg - - -- the last tab - if tab.tab_index == #tabs - 1 then - if tab.is_active then - s_bg = active_bg - s_fg = active_fg - e_bg = new_tab_bg - e_fg = active_bg - else - s_bg = inactive_bg - s_fg = inactive_fg - e_bg = new_tab_bg - e_fg = inactive_bg - end - elseif tab.tab_index == active_tab_index - 1 then - s_bg = inactive_bg - s_fg = inactive_fg - e_bg = rainbow[(i + 1) % 6 + 1] - e_fg = inactive_bg - elseif tab.is_active then - s_bg = active_bg - s_fg = active_fg - e_bg = inactive_bg - e_fg = active_bg - else - s_bg = inactive_bg - s_fg = inactive_fg - e_bg = inactive_bg - e_fg = inactive_bg - end - - local pane_count = "" - if C.tabs.pane_count_style then - local tabi = wezterm.mux.get_tab(tab.tab_id) - local muxpanes = tabi:panes() - local count = #muxpanes == 1 and "" or tostring(#muxpanes) - pane_count = numberStyle(count, C.tabs.pane_count_style) - end - - local index_i - if C.tabs.numerals == "roman" then - index_i = roman_numerals[tab.tab_index + 1] - else - index_i = tab.tab_index + 1 - end - - local index - if tab.is_active then - index = string.format("%s%s%s ", C.tabs.brackets.active[1], index_i, C.tabs.brackets.active[2]) - else - index = string.format("%s%s%s ", C.tabs.brackets.inactive[1], index_i, C.tabs.brackets.inactive[2]) - end - - -- start and end hardcoded numbers are the Powerline + " " padding - local fillerwidth = 2 + string.len(index) + string.len(pane_count) + 2 - - -- prefer renamed table titles to the default title - local tabtitle = tab.tab_title - if #tabtitle <= 0 then - tabtitle = tab.active_pane.title - end - - local width = conf.tab_max_width - fillerwidth - 1 - if (#tabtitle + fillerwidth) > conf.tab_max_width then - tabtitle = wezterm.truncate_right(tabtitle, width) .. "…" - end - - local title = string.format(" %s%s%s%s", index, tabtitle, pane_count, C.p) - - return { - { Background = { Color = s_bg } }, - { Foreground = { Color = s_fg } }, - { Text = title }, - { Background = { Color = e_bg } }, - { Foreground = { Color = e_fg } }, - { Text = C.div.r }, - } -end) - -wezterm.on("update-status", function(window, _pane) - local active_kt = window:active_key_table() ~= nil - local show = C.leader.enabled or (active_kt and C.mode.enabled) - if not show then - window:set_left_status("") - return - end - - local present, conf = pcall(window.effective_config, window) - if not present then - return - end - local palette = conf.resolved_palette - - local leader = "" - if C.leader.enabled then - local leader_text = C.leader.off - if window:leader_is_active() then - leader_text = C.leader.on - end - leader = wezterm.format({ - { Foreground = { Color = palette.background } }, - { Background = { Color = palette.ansi[5] } }, - { Text = " " .. leader_text .. C.p }, - }) - end - - local mode = "" - if C.mode.enabled then - local mode_text = "" - local active = window:active_key_table() - if C.mode.names[active] ~= nil then - mode_text = C.mode.names[active] .. "" - end - mode = wezterm.format({ - { Foreground = { Color = palette.background } }, - { Background = { Color = palette.ansi[5] } }, - { Attribute = { Intensity = "Bold" } }, - { Text = mode_text }, - "ResetAttributes", - }) - end - - local first_tab_active = window:mux_window():tabs_with_info()[1].is_active - local divider_bg = first_tab_active and palette.ansi[2] or palette.tab_bar.inactive_tab.bg_color - - local divider = wezterm.format({ - { Background = { Color = divider_bg } }, - { Foreground = { Color = palette.ansi[5] } }, - { Text = C.div.r }, - }) - - window:set_left_status(leader .. mode .. divider) - - if C.clock.enabled then - local time = wezterm.time.now():format(C.clock.format) - window:set_right_status(wezterm.format({ - { Background = { Color = palette.tab_bar.background } }, - { Foreground = { Color = palette.ansi[6] } }, - { Text = time }, - })) - end -end) - -return M diff --git a/home/isabel/gui/wezterm/keybinds.lua b/home/isabel/gui/wezterm/keybinds.lua deleted file mode 100644 index b2a864fa..00000000 --- a/home/isabel/gui/wezterm/keybinds.lua +++ /dev/null @@ -1,76 +0,0 @@ -local wezterm = require("wezterm") -local act = wezterm.action - -local utils = require("utils") - -local M = {} - -local openUrl = act.QuickSelectArgs({ - label = "open url", - patterns = { "https?://\\S+" }, - action = wezterm.action_callback(function(window, pane) - local url = window:get_selection_text_for_pane(pane) - wezterm.open_with(url) - end), -}) - -local changeCtpFlavor = act.InputSelector({ - title = "Change Catppuccin flavor", - choices = { - { label = "Espresso" }, - { label = "Mocha" }, - { label = "Macchiato" }, - { label = "Frappe" }, - { label = "Latte" }, - }, - action = wezterm.action_callback(function(window, _, _, label) - if label then - window:set_config_overrides({ color_scheme = "Catppuccin " .. label }) - end - end), -}) - -local getNewName = act.PromptInputLine({ - description = "Enter new name for tab", - action = wezterm.action_callback(function(window, pane, line) - if line then - window:active_tab():set_title(line) - end - end), -}) - -local keys = {} -local map = function(key, mods, action) - if type(mods) == "string" then - table.insert(keys, { key = key, mods = mods, action = action }) - elseif type(mods) == "table" then - for _, mod in pairs(mods) do - table.insert(keys, { key = key, mods = mod, action = action }) - end - end -end - -map("Enter", "ALT", act.ToggleFullScreen) - -map("e", "CTRL|SHIFT", getNewName) -map("o", { "LEADER", "SUPER" }, openUrl) -map("t", "ALT", changeCtpFlavor) - -local mods -if utils.is_windows() then - mods = "ALT" -else - mods = "SUPER" -end - -M.apply = function(c) - c.leader = { - key = " ", - mods = mods, - timeout_milliseconds = math.maxinteger, - } - c.keys = keys - -- c.disable_default_key_bindings = true -end - -return M diff --git a/home/isabel/gui/wezterm/theme.lua b/home/isabel/gui/wezterm/theme.lua deleted file mode 100644 index ebe5900a..00000000 --- a/home/isabel/gui/wezterm/theme.lua +++ /dev/null @@ -1,365 +0,0 @@ -local wezterm = require("wezterm") - -local M = {} - -local colors = { - latte = { - rosewater = "#dc8a78", - flamingo = "#dd7878", - pink = "#ea76cb", - mauve = "#8839ef", - red = "#d20f39", - maroon = "#e64553", - peach = "#fe640b", - yellow = "#df8e1d", - green = "#40a02b", - teal = "#179299", - sky = "#04a5e5", - sapphire = "#209fb5", - blue = "#1e66f5", - lavender = "#7287fd", - text = "#4c4f69", - subtext1 = "#5c5f77", - subtext0 = "#6c6f85", - overlay2 = "#7c7f93", - overlay1 = "#8c8fa1", - overlay0 = "#9ca0b0", - surface2 = "#acb0be", - surface1 = "#bcc0cc", - surface0 = "#ccd0da", - crust = "#dce0e8", - mantle = "#e6e9ef", - base = "#eff1f5", - }, - frappe = { - rosewater = "#f2d5cf", - flamingo = "#eebebe", - pink = "#f4b8e4", - mauve = "#ca9ee6", - red = "#e78284", - maroon = "#ea999c", - peach = "#ef9f76", - yellow = "#e5c890", - green = "#a6d189", - teal = "#81c8be", - sky = "#99d1db", - sapphire = "#85c1dc", - blue = "#8caaee", - lavender = "#babbf1", - text = "#c6d0f5", - subtext1 = "#b5bfe2", - subtext0 = "#a5adce", - overlay2 = "#949cbb", - overlay1 = "#838ba7", - overlay0 = "#737994", - surface2 = "#626880", - surface1 = "#51576d", - surface0 = "#414559", - base = "#303446", - mantle = "#292c3c", - crust = "#232634", - }, - macchiato = { - rosewater = "#f4dbd6", - flamingo = "#f0c6c6", - pink = "#f5bde6", - mauve = "#c6a0f6", - red = "#ed8796", - maroon = "#ee99a0", - peach = "#f5a97f", - yellow = "#eed49f", - green = "#a6da95", - teal = "#8bd5ca", - sky = "#91d7e3", - sapphire = "#7dc4e4", - blue = "#8aadf4", - lavender = "#b7bdf8", - text = "#cad3f5", - subtext1 = "#b8c0e0", - subtext0 = "#a5adcb", - overlay2 = "#939ab7", - overlay1 = "#8087a2", - overlay0 = "#6e738d", - surface2 = "#5b6078", - surface1 = "#494d64", - surface0 = "#363a4f", - base = "#24273a", - mantle = "#1e2030", - crust = "#181926", - }, - mocha = { - rosewater = "#f5e0dc", - flamingo = "#f2cdcd", - pink = "#f5c2e7", - mauve = "#cba6f7", - red = "#f38ba8", - maroon = "#eba0ac", - peach = "#fab387", - yellow = "#f9e2af", - green = "#a6e3a1", - teal = "#94e2d5", - sky = "#89dceb", - sapphire = "#74c7ec", - blue = "#89b4fa", - lavender = "#b4befe", - text = "#cdd6f4", - subtext1 = "#bac2de", - subtext0 = "#a6adc8", - overlay2 = "#9399b2", - overlay1 = "#7f849c", - overlay0 = "#6c7086", - surface2 = "#585b70", - surface1 = "#45475a", - surface0 = "#313244", - base = "#1e1e2e", - mantle = "#181825", - crust = "#11111b", - }, - espresso = { - rosewater = "#ece3e1", - flamingo = "#e1d2d2", - pink = "#ddccd8", - mauve = "#bbb2c9", - red = "#c4a2aa", - maroon = "#cbadb1", - peach = "#d5beb4", - yellow = "#ece3d3", - green = "#b9ddb6", - teal = "#badad4", - sky = "#b8d4db", - sapphire = "#a9c0ce", - blue = "#aab3c7", - lavender = "#bfc1d2", - text = "#d3d6e1", - subtext1 = "#bec2d2", - subtext0 = "#a8adc3", - overlay2 = "#9299b4", - overlay1 = "#7c84a5", - overlay0 = "#686f94", - surface2 = "#555a7b", - surface1 = "#434664", - surface0 = "#30314b", - base = "#101010", - mantle = "#090909", - crust = "#080808", - }, - cuddlefish = { - rosewater = "#f6edde", - flamingo = "#f0a0ad", - pink = "#F186ED", - mauve = "#B37FED", - red = "#F6598E", - maroon = "#CC6D91", - peach = "#F09262", - yellow = "#EDE874", - green = "#91E478", - teal = "#83EDCF", - sky = "#86DCE9", - sapphire = "#83C4E6", - blue = "#7796DF", - lavender = "#8B79E8", - text = "#CED1F0", - subtext1 = "#B6B8DE", - subtext0 = "#999AC7", - overlay2 = "#8787B2", - overlay1 = "#6D6D93", - overlay0 = "#545573", - surface2 = "#3C3D53", - surface1 = "#2A2C3B", - surface0 = "#1E1F2A", - base = "#14161D", - mantle = "#0E0F15", - crust = "#090A0F", - }, -} - -local mappings = { - -- custom flavor - cuddlefish = "Catppuccin Cuddlefish", - espresso = "Catppuccin Espresso", - -- default flavors - mocha = "Catppuccin Mocha", - macchiato = "Catppuccin Macchiato", - frappe = "Catppuccin Frappe", - latte = "Catppuccin Latte", -} - -function M.select(palette, flavor, accent) - local c = palette[flavor] - -- shorthand to check for the Latte flavor - local isLatte = palette == "latte" - - return { - foreground = c.text, - background = c.base, - - cursor_fg = isLatte and c.base or c.crust, - cursor_bg = c.rosewater, - cursor_border = c.rosewater, - - selection_fg = c.text, - selection_bg = c.surface2, - - scrollbar_thumb = c.surface2, - - split = c.overlay0, - - ansi = { - isLatte and c.subtext1 or c.surface1, - c.red, - c.green, - c.yellow, - c.blue, - c.pink, - c.teal, - isLatte and c.surface2 or c.subtext1, - }, - - brights = { - isLatte and c.subtext0 or c.surface2, - c.red, - c.green, - c.yellow, - c.blue, - c.pink, - c.teal, - isLatte and c.surface1 or c.subtext0, - }, - - indexed = { [16] = c.peach, [17] = c.rosewater }, - - -- nightbuild only - compose_cursor = c.flamingo, - - tab_bar = { - background = c.crust, - active_tab = { - bg_color = c[accent], - fg_color = c.crust, - }, - inactive_tab = { - bg_color = c.mantle, - fg_color = c.text, - }, - inactive_tab_hover = { - bg_color = c.base, - fg_color = c.text, - }, - new_tab = { - bg_color = c.surface0, - fg_color = c.text, - }, - new_tab_hover = { - bg_color = c.surface1, - fg_color = c.text, - }, - -- fancy tab bar - inactive_tab_edge = c.surface0, - }, - - visual_bell = c.surface0, - } -end - -local function select_for_appearance(appearance, options) - if appearance:find("Dark") then - return options.dark - else - return options.light - end -end - -local function tableMerge(t1, t2) - for k, v in pairs(t2) do - if type(v) == "table" then - if type(t1[k] or false) == "table" then - tableMerge(t1[k] or {}, t2[k] or {}) - else - t1[k] = v - end - else - t1[k] = v - end - end - return t1 -end - -function M.apply_to_config(c, opts) - if not opts then - opts = {} - end - - -- default options - local defaults = { - flavor = "cuddlefish", - accent = "pink", - sync = false, - sync_flavors = { light = "latte", dark = "mocha" }, - color_overrides = { - cuddlefish = {}, - espresso = {}, - mocha = {}, - macchiato = {}, - frappe = {}, - latte = {}, - }, - token_overrides = { - cuddlefish = {}, - espresso = {}, - mocha = {}, - macchiato = {}, - frappe = {}, - latte = {}, - }, - } - - local o = tableMerge(defaults, opts) - - -- insert all flavors - local color_schemes = {} - local palette = tableMerge(colors, o.color_overrides) - for flavor, name in pairs(mappings) do - local spec = M.select(palette, flavor, o.accent) - local overrides = o.token_overrides[flavor] - color_schemes[name] = tableMerge(spec, overrides) - end - if c.color_schemes == nil then - c.color_schemes = {} - end - c.color_schemes = tableMerge(c.color_schemes, color_schemes) - - if opts.sync then - c.color_scheme = select_for_appearance(wezterm.gui.get_appearance(), { - dark = mappings[o.sync_flavors.dark], - light = mappings[o.sync_flavors.light], - }) - c.command_palette_bg_color = select_for_appearance(wezterm.gui.get_appearance(), { - dark = colors[o.sync_flavors.dark].crust, - light = colors[o.sync_flavors.light].crust, - }) - c.command_palette_fg_color = select_for_appearance(wezterm.gui.get_appearance(), { - dark = colors[o.sync_flavors.dark].text, - light = colors[o.sync_flavors.light].text, - }) - else - c.color_scheme = mappings[o.flavor] - c.command_palette_bg_color = colors[o.flavor].crust - c.command_palette_fg_color = colors[o.flavor].text - end - - local window_frame = { - active_titlebar_bg = colors[o.flavor].crust, - active_titlebar_fg = colors[o.flavor].text, - inactive_titlebar_bg = colors[o.flavor].crust, - inactive_titlebar_fg = colors[o.flavor].text, - button_fg = colors[o.flavor].text, - button_bg = colors[o.flavor].base, - } - - if c.window_frame == nil then - c.window_frame = {} - end - c.window_frame = tableMerge(c.window_frame, window_frame) -end - -return M diff --git a/home/isabel/gui/wezterm/utils.lua b/home/isabel/gui/wezterm/utils.lua deleted file mode 100644 index d52e1752..00000000 --- a/home/isabel/gui/wezterm/utils.lua +++ /dev/null @@ -1,18 +0,0 @@ -local wezterm = require("wezterm") -local M = {} - -M.is_windows = function() - return wezterm.target_triple:find("windows") ~= nil -end - ----@return boolean -M.is_linux = function() - return wezterm.target_triple:find("linux") ~= nil -end - ----@return boolean -M.is_darwin = function() - return wezterm.target_triple:find("darwin") ~= nil -end - -return M diff --git a/home/isabel/gui/wezterm/wezterm.lua b/home/isabel/gui/wezterm/wezterm.lua deleted file mode 100644 index 94c2e706..00000000 --- a/home/isabel/gui/wezterm/wezterm.lua +++ /dev/null @@ -1,92 +0,0 @@ -local utils = require("utils") -local wezterm = require("wezterm") - -local c = {} -if wezterm.c_builder then - c = wezterm.config_builder() -end - -c.enable_wayland = true - --- theme -require("theme").apply_to_config(c) -require("bar").apply_to_config(c) - --- if utils.is_linux() then --- c.window_background_opacity = 0.90 --- elseif utils.is_darwin() then --- c.window_background_opacity = 0.95 --- c.macos_window_background_blur = 15 --- elseif utils.is_windows() then --- c.window_background_image = "C:\\Users\\Isabel\\Pictures\\wallpapers\\catgirl.jpg" --- c.window_background_image_hsb = { --- brightness = 0.03, -- make the bg darker so we can see what we are doing --- } --- -- c.win32_system_backdrop = "Tabbed" --- -- c.window_background_opacity = 0.95 --- end - --- load my keybinds -require("keybinds").apply(c) - --- default shell -if utils.is_linux() or utils.is_darwin() then - c.default_prog = { "/run/current-system/sw/bin/fish", "--login" } -elseif utils.is_windows() then - c.default_prog = { "wsl.exe" } - c.default_domain = "WSL:NixOS" - c.launch_menu = { - { - label = "PowerShell", - args = { "pwsh.exe", "-NoLogo" }, - domain = { DomainName = "local" }, - }, - } -end - --- window stuff -if utils.is_linux() then - c.window_decorations = "TITLE | RESIZE" -else - c.window_decorations = "RESIZE" -end - -if utils.is_windows() then - c.window_padding = { left = 0, right = 0, top = 0, bottom = 0 } -else - c.window_padding = { left = 10, right = 0, top = 0, bottom = 0 } -end - --- fonts -c.font = wezterm.font_with_fallback({ - "Maple Mono", - "Symbols Nerd Font", -}) -c.font_size = 13 -c.adjust_window_size_when_changing_font_size = false -c.window_frame = { - font = wezterm.font("Maple Mono"), - font_size = c.font_size, -} - --- QOL -c.audible_bell = "Disabled" -c.default_cursor_style = "BlinkingBar" -c.window_close_confirmation = "NeverPrompt" --- c.prefer_to_spawn_tabs = true - -if utils.is_windows() then - c.front_end = "OpenGL" -else - c.front_end = "WebGpu" -end - --- this is nix so lets not do it --- enable this if i ever setup nix to statically link --- c.automatically_reload_config = false -c.check_for_updates = false - --- TODO: --- https://wezfurlong.org/wezterm/config/lua/config/tiling_desktop_environments.html - -return c diff --git a/home/isabel/packages.nix b/home/isabel/packages.nix index 776897de..0aa10f01 100644 --- a/home/isabel/packages.nix +++ b/home/isabel/packages.nix @@ -12,7 +12,7 @@ let cfg = config.garden.profiles; in { - garden.packages = mergeAttrsList [ + users.users.isabel.packages = builtins.attrValues (mergeAttrsList [ (optionalAttrs cfg.workstation.enable { inherit (pkgs) # keep-sorted start @@ -77,5 +77,5 @@ in inherit (inputs'.extersia.packages) cake-wallet; }) - ]; + ]); } diff --git a/home/isabel/services/default.nix b/home/isabel/services/default.nix deleted file mode 100644 index e6070b29..00000000 --- a/home/isabel/services/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - imports = [ - # keep-sorted start - ./rnnoise.nix - ./tray.nix - # keep-sorted end - ]; -} diff --git a/home/isabel/services/rnnoise.nix b/home/isabel/services/rnnoise.nix deleted file mode 100644 index 0ac08a0a..00000000 --- a/home/isabel/services/rnnoise.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ - lib, - pkgs, - config, - ... -}: -let - inherit (lib.modules) mkIf; -in -{ - config = mkIf (config.garden.profiles.graphical.enable && pkgs.stdenv.hostPlatform.isLinux) { - xdg.configFile."pipewire/pipewire.conf.d/99-input-denoising.conf".text = builtins.toJSON { - "context.modules" = [ - { - "name" = "libpipewire-module-filter-chain"; - "args" = { - "node.description" = "Noise Canceling source"; - "media.name" = "Noise Canceling source"; - "filter.graph" = { - "nodes" = [ - { - "type" = "ladspa"; - "name" = "rnnoise"; - "plugin" = "librnnoise_ladspa"; - "label" = "noise_suppressor_stereo"; - "control" = { - "VAD Threshold (%)" = 60.0; - "VAD Grace Period (ms)" = 20; - "Retroactive VAD Grace (ms)" = 0; - }; - } - ]; - }; - "audio.position" = [ - "FL" - "FR" - ]; - "capture.props" = { - "node.name" = "effect_input.rnnoise"; - "node.passive" = true; - }; - "playback.props" = { - "node.name" = "effect_output.rnnoise"; - "media.class" = "Audio/Source"; - }; - }; - } - ]; - }; - }; -} diff --git a/home/isabel/services/tray.nix b/home/isabel/services/tray.nix deleted file mode 100644 index 61844878..00000000 --- a/home/isabel/services/tray.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ - lib, - config, - ... -}: -let - inherit (lib.modules) mkIf; -in -{ - config = mkIf config.garden.profiles.graphical.enable { - # https://github.com/nix-community/home-manager/issues/2064 - systemd.user.targets.tray.Unit = { - Description = "Home Manager System Tray"; - Requires = [ "graphical-session-pre.target" ]; - }; - }; -} diff --git a/home/isabel/system/default.nix b/home/isabel/system/default.nix deleted file mode 100644 index 704c083a..00000000 --- a/home/isabel/system/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - imports = [ - # keep-sorted start - ./docs.nix # documentation - ./secrets.nix # very hush hush - ./ssh.nix # ssh agent settings - # keep-sorted end - ]; -} diff --git a/home/isabel/system/docs.nix b/home/isabel/system/docs.nix deleted file mode 100644 index 5244074f..00000000 --- a/home/isabel/system/docs.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - # This is enabled by default, but we don't want it - # NOTE: this will break some programs that call `man` for you like `nix-collect-garbage` - programs.man.enable = false; -} diff --git a/home/isabel/system/secrets.nix b/home/isabel/system/secrets.nix deleted file mode 100644 index 21c2d6e3..00000000 --- a/home/isabel/system/secrets.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ config, ... }: -let - inherit (config.xdg) configHome; -in -{ - sops.secrets = { - wakatime = { - path = configHome + "/wakatime/.wakatime.cfg"; - }; - - nix-auth-tokens = { }; - }; -} diff --git a/home/isabel/system/ssh.nix b/home/isabel/system/ssh.nix deleted file mode 100644 index 58100923..00000000 --- a/home/isabel/system/ssh.nix +++ /dev/null @@ -1,110 +0,0 @@ -{ config, ... }: -let - inherit (config.sops) secrets; - inherit (config.home) homeDirectory; - sshDir = "${homeDirectory}/.ssh"; -in -{ - programs.ssh = { - inherit (config.garden.profiles.workstation) enable; - enableDefaultConfig = false; - - includes = [ - secrets.uni-sshconf.path - secrets.rsync-sshconf.path - ]; - - matchBlocks = { - "*" = { - forwardAgent = false; - addKeysToAgent = "no"; - compression = true; - serverAliveInterval = 0; - serverAliveCountMax = 3; - hashKnownHosts = true; - userKnownHostsFile = "~/.ssh/known_hosts"; - controlMaster = "no"; - controlPath = "~/.ssh/master-%r@%n:%p"; - controlPersist = "no"; - }; - - # keep-sorted start block=yes newline_separated=yes - "amity" = { - hostname = "143.47.240.116"; - identityFile = secrets.keys-amity.path; - }; - - "aphrodite".hostname = "95.111.208.153"; - - "athena".hostname = "192.168.1.135"; - - "aur.archlinux.org" = { - user = "aur"; - hostname = "aur.archlinux.org"; - identityFile = secrets.keys-aur.path; - }; - - "codeberg.org" = { - user = "git"; - hostname = "codeberg.org"; - identityFile = secrets.keys-codeberg.path; - }; - - "git.auxolotl.org" = { - user = "forgejo"; - hostname = "git.auxolotl.org"; - }; - - "git.isabelroses.com" = { - user = "forgejo"; - hostname = "git.isabelroses.com"; - identityFile = secrets.keys-git-isabel.path; - }; - - "github.com" = { - user = "git"; - hostname = "github.com"; - identityFile = secrets.keys-gh.path; - }; - - "gitlab.com" = { - user = "git"; - hostname = "gitlab.com"; - }; - - "isis".hostname = "83.136.254.93"; - - "minerva".hostname = "91.107.198.173"; - - "skadi".hostname = "141.147.73.185"; - - "tangled.org" = { - user = "git"; - hostname = "tangled.org"; - identityFile = secrets.keys-tangled.path; - }; - - "tatsumaki".hostname = "192.168.1.217"; - # keep-sorted end - }; - }; - - home.file.".ssh/id_ed25519.pub".text = '' - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMQDiHbMSinj8twL9cTgPOfI6OMexrTZyHX27T8gnMj2 - ''; - - sops.secrets = { - # keep-sorted start block=yes - keys-amity = { }; - keys-aur = { }; - keys-codeberg = { }; - keys-gh = { }; - keys-git-isabel = { }; - keys-rsync.path = sshDir + "/rsync"; - keys-tangled = { }; - rsync-sshconf = { }; - uni-central.path = sshDir + "/uni-central"; - uni-sshconf = { }; - # keep-sorted end - }; -} diff --git a/home/isabel/themes/catppuccin.nix b/home/isabel/themes/catppuccin.nix deleted file mode 100644 index 996cbe30..00000000 --- a/home/isabel/themes/catppuccin.nix +++ /dev/null @@ -1,73 +0,0 @@ -{ - lib, - pkgs, - config, - inputs, - options, - osClass, - osConfig, - ... -}: -let - isGui = osClass == "nixos" && config.garden.profiles.graphical.enable; - - oled = { - mocha = { - base = "000000"; - mantle = "010101"; - crust = "020202"; - }; - }; -in -{ - imports = [ inputs.catppuccin.homeModules.catppuccin ]; - - config = { - catppuccin = { - inherit (config.garden.profiles.workstation) enable; - sources = - if (osConfig ? "catppuccin") then - osConfig.catppuccin.sources - else - (options.catppuccin.sources.default.overrideScope ( - _final: prev: { - whiskers = pkgs.symlinkJoin { - name = "whiskers-wrapped"; - - paths = [ prev.whiskers ]; - nativeBuildInputs = [ pkgs.makeBinaryWrapper ]; - - postBuild = '' - wrapProgram $out/bin/whiskers \ - --add-flag ${lib.escapeShellArg "--color-overrides=${builtins.toJSON oled}"} - ''; - - meta.mainProgram = "whiskers"; - }; - } - )); - - flavor = "mocha"; - accent = "pink"; - - cursors = { - enable = isGui; - accent = "dark"; - }; - - gtk.icon.enable = isGui; - - # I don't even use the colors from the port - waybar.enable = false; - - # IFD and can use term colors - starship.enable = false; - - # IFD and easy enough to vendor - fzf.enable = false; - - # IFD and can use term colors - eza.enable = false; - }; - }; -} diff --git a/home/isabel/themes/default.nix b/home/isabel/themes/default.nix deleted file mode 100644 index ecada47b..00000000 --- a/home/isabel/themes/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - imports = [ - # keep-sorted start - ./catppuccin.nix - ./fonts.nix - ./global.nix - ./gtk.nix - ./qt.nix - # keep-sorted end - ]; -} diff --git a/home/isabel/themes/fonts.nix b/home/isabel/themes/fonts.nix deleted file mode 100644 index 93080606..00000000 --- a/home/isabel/themes/fonts.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - garden.style.fonts = { - name = "Berkeley Mono"; - package = null; - }; -} diff --git a/home/isabel/themes/global.nix b/home/isabel/themes/global.nix deleted file mode 100644 index 08459a6e..00000000 --- a/home/isabel/themes/global.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ pkgs, config, ... }: -{ - # pointer / cursor theming - home.pointerCursor = { - enable = pkgs.stdenv.hostPlatform.isLinux && config.garden.profiles.graphical.enable; - size = 24; - dotIcons.enable = false; - gtk.enable = true; - # this adds extra deps, so lets only enable it on wayland - x11.enable = false; - }; -} diff --git a/home/isabel/themes/gtk.nix b/home/isabel/themes/gtk.nix deleted file mode 100644 index a213e37e..00000000 --- a/home/isabel/themes/gtk.nix +++ /dev/null @@ -1,123 +0,0 @@ -{ - lib, - pkgs, - config, - osClass, - ... -}: -let - inherit (lib.modules) mkIf; - cfg = config.garden.style; - ctp = config.catppuccin; - - schema = pkgs.gsettings-desktop-schemas; -in -{ - config = mkIf (config.garden.profiles.graphical.enable && osClass == "nixos") { - xdg = { - systemDirs.data = [ "${schema}/share/gsettings-schemas/${schema.name}" ]; - - configFile = - let - gtk4Dir = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0"; - in - { - "gtk-4.0/assets".source = "${gtk4Dir}/assets"; - "gtk-4.0/gtk.css".source = "${gtk4Dir}/gtk.css"; - "gtk-4.0/gtk-dark.css".source = "${gtk4Dir}/gtk-dark.css"; - }; - }; - - home = { - packages = [ - pkgs.glib # gsettings - ]; - - # gtk applications should use xdg specified settings - sessionVariables.GTK_USE_PORTAL = "1"; - }; - - gtk = { - enable = true; - - theme = { - name = "catppuccin-${ctp.flavor}-${ctp.accent}-standard"; - package = - (pkgs.catppuccin-gtk.override { - size = "standard"; - accents = [ ctp.accent ]; - variant = ctp.flavor; - }).overrideAttrs - (oa: { - nativeBuildInputs = oa.nativeBuildInputs or [ ] ++ [ - config.catppuccin.sources.whiskers - pkgs.which - ]; - - preInstall = '' - cd sources/patches/colloid - whiskers palette.tera - cd - - ''; - }); - }; - - font = { - inherit (cfg.fonts) name size; - }; - - gtk2 = { - configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc"; - extraConfig = '' - gtk-xft-antialias=1 - gtk-xft-hinting=1 - gtk-xft-hintstyle="hintslight" - gtk-xft-rgba="rgb" - ''; - }; - - gtk3.extraConfig = { - # make things look nice - gtk-application-prefer-dark-theme = true; - - gtk-decoration-layout = "appmenu:none"; - - gtk-xft-antialias = 1; - gtk-xft-hinting = 1; - gtk-xft-hintstyle = "hintslight"; - - # stop annoying sounds - gtk-enable-event-sounds = 0; - gtk-enable-input-feedback-sounds = 0; - gtk-error-bell = 0; - - # config that is not the same as gtk4 - gtk-toolbar-style = "GTK_TOOLBAR_BOTH"; - gtk-toolbar-icon-size = "GTK_ICON_SIZE_LARGE_TOOLBAR"; - - gtk-button-images = 1; - gtk-menu-images = 1; - }; - - gtk4 = { - inherit (config.gtk) theme; - - extraConfig = { - # make things look nice - gtk-application-prefer-dark-theme = true; - - gtk-decoration-layout = "appmenu:none"; - - gtk-xft-antialias = 1; - gtk-xft-hinting = 1; - gtk-xft-hintstyle = "hintslight"; - - # stop annoying sounds again - gtk-enable-event-sounds = 0; - gtk-enable-input-feedback-sounds = 0; - gtk-error-bell = 0; - }; - }; - }; - }; -} diff --git a/home/isabel/themes/qt.nix b/home/isabel/themes/qt.nix deleted file mode 100644 index 87e379e3..00000000 --- a/home/isabel/themes/qt.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ - lib, - pkgs, - config, - ... -}: -let - inherit (lib.modules) mkIf; -in -{ - config = mkIf (config.garden.profiles.graphical.enable && pkgs.stdenv.hostPlatform.isLinux) { - qt = { - enable = true; - platformTheme.name = "kvantum"; - style.name = "kvantum"; - }; - - catppuccin.kvantum.apply = true; - - home.sessionVariables = { - # scaling - 1 means no scaling - QT_AUTO_SCREEN_SCALE_FACTOR = "1"; - - # use wayland as the default backend, fallback to xcb if wayland is not available - QT_QPA_PLATFORM = "wayland;xcb"; - - # disable window decorations everywhere - QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; - - # remain backwards compatible with qt5 - DISABLE_QT5_COMPAT = "0"; - - # tell calibre to use the dark theme - CALIBRE_USE_DARK_PALETTE = "1"; - }; - }; -} diff --git a/home/isabel/tui/default.nix b/home/isabel/tui/default.nix deleted file mode 100644 index 1ada0711..00000000 --- a/home/isabel/tui/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - imports = [ - # keep-sorted start - ./izrss.nix - ./lazygit.nix - ./navi.nix - ./neovim.nix - # keep-sorted end - ]; -} diff --git a/home/isabel/tui/izrss.nix b/home/isabel/tui/izrss.nix deleted file mode 100644 index a898eb45..00000000 --- a/home/isabel/tui/izrss.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ config, ... }: -{ - programs.izrss = { - inherit (config.garden.profiles.workstation) enable; - - settings = { - reader = { - size = "full"; - theme = "environment"; - }; - - urls = [ - "https://isabelroses.com/feed.xml" - "https://uncenter.dev/feed.xml" - "https://charm.sh/blog/rss.xml" - "https://antfu.me/feed.xml" - "https://fasterthanli.me/index.xml" - "https://blog.orhun.dev/rss.xml" - "https://mitchellh.com/feed.xml" - "https://dataswamp.org/~solene/rss-html.xml" - "https://maia.crimew.gay/feed.xml" - "https://github.com/moonlight-mod/extensions/commits.atom" # moonlight extensions - "https://clan.lol/feed.xml" - ]; - }; - }; -} diff --git a/home/isabel/tui/lazygit.nix b/home/isabel/tui/lazygit.nix deleted file mode 100644 index 4836f4c0..00000000 --- a/home/isabel/tui/lazygit.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ config, ... }: -{ - programs.lazygit = { - enable = config.garden.profiles.workstation.enable && config.programs.git.enable; - - settings = { - update.method = "never"; - - gui = { - nerdFontsVersion = 3; - authorColors.isabel = "#f5c2e7"; - }; - - git = { - overrideGpg = true; - pagers = [ - { pager = "delta --paging=never"; } - ]; - }; - }; - }; -} diff --git a/home/isabel/tui/navi.nix b/home/isabel/tui/navi.nix deleted file mode 100644 index 6e73e561..00000000 --- a/home/isabel/tui/navi.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ config, ... }: -{ - programs.navi = { - inherit (config.garden.profiles.workstation) enable; - }; -} diff --git a/home/isabel/tui/neovim.nix b/home/isabel/tui/neovim.nix deleted file mode 100644 index f6ce55a6..00000000 --- a/home/isabel/tui/neovim.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ - config, - inputs, - inputs', - ... -}: -{ - imports = [ inputs.izvim.homeModules.default ]; - - programs.izvim = { - inherit (config.garden.profiles.workstation) enable; - - packageOverrides = { - inherit (inputs'.izlix.packages) nil; - }; - }; -} diff --git a/home/isabel/wrappers/all-modules.nix b/home/isabel/wrappers/all-modules.nix new file mode 100644 index 00000000..5f3fe75a --- /dev/null +++ b/home/isabel/wrappers/all-modules.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./git.nix + ./atuin.nix + ./fish.nix + ]; +} diff --git a/home/isabel/cli/atuin.nix b/home/isabel/wrappers/atuin.nix similarity index 59% rename from home/isabel/cli/atuin.nix rename to home/isabel/wrappers/atuin.nix index a8480c2c..163d47e6 100644 --- a/home/isabel/cli/atuin.nix +++ b/home/isabel/wrappers/atuin.nix @@ -1,10 +1,9 @@ -{ config, ... }: +{ pkgs, ... }: { - programs.atuin = { - inherit (config.garden.profiles.workstation) enable; + wrappers.atuin = { + basePackage = pkgs.atuin; - flags = [ "--disable-up-arrow" ]; - settings = { + env.ATUIN_CONFIG_DIR.value = pkgs.writers.writeTOML { dialect = "uk"; show_preview = true; inline_height = 30; @@ -12,6 +11,7 @@ update_check = false; sync_address = "https://atuin.isabelroses.com"; sync_frequency = "5m"; + daemon.enabled = true; }; }; } diff --git a/home/isabel/wrappers/default.nix b/home/isabel/wrappers/default.nix new file mode 100644 index 00000000..4b9cb6b9 --- /dev/null +++ b/home/isabel/wrappers/default.nix @@ -0,0 +1,27 @@ +{ + lib, + pkgs, + self, + self', + config, + inputs, + inputs', + ... +}: +{ + users.users.isabel.packages = + builtins.attrValues + (inputs.wrappers.lib { + inherit lib pkgs; + modules = [ ./all-modules.nix ]; + specialArgs = { + inherit + self + self' + inputs + inputs' + ; + osConfig = config; + }; + }).build.packages; +} diff --git a/home/isabel/wrappers/fish.nix b/home/isabel/wrappers/fish.nix new file mode 100644 index 00000000..fa7b3e05 --- /dev/null +++ b/home/isabel/wrappers/fish.nix @@ -0,0 +1,79 @@ +# https://github.com/viperML/dotfiles/blob/master/modules/wrapper-manager/fish/default.nix +{ pkgs, lib, ... }: +let + inherit (lib.strings) concatStringsSep; + + inherit (pkgs) writeTextDir; + vendorConf = "share/fish/vendor_conf.d"; + + mkInitScript = pkg: pkgs.runCommandLocal "${pkg.pname}-init.fish" { buildInputs = [ pkg ]; }; + + initScripts = [ + (mkInitScript pkgs.zoxide '' + zoxide init fish --cmd cd > $out + '') + (mkInitScript pkgs.direnv '' + direnv hook fish > $out + '') + (mkInitScript pkgs.starship '' + starship init fish > $out + '') + (mkInitScript pkgs.nix-your-shell '' + nix-your-shell fish > $out + '') + (pkgs.runCommandLocal "atuin-fish-config.fish" + { + nativeBuildInputs = [ + pkgs.writableTmpDirAsHomeHook + pkgs.atuin + ]; + } + '' + atuin init fish --disable-up-arrow > "$out" + '' + ) + ]; + + config = + writeTextDir "${vendorConf}/isabel_config.fish" + # fish + '' + # source env stuff, generate this with {option}`programs.fish.useBabelFish` + source /etc/fish/nixos-env-preinit.fish + + alias df 'df -h' + alias eza 'eza --icons auto --group --group-directories-first --header --no-permissions --octal-permissions' + alias fd 'fd --hidden' + alias jctl 'journalctl -p 3 -xb' + alias la 'eza -a' + alias lg lazygit + alias ll 'eza -l' + alias lla 'eza -la' + alias ls eza + alias lt 'eza --tree' + alias mkdir 'mkdir -pv' + alias rs 'systemctl reboot' + + if status is-interactive + set -gx DIRENV_LOG_FORMAT "" + source ${pkgs.nix-direnv}/share/nix-direnv/direnvrc + ${concatStringsSep "\nsource " initScripts} + end + ''; +in +{ + wrappers.fish = { + basePackage = pkgs.fish; + extraPackages = [ pkgs.zoxide ]; + programs.fish = { + wrapFlags = [ + "--prefix" + "XDG_DATA_DIRS" + ":" + (lib.makeSearchPathOutput "out" "share" [ + config + ]) + ]; + }; + }; +} diff --git a/home/isabel/wrappers/ghostty.nix b/home/isabel/wrappers/ghostty.nix new file mode 100644 index 00000000..5803335e --- /dev/null +++ b/home/isabel/wrappers/ghostty.nix @@ -0,0 +1,6 @@ +{ pkgs, ... }: +{ + wrappers.ghostty = { + basePackage = pkgs.ghostty; + }; +} diff --git a/home/isabel/wrappers/git.nix b/home/isabel/wrappers/git.nix new file mode 100644 index 00000000..db453390 --- /dev/null +++ b/home/isabel/wrappers/git.nix @@ -0,0 +1,154 @@ +# TODO: git ignore + +{ + lib, + pkgs, + self, + ... +}: +let + inherit (self.lib) giturl; + inherit (lib.attrsets) mergeAttrsList; +in +{ + wrappers.git = { + basePackage = pkgs.gitMinimal; + + env.GIT_CONFIG.value = (pkgs.formats.gitINI { }).generate "git-config" { + user = { + name = "isabel"; + email = "isabel" + "@" + "isabelroses" + "." + "com"; # obsfuscate email to prevent webscrapper spam + signingKey = "~/.ssh/id_ed25519.pub"; + }; + + alias = { + st = "status"; + br = "branch"; + c = "commit -m"; + ca = "commit -am"; + co = "checkout"; + d = "diff"; + df = "!git hist | peco | awk '{print $2}' | xargs -I {} git diff {}^ {}"; + fuck = "commit --amend -m"; + graph = "log --all --decorate --graph"; + ps = "!git push origin $(git rev-parse --abbrev-ref HEAD)"; + pl = "!git pull origin $(git rev-parse --abbrev-ref HEAD)"; + af = "!git add $(git ls-files -m -o --exclude-standard | fzf -m)"; + hist = '' + log --pretty=format:"%Cgreen%h %Creset%cd %Cblue[%cn] %Creset%s%C(yellow)%d%C(reset)" --graph --date=relative --decorate --all + ''; + llog = '' + log --graph --name-status --pretty=format:"%C(red)%h %C(reset)(%cd) %C(green)%an %Creset%s %C(yellow)%d%Creset" --date=relative + ''; + # https://github.com/arichtman/nix/blob/18f5613c2842e12e49350aeceace63863ad59244/modules/home/default-home/default.nix#L11 + fuggit = "!git add . && git commit --amend --no-edit && git push --force"; + # thanks @vbde for this + idc = "!git commit -am '$(curl -s https://whatthecommit.com/index.txt)'"; + }; + + init.defaultBranch = "main"; + repack.usedeltabaseoffset = "true"; + color.ui = "auto"; + help.autocorrect = 10; # 1 second warning to a typo'd command + + diff = { + algorithm = "histogram"; # a much better diff + colorMoved = "plain"; # show moved lines in a different color + mnemonicprefix = true; + }; + + core.whitespace = "fix,-indent-with-non-tab,trailing-space,cr-at-eol"; + + # nice quality of life improvements + branch = { + autosetupmerge = "true"; + + # sorts branches so the newst ones by latest commit are at the top + sort = "committerdate"; + }; + + commit = { + verbose = true; + gpgSign = true; + }; + + gpg = { + format = "ssh"; + ssh.program = lib.meta.getExe' pkgs.openssh "ssh-keygen"; + }; + + # prune branches that are no longer on the remote + fetch.prune = true; + + pull = { + # the default functionality is to push the current branch that i am on to the remote + default = "current"; + + # equivalent to --ff-only + ff = "only"; + }; + + # if a remote does not have a branch that i have, create it + push.autoSetupRemote = true; + + # nicer diffing for merges + merge = { + stat = "true"; + conflictstyle = "zdiff3"; + tool = "meld"; + }; + + rebase = { + # https://andrewlock.net/working-with-stacked-branches-in-git-is-easier-with-update-refs/ + updateRefs = true; + + autoSquash = true; + autoStash = true; + }; + + rerere = { + enabled = true; + autoupdate = true; + }; + + # prevent data corruption + transfer.fsckObjects = true; + fetch.fsckObjects = true; + receive.fsckObjects = true; + + url = mergeAttrsList ( + map giturl [ + { + domain = "github.com"; + alias = "github"; + } + { + domain = "gitlab.com"; + alias = "gitlab"; + } + { + domain = "aur.archlinux.org"; + alias = "aur"; + user = "aur"; + } + { + domain = "git.sr.ht"; + alias = "srht"; + } + { + domain = "codeberg.org"; + alias = "codeberg"; + } + { + domain = "git.isabelroses.com"; + alias = "me"; + } + { + domain = "tangled.org"; + alias = "tangled"; + } + ] + ); + }; + }; +} diff --git a/modules/base/default.nix b/modules/base/default.nix index d0c63a1b..f1f54e25 100644 --- a/modules/base/default.nix +++ b/modules/base/default.nix @@ -1,13 +1,14 @@ { imports = [ # keep-sorted start prefix_order=../,../../,./ - ../generic ../../home ./nix ./nixpkgs.nix ./programs.nix ./system ./users + ./profiles.nix + ./packages.nix # keep-sorted end ]; } diff --git a/modules/generic/packages.nix b/modules/base/packages.nix similarity index 59% rename from modules/generic/packages.nix rename to modules/base/packages.nix index 30b42bf0..22d18873 100644 --- a/modules/generic/packages.nix +++ b/modules/base/packages.nix @@ -17,9 +17,7 @@ in ''; }; - config = - if _class == "homeManager" then - { home.packages = builtins.attrValues config.garden.packages; } - else - { environment.systemPackages = builtins.attrValues config.garden.packages; }; + config = { + environment.systemPackages = builtins.attrValues config.garden.packages; + }; } diff --git a/modules/generic/profiles.nix b/modules/base/profiles.nix similarity index 100% rename from modules/generic/profiles.nix rename to modules/base/profiles.nix diff --git a/modules/base/programs.nix b/modules/base/programs.nix index 2c6b6ec6..36aa8b2e 100644 --- a/modules/base/programs.nix +++ b/modules/base/programs.nix @@ -1,19 +1,8 @@ -{ self, config, ... }: -let - inherit (self.lib) anyHome; - - qh = anyHome config; -in { - # home-manager is so strange and needs these declared multiple times - programs = { - zsh.enable = qh (c: c.programs.zsh.enable); - - fish = { - enable = qh (c: c.programs.fish.enable); + programs.fish = { + enable = true; - # fish goes brr - useBabelfish = true; - }; + # fish goes brr + useBabelfish = true; }; } diff --git a/modules/base/users/mkuser.nix b/modules/base/users/mkuser.nix index 6901a444..b06aeae4 100644 --- a/modules/base/users/mkuser.nix +++ b/modules/base/users/mkuser.nix @@ -13,11 +13,8 @@ in { users.users = genAttrs config.garden.system.users ( name: - let - inherit (config.home-manager.users.${name}.garden.programs.defaults) shell; - in { - shell = "/run/current-system/sw/bin/${shell}"; + shell = "/run/current-system/sw/bin/fish"; } // ( if _class == "nixos" then diff --git a/modules/darwin/extras.nix b/modules/darwin/extras.nix index ab24a239..b15c3b8c 100644 --- a/modules/darwin/extras.nix +++ b/modules/darwin/extras.nix @@ -3,7 +3,6 @@ imports = [ # keep-sorted start inputs.extersia.darwinModules.default - inputs.home-manager.darwinModules.home-manager # keep-sorted end ]; } diff --git a/modules/generic/default.nix b/modules/generic/default.nix deleted file mode 100644 index a538ac03..00000000 --- a/modules/generic/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - imports = [ - # keep-sorted start - ./packages.nix - ./profiles.nix - # keep-sorted end - ]; -} diff --git a/modules/home/default.nix b/modules/home/default.nix deleted file mode 100644 index 2cd7b522..00000000 --- a/modules/home/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ - _class = "homeManager"; - - imports = [ - # keep-sorted start - ../generic - ./docs.nix # no more docs - ./environment # environment variables & path - ./extras.nix # modules that are not in this repo, and don't have a nice place to be imported in - ./home.nix # home settings - ./profiles.nix # profiles for different machines - ./programs # ways to configure packages - ./secrets.nix # secrets for the home directory - ./themes # themes for applications - # keep-sorted end - ]; -} diff --git a/modules/home/docs.nix b/modules/home/docs.nix deleted file mode 100644 index 158805ec..00000000 --- a/modules/home/docs.nix +++ /dev/null @@ -1,13 +0,0 @@ -# I don't use docs, so just disable them -# -# the docs also create issues that are really hard to debug -# such as ones where lib does not get passed correctly, -# see an example of me complaining and then finding this as the fix -# https://akko.isabelroses.com/notice/AkdGj5udRhYIKqTeng -{ - manual = { - html.enable = false; - json.enable = false; - manpages.enable = false; - }; -} diff --git a/modules/home/environment/default.nix b/modules/home/environment/default.nix deleted file mode 100644 index 4ca86528..00000000 --- a/modules/home/environment/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - imports = [ - # keep-sorted start - ./path.nix # set our path - ./shell.nix # enable our shell intergrations - ./variables.nix # set our environment variables - ./xdg.nix # set xdg expectations - # keep-sorted end - ]; -} diff --git a/modules/home/environment/path.nix b/modules/home/environment/path.nix deleted file mode 100644 index 803e19cd..00000000 --- a/modules/home/environment/path.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - lib, - pkgs, - config, - ... -}: -let - inherit (lib.lists) optional; -in -{ - home.sessionPath = [ - "${config.home.homeDirectory}/.local/bin" - ] - ++ optional pkgs.stdenv.hostPlatform.isDarwin "$GHOSTTY_BIN_DIR"; -} diff --git a/modules/home/environment/shell.nix b/modules/home/environment/shell.nix deleted file mode 100644 index 8fed15cf..00000000 --- a/modules/home/environment/shell.nix +++ /dev/null @@ -1,14 +0,0 @@ -# this file is used to enable or disable shell intergrations based on the shell itself -{ config, ... }: -{ - home.shell = { - # disable the global enable - enableShellIntegration = false; - - enableBashIntegration = config.programs.bash.enable; - enableIonIntegration = config.programs.ion.enable; - enableNushellIntegration = config.programs.nushell.enable; - enableZshIntegration = config.programs.zsh.enable; - enableFishIntegration = config.programs.fish.enable; - }; -} diff --git a/modules/home/environment/variables.nix b/modules/home/environment/variables.nix deleted file mode 100644 index 5a4a89ee..00000000 --- a/modules/home/environment/variables.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - config, - osConfig, - ... -}: -let - inherit (config.garden.programs) defaults; -in -{ - home.sessionVariables = { - EDITOR = defaults.editor; - GIT_EDITOR = defaults.editor; - VISUAL = defaults.editor; - TERMINAL = defaults.terminal; - SYSTEMD_PAGERSECURE = "true"; - PAGER = defaults.pager; - MANPAGER = defaults.manpager; - FLAKE = osConfig.garden.environment.flakePath; - DO_NOT_TRACK = 1; - }; - - programs.nushell.environmentVariables = config.home.sessionVariables; -} diff --git a/modules/home/environment/xdg.nix b/modules/home/environment/xdg.nix deleted file mode 100644 index c1f0b4e2..00000000 --- a/modules/home/environment/xdg.nix +++ /dev/null @@ -1,130 +0,0 @@ -{ - lib, - pkgs, - self, - config, - ... -}: -let - inherit (lib.modules) mkIf mkForce; - inherit (pkgs.stdenv.hostPlatform) isLinux; - - template = self.lib.template.xdg; - vars = template.user config.xdg; - - appsToAssoc = { - browser = { - app = "chromium-browser"; - mimeTypes = [ - "text/html" - "application/pdf" - "x-www-browser" - "x-scheme-handler/http" - "x-scheme-handler/https" - "x-scheme-handler/ftp" - "x-scheme-handler/about" - "x-scheme-handler/unknown" - ]; - }; - - code = { - app = "nvim"; - mimeTypes = [ - "application/json" - "text/english" - "text/plain" - "text/x-makefile" - "text/x-c++hdr" - "text/x-c++src" - "text/x-chdr" - "text/x-csrc" - "text/x-java" - "text/x-moc" - "text/x-pascal" - "text/x-tcl" - "text/x-tex" - "application/x-shellscript" - "text/x-c" - "text/x-c++" - ]; - }; - - media = { - app = "mpv"; - mimeTypes = [ - "video/*" - "audio/*" - ]; - }; - - images = { - app = "mpv"; - mimeTypes = [ "image/*" ]; - }; - - fileManager = { - app = "com.system76.CosmicFiles"; - mimeTypes = [ "inode/directory" ]; - }; - }; - - associations' = lib.concatMapAttrs ( - _: val: lib.listToAttrs (lib.map (mt: lib.nameValuePair mt "${val.app}.desktop") val.mimeTypes) - ) appsToAssoc; - - specifics = { - "x-scheme-handler/spotify" = [ "spotify.desktop" ]; - "x-scheme-handler/discord" = [ "discord.desktop" ]; - }; - - associations = associations' // specifics; -in -{ - home.preferXdgDirectories = true; - - xdg = { - enable = true; - - cacheHome = "${config.home.homeDirectory}/.cache"; - configHome = "${config.home.homeDirectory}/.config"; - dataHome = "${config.home.homeDirectory}/.local/share"; - stateHome = "${config.home.homeDirectory}/.local/state"; - - userDirs = mkIf isLinux { - enable = true; - createDirectories = true; - setSessionVariables = true; - - documents = "${config.home.homeDirectory}/documents"; - download = "${config.home.homeDirectory}/downloads"; - desktop = "${config.home.homeDirectory}/desktop"; - videos = "${config.home.homeDirectory}/media/videos"; - music = "${config.home.homeDirectory}/media/music"; - pictures = "${config.home.homeDirectory}/media/pictures"; - publicShare = "${config.home.homeDirectory}/public/share"; - templates = "${config.home.homeDirectory}/public/templates"; - - extraConfig = { - SCREENSHOTS = "${config.xdg.userDirs.pictures}/screenshots"; - DEV = "${config.home.homeDirectory}/dev"; - }; - }; - - mimeApps = { - enable = isLinux; - associations.added = associations; - defaultApplications = associations; - }; - - portal.enable = lib.mkForce false; - }; - - home.sessionVariables = vars // { - GNUPGHOME = mkForce vars.GNUPGHOME; - }; - - xdg.configFile = { - "npm/npmrc" = template.npmrc; - "python/pythonrc" = template.pythonrc; - }; -} diff --git a/modules/home/extras.nix b/modules/home/extras.nix deleted file mode 100644 index 9dcb22af..00000000 --- a/modules/home/extras.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ inputs, ... }: -{ - imports = [ - # # keep-sorted start - inputs.extersia.homeModules.default - # keep-sorted end - ]; -} diff --git a/modules/home/home.nix b/modules/home/home.nix deleted file mode 100644 index 674c2c6e..00000000 --- a/modules/home/home.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ lib, osConfig, ... }: -let - inherit (lib.modules) mkDefault; -in -{ - home.stateVersion = osConfig.garden.system.stateVersion; - - # reload system units when changing configs - systemd.user.startServices = mkDefault "sd-switch"; # or "legacy" if "sd-switch" breaks again - - # let HM manage itself when in standalone mode - programs.home-manager.enable = true; -} diff --git a/modules/home/profiles.nix b/modules/home/profiles.nix deleted file mode 100644 index 7492b7b8..00000000 --- a/modules/home/profiles.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ - lib, - config, - osClass, - osConfig, - ... -}: -let - inherit (lib.options) mkEnableOption; -in -{ - options.garden.profiles.media = { - creation.enable = mkEnableOption "media creation profile"; - streaming.enable = mkEnableOption "media streaming profile"; - - watching.enable = mkEnableOption "media watching profile" // { - default = config.garden.profiles.graphical.enable && osClass == "nixos"; - }; - }; - - config = { - garden.profiles = { - inherit (osConfig.garden.profiles) - graphical - headless - workstation - laptop - server - ; - }; - }; -} diff --git a/modules/home/programs/default.nix b/modules/home/programs/default.nix deleted file mode 100644 index 6004afd0..00000000 --- a/modules/home/programs/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - imports = [ - # keep-sorted start - ./defaults.nix - ./discord.nix - ./pentesting.nix - # keep-sorted end - ]; -} diff --git a/modules/home/programs/defaults.nix b/modules/home/programs/defaults.nix deleted file mode 100644 index 8554438b..00000000 --- a/modules/home/programs/defaults.nix +++ /dev/null @@ -1,62 +0,0 @@ -{ - lib, - osClass, - ... -}: -let - inherit (lib.attrsets) mapAttrs; - inherit (lib.options) mkOption; - inherit (lib.types) enum nullOr str; - - mkDefault = name: args: mkOption ({ description = "default ${name} for the system"; } // args); -in -{ - options.garden.programs.defaults = mapAttrs mkDefault { - shell = { - type = enum [ - "bash" - "zsh" - "fish" - "nushell" - ]; - default = if (osClass == "nixos") then "bash" else "zsh"; - }; - - terminal = { - type = enum [ - "ghostty" - "wezterm" - ]; - default = "ghostty"; - }; - - editor = { - type = enum [ - "nvim" - "codium" - ]; - default = "nvim"; - }; - - pager = { - type = str; - default = "less -FR"; - }; - - manpager = { - type = str; - default = "nvim +Man!"; - }; - - screenLocker = { - type = nullOr (enum [ - "swaylock" - "gtklock" - ]); - default = "gtklock"; - description = '' - The lockscreen module to be loaded by home-manager. - ''; - }; - }; -} diff --git a/modules/home/programs/discord.nix b/modules/home/programs/discord.nix deleted file mode 100644 index 4e4c4e88..00000000 --- a/modules/home/programs/discord.nix +++ /dev/null @@ -1,79 +0,0 @@ -{ - lib, - pkgs, - config, - ... -}: -let - inherit (lib.modules) mkIf mkMerge; - inherit (lib.options) mkEnableOption mkOption; - inherit (pkgs.stdenv.hostPlatform) isLinux isDarwin; - - cfg = config.programs.discord; - - settingsFormat = pkgs.formats.json { }; -in -{ - options.programs.discord = { - moonlight = { - enable = mkEnableOption "Moonlight support for Discord"; - - settings = mkOption { - inherit (settingsFormat) type; - default = { }; - description = "Settings for Moonlight"; - }; - }; - - vencord = { - enable = mkEnableOption "Vencord support for Discord"; - - settings = mkOption { - inherit (settingsFormat) type; - default = { }; - description = "Path to Vencord settings file"; - }; - }; - }; - - config = mkIf cfg.enable (mkMerge [ - (mkIf isDarwin { - programs.discord.package = null; - }) - - (mkIf isLinux { - programs.discord.package = pkgs.discord.override { - withMoonlight = cfg.moonlight.enable; - withVencord = cfg.vencord.enable; - }; - }) - - (mkIf (isLinux && cfg.moonlight.enable) { - xdg.configFile = { - "moonlight-mod/stable.json".source = - settingsFormat.generate "moonlight-settings.json" cfg.moonlight.settings; - }; - }) - - (mkIf (isDarwin && cfg.moonlight.enable) { - home.file = { - "Library/Application Support/moonlight-mod/stable.json".source = - settingsFormat.generate "moonlight-settings.json" cfg.moonlight.settings; - }; - }) - - (mkIf (isLinux && cfg.vencord.enable) { - xdg.configFile = { - "Vencord/settings/settings.json".source = - settingsFormat.generate "vencord-settings.json" cfg.vencord.settings; - }; - }) - - (mkIf (isDarwin && cfg.vencord.enable) { - home.file = { - "Library/Application Support/Vencord/settings/settings.json".source = - settingsFormat "vencord-settings.json" cfg.vencord.settings; - }; - }) - ]); -} diff --git a/modules/home/programs/pentesting.nix b/modules/home/programs/pentesting.nix deleted file mode 100644 index f9a1401c..00000000 --- a/modules/home/programs/pentesting.nix +++ /dev/null @@ -1,59 +0,0 @@ -# see also -# - https://pyrox0.github.io/arewehackersyet/ -# - https://github.com/NixOS/nixpkgs/issues/81418 -# - https://git.sr.ht/~pamplemousse/nix-utils for wordlists -{ - lib, - pkgs, - config, - ... -}: -let - inherit (lib.modules) mkIf; - inherit (lib.options) mkEnableOption; - - cfg = config.garden.profiles.pentesting; -in -{ - options.garden.profiles.pentesting.enable = - mkEnableOption "Enable packages designed for pentesting"; - - config = mkIf cfg.enable { - garden.packages = { - inherit (pkgs) - aircrack-ng # wifi tool - arping # arp tool - bettercap # mitm tool - binwalk # analyze binary blobs and executables - certgraph # ssl certificate graph crawler - crunch # wordlist generator - deepsecrets # find secrets in code - dnsenum # dns enumeration - enum4linux-ng # enumerate info from windows/samba - fcrackzip # zip password cracker - ghorg # mass clone git repos - hashcat # hash cracker - hcxtools # wifi capture and convert to hashcat/john - hcxdumptool # capture packets from wifi - iaito # gui for radare2 - john # hash cracker - ldapnomnom # ldap user brute force - msldapdump # ldap enumeration - nikto # web server scanner - nmap # network scanner - onesixtyone # snmp scanner - p0f # passive os fingerprinting - radare2 # reverse engineering framework - sqlmap # sql injection tool - sslscan # ssl scanner - testssl # ssl checker - tcpdump # dump network packets - thc-hydra # network logon cracker - theharvester # osint - wifite2 # wifi network auditor - wireshark # network traffic analyzer - zap # web app penetration testing - ; - }; - }; -} diff --git a/modules/home/secrets.nix b/modules/home/secrets.nix deleted file mode 100644 index 48892d9c..00000000 --- a/modules/home/secrets.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ - self, - name, - config, - inputs, - ... -}: -{ - imports = [ inputs.sops.homeManagerModules.sops ]; - - config = { - sops = { - defaultSopsFile = "${self}/secrets/${name}.yaml"; - age.keyFile = "${config.xdg.configHome}/sops/age/keys.txt"; - }; - }; -} diff --git a/modules/home/themes/default.nix b/modules/home/themes/default.nix deleted file mode 100644 index d7a5d36a..00000000 --- a/modules/home/themes/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - imports = [ - # keep-sorted start - ./fonts.nix - # keep-sorted end - ]; -} diff --git a/modules/home/themes/fonts.nix b/modules/home/themes/fonts.nix deleted file mode 100644 index 5d6b2b86..00000000 --- a/modules/home/themes/fonts.nix +++ /dev/null @@ -1,151 +0,0 @@ -{ - lib, - pkgs, - config, - ... -}: -let - inherit (lib.modules) mkIf; - inherit (lib.options) mkOption mkEnableOption; - inherit (lib.types) - str - int - package - nullOr - ; - - cfg = config.garden.style.fonts; -in -{ - options.garden.style.fonts = { - enable = mkEnableOption "fontconfig" // { - default = config.garden.profiles.graphical.enable; - }; - - name = mkOption { - type = str; - description = "The name of the font"; - default = "Maple Mono"; - }; - - italic = mkOption { - type = str; - description = "The name of the italic font"; - default = "Maple Mono Italic"; - }; - - bold = mkOption { - type = str; - description = "The name of the bold font"; - default = "Maple Mono Bold"; - }; - - bold-italic = mkOption { - type = str; - description = "The name of the bold italic font"; - default = "Maple Mono Bold Italic"; - }; - - package = mkOption { - type = nullOr package; - description = "The package that provides the font"; - default = pkgs.maple-mono.truetype; - }; - - size = mkOption { - type = int; - description = "The size of the font"; - default = 14; - }; - }; - - config = mkIf cfg.enable { - fonts.fontconfig = { - enable = true; - - # create all the fonts and set the fallback to the symbols nerd font - defaultFonts = { - monospace = [ - cfg.name - - # primary latin fallbacks - "Source Code Pro" - - # unicode coverage - "Noto Sans Mono" - "Noto Sans" - "Noto Serif" - - # CJK coverage - "Noto Sans CJK JP" - "Noto Sans CJK SC" - "Noto Sans CJK TC" - "Noto Sans CJK KR" - - # icon fonts - "Material Icons" - "Material Design Icons" - - # final fallback - "DejaVu Sans Mono" - ]; - - sansSerif = [ - cfg.name - - # primary latin fallbacks - "Inter" - "Source Sans 3" - - # unicode coverage - "Noto Sans" - - # CJK - "Noto Sans CJK JP" - "Noto Sans CJK SC" - "Noto Sans CJK TC" - "Noto Sans CJK KR" - - # icons - "Material Icons" - "Material Design Icons" - - # final fallback - "DejaVu Sans" - ]; - - serif = [ - cfg.name - - # latin serif - "Source Serif 4" - - # unicode coverage - "Noto Serif" - - # CJK - "Noto Serif CJK JP" - "Noto Serif CJK SC" - "Noto Serif CJK TC" - "Noto Serif CJK KR" - - # icons - "Material Icons" - "Material Design Icons" - - # final fallback - "DejaVu Serif" - ]; - - emoji = [ - "Twemoji Color Font" - "Noto Color Emoji" - ]; - }; - }; - - garden.packages = mkIf (cfg.package != null) { - ${cfg.package.name} = cfg.package; - }; - }; -} diff --git a/modules/nixos/extras.nix b/modules/nixos/extras.nix index c333523a..597834e6 100644 --- a/modules/nixos/extras.nix +++ b/modules/nixos/extras.nix @@ -3,7 +3,6 @@ imports = [ # keep-sorted start inputs.extersia.nixosModules.default - inputs.home-manager.nixosModules.home-manager # keep-sorted end ]; } diff --git a/modules/nixos/programs/hyprland.nix b/modules/nixos/programs/hyprland.nix index 2957545d..c45dc6c9 100644 --- a/modules/nixos/programs/hyprland.nix +++ b/modules/nixos/programs/hyprland.nix @@ -1,17 +1,9 @@ -{ - lib, - self, - config, - ... -}: +{ lib, ... }: let inherit (lib.modules) mkIf; - inherit (self.lib) anyHome; - - cond = anyHome config (conf: conf.wayland.windowManager.hyprland.enable); in { - config = mkIf cond { + config = mkIf true { programs.hyprland.enable = true; xdg.portal.wlr.enable = false; }; diff --git a/systems/amaterasu/users.nix b/systems/amaterasu/users.nix index 74fedc81..6f92deb1 100644 --- a/systems/amaterasu/users.nix +++ b/systems/amaterasu/users.nix @@ -1,18 +1,18 @@ { - home-manager.users.isabel = { - programs = { - discord.enable = true; - ghostty.enable = true; - chromium.enable = true; - obs-studio.enable = true; - fish.enable = true; - hyprland.enable = true; - quickshell.enable = true; - }; - - garden.profiles.media = { - creation.enable = true; - streaming.enable = true; - }; - }; + # home-manager.users.isabel = { + # programs = { + # discord.enable = true; + # ghostty.enable = true; + # chromium.enable = true; + # obs-studio.enable = true; + # fish.enable = true; + # hyprland.enable = true; + # quickshell.enable = true; + # }; + # + # garden.profiles.media = { + # creation.enable = true; + # streaming.enable = true; + # }; + # }; } -- 2.51.2