From 7bfaf91106dec1bf2fd8878819145596a703c1c9 Mon Sep 17 00:00:00 2001 From: Remy Moll Date: Tue, 8 Apr 2025 20:08:21 +0200 Subject: [PATCH] small qol fixes --- README.md | 2 ++ modules/home-manager/code.nix | 22 +++++++++--- modules/home-manager/fish.nix | 13 ++++--- .../hypr/hyprland-customization.nix | 1 + modules/home-manager/hypr/waybar.nix | 35 +++++++++++++++---- modules/home-manager/xdg-portals.nix | 23 ++++++------ modules/nixos/bluetooth.nix | 12 +++++-- modules/nixos/hyprland.nix | 2 ++ users/remy.nix | 32 +++++++++++++++++ 9 files changed, 113 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 246f540..001b0f5 100644 --- a/README.md +++ b/README.md @@ -63,3 +63,5 @@ TODO - disable root user - https://github.com/elifouts/Dotfiles - https://github.com/nomadics9/nixcfg - https://github.com/Daholli/nixos-config +- https://github.com/khaneliman/khanelinix +- https://github.com/NotAShelf/nyx diff --git a/modules/home-manager/code.nix b/modules/home-manager/code.nix index 4ff0efe..b03339e 100644 --- a/modules/home-manager/code.nix +++ b/modules/home-manager/code.nix @@ -16,6 +16,9 @@ ms-python.isort ms-python.debugpy ms-python.vscode-pylance + ms-toolsai.jupyter + ms-toolsai.vscode-jupyter-slideshow + ms-toolsai.jupyter-renderers # Nix language jnoortheen.nix-ide @@ -72,11 +75,12 @@ "terminal.external.linuxExec" = "kitty"; "workbench.startupEditor" = "newUntitledFile"; # "workbench.colorTheme" = "Default Light+"; - "github.copilot.editor.enableAutoCompletions" = true; - "github.copilot.advanced" = {}; - "github.copilot.enable" = { - "*" = true; - }; + + # Extension management + "extensions.autoCheckUpdates" = false; + "extensions.autoUpdate" = false; + "extensions.ignoreRecommendations" = true; + # git "git.ignoreMissingGitWarning" = true; @@ -87,7 +91,15 @@ "diffEditor.hideUnchangedRegions.enabled" = true; "diffEditor.ignoreTrimWhitespace" = false; + # Copilot + "github.copilot.editor.enableAutoCompletions" = true; + "github.copilot.advanced" = {}; + "github.copilot.enable" = { + "*" = true; + }; + # Python + "python.terminal.activateEnvironment" = false; # let nix-shell handle this "jupyter.disableJupyterAutoStart" = true; "jupyter.askForKernelRestart" = false; "workbench.editorAssociations" = { diff --git a/modules/home-manager/fish.nix b/modules/home-manager/fish.nix index 024591e..d5dbb08 100644 --- a/modules/home-manager/fish.nix +++ b/modules/home-manager/fish.nix @@ -1,9 +1,17 @@ -{pkgs, ...}: +{pkgs, ...}: { + # Required by the fzf fish plugin programs.fzf = { enable = true; }; + home.packages = with pkgs; [ + fd + bat + ]; + + + programs.fish = { enable = true; @@ -22,9 +30,6 @@ ]; }; - home.packages = [ - pkgs.fishPlugins.tide - ]; # sets the "default" shell to fish # actually keeps bash as a posix-compliant default but starts fish if the shell is not bash diff --git a/modules/home-manager/hypr/hyprland-customization.nix b/modules/home-manager/hypr/hyprland-customization.nix index ea437cb..91d504f 100644 --- a/modules/home-manager/hypr/hyprland-customization.nix +++ b/modules/home-manager/hypr/hyprland-customization.nix @@ -112,6 +112,7 @@ ]; exec-once = [ + "gnome-keyring-daemon --start --components=secrets" # "${pkgs.hyprpaper}/bin/hyprpaper" # hyprpaper is handled as its own service "${pkgs.waybar}/bin/waybar" diff --git a/modules/home-manager/hypr/waybar.nix b/modules/home-manager/hypr/waybar.nix index 077bb8d..ca60ed9 100644 --- a/modules/home-manager/hypr/waybar.nix +++ b/modules/home-manager/hypr/waybar.nix @@ -18,6 +18,7 @@ margin-bottom = 2; margin-left = 5; margin-right = 5; + layer = "top"; position = "top"; spacing = 5; @@ -34,12 +35,9 @@ modules-right = [ "tray" - # "temperature" - # "group/expand" - # "bluetooth" + "privacy" "wireplumber" "network" - # "mpd" "battery" "backlight" "idle_inhibitor" @@ -82,7 +80,6 @@ }; tooltip = "true"; }; - "bluetooth" = { format-on = "󰂯"; format-off = "BT-off"; @@ -91,7 +88,7 @@ format-alt = "{device_alias} 󰂯"; tooltip-format = "{controller_alias}\t{controller_address}\n\n{num_connections} connected"; tooltip-format-connected = "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}"; - tooltip-format-enumerate-connected = "{device_alias}\n{device_address}"; + tooltip-formaenumeratet-enumerate-connected = "{device_alias}\n{device_address}"; tooltip-format-enumerate-connected-battery = "{device_alias}\n{device_address}\n{device_battery_percentage}%"; on-click-right = "blueman-manager"; }; @@ -167,6 +164,28 @@ tooltip-format-disconnected = "Disconnected"; on-click = "XDG_CURRENT_DESKTOP=GNOME gnome-control-center wifi"; }; + "privacy" = { + icon-spacing = 4; + # icon-size" = 18; + transition-duration = 250; + modules = [ + { + type = "screenshare"; + tooltip = true; + # tooltip-icon-size = 24 + } + { + type = "audio-out"; + tooltip = true; + # tooltip-icon-size = 24 + } + { + type = "audio-in"; + tooltip = true; + # tooltip-icon-size = 24 + } + ]; + }; }; }; @@ -205,6 +224,10 @@ padding: 3px; } + #workspaces button { + color: #ffffff; + } + #battery.warning { background:rgba(240, 165, 0, 0.6); } diff --git a/modules/home-manager/xdg-portals.nix b/modules/home-manager/xdg-portals.nix index ab6c353..446788c 100644 --- a/modules/home-manager/xdg-portals.nix +++ b/modules/home-manager/xdg-portals.nix @@ -1,23 +1,22 @@ -{inputs, pkgs, ...}: +{inputs, pkgs, ...}: { xdg.enable = true; xdg.portal = { enable = true; - configPackages = [ pkgs.hyprland ]; + xdgOpenUsePortal = true; + + # configPackages = [ pkgs.hyprland ]; + config = { + common.default = ["gtk"]; + hyprland.default = ["gtk" "hyprland"]; + }; extraPortals = [ - pkgs.xdg-desktop-portal-gtk + pkgs.xdg-desktop-portal-gtk + pkgs.xdg-desktop-portal-wlr + pkgs.xdg-desktop-portal-hyprland ]; }; - - xdg.userDirs = { - enable = true; - createDirectories = true; - desktop = "Desktop"; - documents = "Documents"; - # downloads = "Downloads"; - pictures = "Pictures"; - }; } diff --git a/modules/nixos/bluetooth.nix b/modules/nixos/bluetooth.nix index b087ebc..9ee4728 100644 --- a/modules/nixos/bluetooth.nix +++ b/modules/nixos/bluetooth.nix @@ -1,4 +1,13 @@ { + config, + lib, + pkgs, + ... +}: +{ + environment.systemPackages = [ + pkgs.bluez + ]; hardware.bluetooth = { enable = true; powerOnBoot = false; @@ -14,5 +23,4 @@ }; }; }; - services.blueman.enable = true; -} \ No newline at end of file +} diff --git a/modules/nixos/hyprland.nix b/modules/nixos/hyprland.nix index c1e2dee..d2a0969 100644 --- a/modules/nixos/hyprland.nix +++ b/modules/nixos/hyprland.nix @@ -22,4 +22,6 @@ }; security.pam.services.hyprlock = {}; + security.pam.services.gdm.enableGnomeKeyring = true; + } diff --git a/users/remy.nix b/users/remy.nix index eb37487..85b812f 100644 --- a/users/remy.nix +++ b/users/remy.nix @@ -35,4 +35,36 @@ with lib.hm.gvariant; userName = "Remy Moll"; userEmail = "me@moll.re"; }; + + ## XDG configuration + xdg = { + userDirs = { + enable = true; + desktop = "Desktop"; + pictures = "Pictures"; + documents = "Documents"; + publicShare = null; + music = null; + templates = null; + }; + + mimeApps = { + enable = true; + defaultApplications = { + "inode/directory" = "org.gnome.Nautilus.desktop"; + "application/zip" = "org.gnome.FileRoller.desktop"; + "application/octet-stream" = "org.gnome.GHex.desktop"; + # pdfs + "application/pdf" = "org.gnome.Evince.desktop"; + # images + # "image/png" = "org.gnome.Evince.desktop"; + # "image/jpeg" = "org.gnome.Evince.desktop"; + # "image/gif" = "org.gnome.Evince.desktop"; + # "image/svg+xml" = "org.gnome.Evince.desktop"; + # "image/tiff" = "org.gnome.Evince.desktop"; + # text-based + "text/*" = "vscode.desktop"; + }; + }; + }; }