From 392a96f32fe6e3023e461f383e3b995e570f6d78 Mon Sep 17 00:00:00 2001 From: Pedro Rey Anca Date: Sun, 21 Jul 2024 13:10:42 +0200 Subject: [PATCH 1/5] FIx environment variables --- modules/core/default.nix | 1 - modules/core/variables.nix | 4 ---- modules/core/wayland.nix | 2 ++ modules/home/hyprland/config.nix | 3 --- modules/home/hyprland/variables.nix | 12 +++++++++--- 5 files changed, 11 insertions(+), 11 deletions(-) delete mode 100644 modules/core/variables.nix diff --git a/modules/core/default.nix b/modules/core/default.nix index 3f53b87..849878a 100644 --- a/modules/core/default.nix +++ b/modules/core/default.nix @@ -20,6 +20,5 @@ ++ [(import ./system.nix)] ++ [(import ./user.nix)] ++ [(import ./wayland.nix)] - ++ [(import ./variables.nix)] ++ [(import ./virtualisation.nix)]; } diff --git a/modules/core/variables.nix b/modules/core/variables.nix deleted file mode 100644 index 8dbaeef..0000000 --- a/modules/core/variables.nix +++ /dev/null @@ -1,4 +0,0 @@ -{...}: { - environment.sessionVariables.NIXOS_OZONE_WL = "1"; - environment.sessionVariables.XKB_DEFAULT_LAYOUT = "es"; -} diff --git a/modules/core/wayland.nix b/modules/core/wayland.nix index beb5b28..d2619a1 100644 --- a/modules/core/wayland.nix +++ b/modules/core/wayland.nix @@ -25,4 +25,6 @@ background.path = pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom.gnomeFilePath; }; }; + + environment.sessionVariables.XKB_DEFAULT_LAYOUT = "es"; } diff --git a/modules/home/hyprland/config.nix b/modules/home/hyprland/config.nix index 06ad500..4ecd1fc 100644 --- a/modules/home/hyprland/config.nix +++ b/modules/home/hyprland/config.nix @@ -3,9 +3,6 @@ settings = { # autostart exec-once = [ - "systemctl --user import-environment &" - "hash dbus-update-activation-environment 2>/dev/null &" - "dbus-update-activation-environment --systemd --all &" "nm-applet &" "wl-clip-persist --clipboard both &" "bash -c 'if [ ! -f ~/.config/hypr/wallpaper.png ]; then wall-change ~/.config/hypr/default_wallpaper.png; fi'" diff --git a/modules/home/hyprland/variables.nix b/modules/home/hyprland/variables.nix index 4b73662..7c22466 100644 --- a/modules/home/hyprland/variables.nix +++ b/modules/home/hyprland/variables.nix @@ -1,4 +1,8 @@ -{...}: { +{ + lib, + config, + ... +}: { home.sessionVariables = { NIXOS_OZONE_WL = "1"; ELECTRON_OZONE_PLATFORM_HINT = "auto"; @@ -13,16 +17,18 @@ WLR_DRM_NO_ATOMIC = "1"; QT_AUTO_SCREEN_SCALE_FACTOR = "1"; QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; - QT_QPA_PLATFORM = "xcb"; + QT_QPA_PLATFORM = "wayland"; QT_QPA_PLATFORMTHEME = "qt5ct"; QT_STYLE_OVERRIDE = "kvantum"; MOZ_ENABLE_WAYLAND = "1"; WLR_BACKEND = "vulkan"; - WLR_RENDERER = "vulkan"; WLR_NO_HARDWARE_CURSORS = "1"; XDG_SESSION_TYPE = "wayland"; SDL_VIDEODRIVER = "wayland"; CLUTTER_BACKEND = "wayland"; GTK_THEME = "Dracula"; }; + + wayland.windowManager.hyprland.systemd.variables = ["--all"]; + wayland.windowManager.hyprland.settings.env = lib.attrsets.mapAttrsToList (name: value: "${name},${builtins.toString value}") config.home.sessionVariables; } From 3b2d7e021d3fb5e9a5b9ac9ebb4679cf3cea91d4 Mon Sep 17 00:00:00 2001 From: Pedro Rey Anca Date: Sun, 21 Jul 2024 13:11:15 +0200 Subject: [PATCH 2/5] Update Regreet config --- modules/core/wayland.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/core/wayland.nix b/modules/core/wayland.nix index d2619a1..a0bc9f4 100644 --- a/modules/core/wayland.nix +++ b/modules/core/wayland.nix @@ -22,8 +22,12 @@ programs.regreet = { enable = true; settings = { - background.path = pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom.gnomeFilePath; + background = { + path = pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom.gnomeFilePath; + fit = "Cover"; + }; }; + cageArgs = ["-s" "-m" "last"]; # Only show on the last monitor }; environment.sessionVariables.XKB_DEFAULT_LAYOUT = "es"; From 82ea4a75aef5c6535e2aecfacc1ded33d71a2aba Mon Sep 17 00:00:00 2001 From: Pedro Rey Anca Date: Sun, 21 Jul 2024 13:43:28 +0200 Subject: [PATCH 3/5] Disable xray --- modules/home/hyprland/config.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/hyprland/config.nix b/modules/home/hyprland/config.nix index 4ecd1fc..cd7f3d8 100644 --- a/modules/home/hyprland/config.nix +++ b/modules/home/hyprland/config.nix @@ -82,7 +82,7 @@ ignore_opacity = true; noise = 0; new_optimizations = true; - xray = true; + xray = false; }; drop_shadow = true; From c4d22b94a644370fb5d362aaab6a181171317eef Mon Sep 17 00:00:00 2001 From: Pedro Rey Anca Date: Sun, 21 Jul 2024 13:44:10 +0200 Subject: [PATCH 4/5] Configure QT --- modules/home/default.nix | 1 + modules/home/qt.nix | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 modules/home/qt.nix diff --git a/modules/home/default.nix b/modules/home/default.nix index 5ea8ae1..b9e8828 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -24,6 +24,7 @@ ++ [(import ./scripts/scripts.nix)] # personal scripts ++ [(import ./spotify.nix)] ++ [(import ./starship.nix)] # shell prompt + ++ [(import ./qt.nix)] ++ [(import ./vscodium.nix)] # vscode forck ++ [(import ./waybar)] # status bar ++ [(import ./zsh.nix)]; # shell diff --git a/modules/home/qt.nix b/modules/home/qt.nix new file mode 100644 index 0000000..69c5c59 --- /dev/null +++ b/modules/home/qt.nix @@ -0,0 +1,17 @@ +{pkgs, ...}: { + qt.enable = true; + qt.platformTheme.name = "qtct"; + qt.style.name = "kvantum"; + + home.packages = with pkgs; [ + libsForQt5.qtstyleplugin-kvantum + ]; + + xdg.configFile."Kvantum/kvantum.kvconfig".source = (pkgs.formats.ini {}).generate "kvantum.kvconfig" { + General.theme = "Catppuccin-Mocha-Lavender"; + }; + xdg.configFile."Kvantum/Catppuccin-Mocha-Lavender".source = "${(pkgs.catppuccin-kvantum.override { + accent = "Lavender"; + variant = "Mocha"; + })}/share/Kvantum/Catppuccin-Mocha-Lavender"; +} From 02225c295a37b918e77feb122355c17ea5bacf5c Mon Sep 17 00:00:00 2001 From: Pedro Rey Anca Date: Sun, 21 Jul 2024 13:44:30 +0200 Subject: [PATCH 5/5] Add Kde Connect --- modules/core/programs.nix | 1 + modules/home/default.nix | 1 + modules/home/kdeconnect.nix | 6 ++++++ 3 files changed, 8 insertions(+) create mode 100644 modules/home/kdeconnect.nix diff --git a/modules/core/programs.nix b/modules/core/programs.nix index 8d3ec88..07b9407 100644 --- a/modules/core/programs.nix +++ b/modules/core/programs.nix @@ -13,4 +13,5 @@ programs.nix-ld.enable = true; programs.nix-ld.libraries = with pkgs; []; programs.adb.enable = true; + programs.kdeconnect.enable = true; } diff --git a/modules/home/default.nix b/modules/home/default.nix index b9e8828..9a2ce67 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -15,6 +15,7 @@ ++ [(import ./git.nix)] # version control ++ [(import ./gtk.nix)] # gtk theme ++ [(import ./hyprland)] # window manager + ++ [(import ./kdeconnect.nix)] ++ [(import ./kitty.nix)] # terminal ++ [(import ./swaync/swaync.nix)] # notification deamon ++ [(import ./nextcloud.nix)] # nextcloud client diff --git a/modules/home/kdeconnect.nix b/modules/home/kdeconnect.nix new file mode 100644 index 0000000..338f2b5 --- /dev/null +++ b/modules/home/kdeconnect.nix @@ -0,0 +1,6 @@ +{pkgs, ...}: { + services.kdeconnect = { + enable = true; + indicator = true; + }; +}