From 361d4f9e8f65a6df941cb089430fbf3a058304eb Mon Sep 17 00:00:00 2001 From: emmatherock Date: Sun, 9 Aug 2026 21:48:20 -0300 Subject: [PATCH] feat(plasma): integrate plasma-manager with custom Breeze decoration and shortcuts Add the plasma-manager flake input and wire it into home-manager, along with a custom breeze-enhanced KWin decoration package, KDE config (fonts, cursor theme, window rules), and .desktop entries for OBS/volctl/Warudo shortcut scripts. --- flake.lock | 82 +++++++++++------ flake.nix | 13 ++- home/emmatherock/home.nix | 1 + home/emmatherock/plasma.nix | 175 ++++++++++++++++++++++++++++++++++++ modules/desktop/plasma.nix | 3 +- pkgs/breeze-enhanced.nix | 43 +++++++++ 6 files changed, 285 insertions(+), 32 deletions(-) create mode 100644 home/emmatherock/plasma.nix create mode 100644 pkgs/breeze-enhanced.nix diff --git a/flake.lock b/flake.lock index 0b51760..532ec50 100644 --- a/flake.lock +++ b/flake.lock @@ -14,11 +14,11 @@ "sf-pro": "sf-pro" }, "locked": { - "lastModified": 1782587760, - "narHash": "sha256-I9PRLePA5QNKEyDFsN5eIVk0dxFRGAL0Z/LjOWnA75Y=", + "lastModified": 1786018145, + "narHash": "sha256-4cjJFmq6JC0Gk9wWt3aZzqovtmM9mikrDWjsBL2ZWu8=", "owner": "Lyndeno", "repo": "apple-fonts.nix", - "rev": "ce044f6829c6b3ccde9624116577ba2c173ca49d", + "rev": "66b5379c6a429ad4ea6ff3943cc1f651df55cc70", "type": "github" }, "original": { @@ -116,11 +116,11 @@ ] }, "locked": { - "lastModified": 1782949081, - "narHash": "sha256-vp6Y/Grm98ESt6ceOkWiHWyZRDV3J1RID4w+6NWK9yA=", + "lastModified": 1785627969, + "narHash": "sha256-4dtXQk/NMePegK/nWp5NSeuZKLATItOq61lpEvmXqGw=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "17c9d6cdfc60c64f4ee8d306f9bc0b4ccb51481e", + "rev": "427bf4bd9435fdf21321c8cc628c24efc14c0f7a", "type": "github" }, "original": { @@ -154,11 +154,11 @@ ] }, "locked": { - "lastModified": 1784913159, - "narHash": "sha256-JWq0BfjO4ktpH5USfQNQzdvHpIDT8fSKD5K7LvdMRFs=", + "lastModified": 1786031233, + "narHash": "sha256-TIDlLTLI1/pB7IqgjzcKQjpODQsZE2oII4XGG9B6KjI=", "owner": "nix-community", "repo": "home-manager", - "rev": "079a3b5d1aa6a719920a51316253b7d6dd22738d", + "rev": "7834e82588860aaf780cec1366524456a70898d7", "type": "github" }, "original": { @@ -176,11 +176,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1785008781, - "narHash": "sha256-8/sqtedCCZGZwQQYwvR2LcT+viE99rFOKrU0tcC/HLk=", + "lastModified": 1786236470, + "narHash": "sha256-eIRMdjSQKSUf5aug00ycVSsO+8kIVQy5bH+K28U9LfE=", "owner": "numtide", "repo": "llm-agents.nix", - "rev": "cef1a33548bebe53824e7216fe1766a6a79eed97", + "rev": "bd89b8dd8837cc8d3098524c7cfe08c884ad5569", "type": "github" }, "original": { @@ -210,11 +210,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1784949765, - "narHash": "sha256-MB+0noLfsYMoMsBkyG5CKYZmSk7dSXendvvjfQFUiPw=", + "lastModified": 1786241478, + "narHash": "sha256-K/jbo7rTV0jRcDdHKL9VxGURqH61OJcCat9al7q9oMg=", "owner": "nix-community", "repo": "nix-vscode-extensions", - "rev": "242a696abba55b45d577b5292e90b597284f5f85", + "rev": "c7e586ad09d79ab867b055b818d4122334ff6dfe", "type": "github" }, "original": { @@ -256,11 +256,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1784555310, - "narHash": "sha256-/FCliTPgiuV1owejZFNx3Ch9irdvkOfOFl+HHZ+DrtM=", + "lastModified": 1785975029, + "narHash": "sha256-X44cn5rzytELc3NNoQsh0aLkjWA/QzPfc6HPQmsG3sU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "421eebfd0ec7bccd4abe826ce62d7e6e83129493", + "rev": "70ce234312134a463ba7728e94da2486a1d237ac", "type": "github" }, "original": { @@ -288,11 +288,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1784796856, - "narHash": "sha256-wWFrV5/Qbm+lyt5x20E/bSbfJiGKMo4RCxZV8cl/WZI=", + "lastModified": 1786106723, + "narHash": "sha256-zDSUbpoeo/9ZmD2+wXnzxoo1+uhL8vxc0b8yuYMKYq0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e2587caef70cea85dd97d7daab492899902dbf5d", + "rev": "f13ff45afd1bb73e640eaa08a7066dbed07e3238", "type": "github" }, "original": { @@ -314,6 +314,29 @@ "url": "https://devimages-cdn.apple.com/design/resources/download/NY.dmg" } }, + "plasma-manager": { + "inputs": { + "home-manager": [ + "home-manager" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1785762349, + "narHash": "sha256-jZhZkzAwc7f3exzcTDJWP2WCAchCv0iNC3UF/QsahdQ=", + "owner": "nix-community", + "repo": "plasma-manager", + "rev": "a19a2a029fa180911bd89c554dca1616e10f4c1d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "plasma-manager", + "type": "github" + } + }, "root": { "inputs": { "apple-fonts": "apple-fonts", @@ -322,6 +345,7 @@ "nix-flatpak": "nix-flatpak", "nix-vscode-extensions": "nix-vscode-extensions", "nixpkgs": "nixpkgs_4", + "plasma-manager": "plasma-manager", "sidra": "sidra", "vscode-server": "vscode-server" } @@ -353,7 +377,7 @@ "sf-compact": { "flake": false, "locked": { - "narHash": "sha256-C2TR3mVBorgBfdP7+L0YDq1ctefH62+iEBi19zlEpLU=", + "narHash": "sha256-83JwqfF9O4+gemMQXWHLRg2GNz2jHxsej1F1IkM2dug=", "type": "file", "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Compact.dmg" }, @@ -401,7 +425,7 @@ "sf-pro": { "flake": false, "locked": { - "narHash": "sha256-56SORX7J5qTO9xrd4Zvgfwr8GBUrIzLc6pzg5C0c+zU=", + "narHash": "sha256-vINUEMyFmNzZRBOX2aQ4heScWur6RyA/MPmsqlMPIx4=", "type": "file", "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Pro.dmg" }, @@ -417,11 +441,11 @@ ] }, "locked": { - "lastModified": 1784302039, - "narHash": "sha256-uRjqY4XymGneNy2Yyr58QWwjzn7QjgAWBHh4kLU6684=", + "lastModified": 1785827118, + "narHash": "sha256-tS2eSSpa1uLPUyIAJBpf00+A9KSHpC92gKMLavmHuio=", "owner": "wimpysworld", "repo": "sidra", - "rev": "ead49318a80150a1e8e565ec236b6770b5c702d5", + "rev": "0597e5438fe98fef935cb528c2c9aa5db60171c9", "type": "github" }, "original": { @@ -453,11 +477,11 @@ ] }, "locked": { - "lastModified": 1784369104, - "narHash": "sha256-47cxbcZODibHv3rELFQ9vZly0vUNkND/atn/U7HLeb0=", + "lastModified": 1785945821, + "narHash": "sha256-NLSyTCW4K4ofhNBllt3omPasm6QpralXH1DBZOc91Dw=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "df3c0640565d04a0261253cdd89fce78ec50168a", + "rev": "ae7910970dddc408fe6ab1c8e4b277bb21d72dc0", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index db260c8..f412f94 100644 --- a/flake.nix +++ b/flake.nix @@ -12,6 +12,11 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + plasma-manager = { + url = "github:nix-community/plasma-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.home-manager.follows = "home-manager"; + }; nix-flatpak = { url = "github:gmodena/nix-flatpak/?ref=latest"; }; @@ -20,7 +25,7 @@ nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions"; }; - outputs = { self, nixpkgs, apple-fonts, home-manager, sidra, vscode-server, nix-vscode-extensions, ... }@inputs: { + outputs = { self, nixpkgs, apple-fonts, home-manager, plasma-manager, sidra, vscode-server, nix-vscode-extensions, ... }@inputs: { nixosConfigurations = { miku-homelab = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; @@ -34,10 +39,16 @@ { nixpkgs.overlays = [ inputs.nix-vscode-extensions.overlays.default + (final: prev: { + breeze-enhanced = final.kdePackages.callPackage ./pkgs/breeze-enhanced.nix { }; + }) ]; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit inputs; }; + home-manager.sharedModules = [ + plasma-manager.homeModules.plasma-manager + ]; home-manager.users.emmatherock = import ./home/emmatherock/home.nix; } ]; diff --git a/home/emmatherock/home.nix b/home/emmatherock/home.nix index 0ffdfe6..d89f972 100644 --- a/home/emmatherock/home.nix +++ b/home/emmatherock/home.nix @@ -8,6 +8,7 @@ ./git.nix ./media.nix ./packages.nix + ./plasma.nix ./shell.nix ./vscode.nix ]; diff --git a/home/emmatherock/plasma.nix b/home/emmatherock/plasma.nix new file mode 100644 index 0000000..8c229ee --- /dev/null +++ b/home/emmatherock/plasma.nix @@ -0,0 +1,175 @@ +{ config, pkgs, ... }: +{ + home.packages = [ pkgs.bibata-cursors pkgs.breeze-enhanced ]; + + programs.plasma = { + enable = true; + + shortcuts = { + + # Atajos personalizados para scripts propios (net.local.*) + "services/net.local.switch-obs-2.desktop"._launch = "F13"; + "services/net.local.switch-obs-3.desktop"._launch = "Meta+Ctrl+F8"; + "services/net.local.switch-obs-4.desktop"._launch = "Meta+Ctrl+F9"; + "services/net.local.switch-obs-5.desktop"._launch = "F15"; + "services/net.local.switch-obs-6.desktop"._launch = "Meta+Ctrl+F10"; + "services/net.local.switch-obs.desktop"._launch = "F14"; + "services/net.local.volctl-10.desktop"._launch = "F23"; + "services/net.local.volctl-11.desktop"._launch = "F20"; + "services/net.local.volctl-12.desktop"._launch = "F21"; + "services/net.local.volctl-7.desktop"._launch = "F18"; + "services/net.local.volctl-8.desktop"._launch = "F19"; + "services/net.local.volctl-9.desktop"._launch = "F22"; + "services/net.local.warudo-client-2.desktop"._launch = "F16"; + "services/net.local.warudo-client.desktop"._launch = "Meta+Ctrl+F7"; + "services/net.local.wpctl.desktop"._launch = "Alt+F18"; + }; + + configFile = { + + kdeglobals.General.XftAntialias = true; + kdeglobals.General.XftHintStyle = "hintslight"; + kdeglobals.General.XftSubPixel = "vbgr"; + kdeglobals.General.accentColorFromWallpaper = true; + kdeglobals.General.fixed = "SFMono Nerd Font,10,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,,0,0"; + kdeglobals.General.font = "SF Pro,10,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,,0,0"; + kdeglobals.General.menuFont = "SF Pro,10,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,,0,0"; + kdeglobals.General.smallestReadableFont = "SF Pro,8,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,,0,0"; + kdeglobals.General.toolBarFont = "SF Pro,10,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,,0,0"; + kdeglobals.WM.activeBackground = "39,44,49"; + kdeglobals.WM.activeBlend = "252,252,252"; + kdeglobals.WM.activeFont = "SF Pro,10,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,,0,0"; + kdeglobals.WM.activeForeground = "252,252,252"; + kdeglobals.WM.inactiveBackground = "32,36,40"; + kdeglobals.WM.inactiveBlend = "161,169,177"; + kdeglobals.WM.inactiveForeground = "161,169,177"; + + kiorc.Confirmations.ConfirmDelete = true; + + # Wallpaper del lockscreen: reemplazá esta ruta o usá config.home.homeDirectory + kscreenlockerrc."Greeter/Wallpaper/org.kde.image/General".Image = "${config.home.homeDirectory}/Imágenes/image.png"; + kscreenlockerrc."Greeter/Wallpaper/org.kde.image/General".PreviewImage = "${config.home.homeDirectory}/Imágenes/image.png"; + + kwinrc.Windows.PerOutputVirtualDesktops = true; + kwinrc.Xwayland.Scale = 1; + kwinrc."org.kde.kdecoration2".ButtonsOnLeft = "XIA"; + kwinrc."org.kde.kdecoration2".ButtonsOnRight = "SHME"; + kwinrc."org.kde.kdecoration2".theme = "BreezeEnhanced"; + + kxkbrc.Layout.Options = "fkeys:basic_13-24"; + kxkbrc.Layout.ResetOldOptions = true; + + plasma-localerc.Formats.LANG = "es_AR.UTF-8"; + }; + + window-rules = [ + { + description = "Warudo Editor"; + match = { + window-class = "steam_app_2079120"; + title = { value = "Warudo Editor"; type = "substring"; }; + machine = "localhost"; + window-types = [ "normal" ]; + }; + apply = { + maximizehoriz = true; + maximizevert = true; + }; + } + { + description = "Warudo (cualquier versión)"; + match = { + window-class = "steam_app_2079120"; + title = { value = "^Warudo [0-9]+\\.[0-9]+\\.[0-9]+$"; type = "regex"; }; + }; + apply = { + fullscreen = true; + }; + } + ]; + }; + + # .desktop entries para los scripts que llaman los shortcuts de arriba. + # rc2nix no captura esto — sin esto, los atajos no van a encontrar nada que ejecutar. + xdg.desktopEntries = { + "net.local.switch-obs" = { + name = "Overlay Scene 1"; + exec = ''switch-obs "Overlay Scene 1"''; + type = "Application"; + }; + "net.local.switch-obs-2" = { + name = "Game Scene - Left"; + exec = ''switch-obs "Game Scene - Left"''; + type = "Application"; + }; + "net.local.switch-obs-3" = { + name = "Game Scene - Right"; + exec = ''switch-obs "Game Scene - Right"''; + type = "Application"; + }; + "net.local.switch-obs-4" = { + name = "Overlay Scene 2"; + exec = ''switch-obs "Overlay Scene 2"''; + type = "Application"; + }; + "net.local.switch-obs-5" = { + name = "Brb Scene"; + exec = ''switch-obs "Brb Scene"''; + type = "Application"; + }; + "net.local.switch-obs-6" = { + name = "Chatting Scene"; + exec = ''switch-obs "Chatting Scene"''; + type = "Application"; + }; + + "net.local.volctl-7" = { + name = "music-chain -1"; + exec = "volctl music-chain -1"; + type = "Application"; + }; + "net.local.volctl-8" = { + name = "music-chain +1"; + exec = "volctl music-chain +1"; + type = "Application"; + }; + "net.local.volctl-9" = { + name = "discord-chain -1"; + exec = "volctl discord-chain -1"; + type = "Application"; + }; + "net.local.volctl-10" = { + name = "discord-chain +1"; + exec = "volctl discord-chain +1"; + type = "Application"; + }; + "net.local.volctl-11" = { + name = "misc-chain -1"; + exec = "volctl misc-chain -1"; + type = "Application"; + }; + "net.local.volctl-12" = { + name = "misc-chain +1"; + exec = "volctl misc-chain +1"; + type = "Application"; + }; + + "net.local.warudo-client" = { + name = "Warudo: lolping"; + exec = "warudo-client --action lolping"; + type = "Application"; + }; + "net.local.warudo-client-2" = { + name = "Warudo: calibrate"; + exec = "warudo-client --action calibrate"; + type = "Application"; + }; + + "net.local.wpctl" = { + name = "Mic Toggle"; + exec = "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; + type = "Application"; + }; + }; + +} diff --git a/modules/desktop/plasma.nix b/modules/desktop/plasma.nix index f180c59..6247fd6 100644 --- a/modules/desktop/plasma.nix +++ b/modules/desktop/plasma.nix @@ -1,4 +1,4 @@ -{ ... }: +{pkgs, ... }: { services.desktopManager.plasma6.enable = true; services.displayManager = { @@ -6,5 +6,4 @@ autoLogin = { enable = true; user = "emmatherock"; }; }; security.pam.services.login.enableKwallet = true; - } diff --git a/pkgs/breeze-enhanced.nix b/pkgs/breeze-enhanced.nix new file mode 100644 index 0000000..58a1c4e --- /dev/null +++ b/pkgs/breeze-enhanced.nix @@ -0,0 +1,43 @@ +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + kdePackages, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "breeze-enhanced"; + version = "6.5.0"; + + src = fetchFromGitHub { + owner = "tsujan"; + repo = "BreezeEnhanced"; + rev = "bf9ea179b06c8e398f69f47d83cae81110ef0cc8"; # tag V6.5 + hash = "sha256-yfN2SKJcGhPe4/7nvbRgLyux+b9rIQlm4lJINpV20Ys="; + }; + + nativeBuildInputs = [ + cmake + kdePackages.extra-cmake-modules + kdePackages.wrapQtAppsHook + ]; + + buildInputs = with kdePackages; [ + qtbase + kdecoration + kguiaddons + kwindowsystem + ki18n + kcmutils + ]; + + meta = { + description = "Enhanced version of the Breeze window decoration for KWin, pairs well with Kvantum themes"; + homepage = "https://github.com/tsujan/BreezeEnhanced"; + changelog = "https://github.com/tsujan/BreezeEnhanced/releases/tag/V${finalAttrs.version}"; + license = lib.licenses.gpl3Only; + platforms = lib.platforms.linux; + maintainers = [ ]; + }; +})