From fb367166a5aba22c1cb27369ae508d74ba198c3e Mon Sep 17 00:00:00 2001 From: Gabriella Bere Date: Tue, 15 Jul 2025 01:40:16 +0100 Subject: [PATCH] added plasma for testing purposes, updated flake seriously plasma is SO buggy the way i have it set up i just wanted to check if an issue was with hyprland or wayland in general, and it appears to be wayland lmao --- flake.lock | 84 +++++--- flake.nix | 7 + home-manager/home.nix | 1 + home-manager/packages.nix | 2 +- home-manager/plasma.nix | 280 +++++++++++++++++++++++++++ home-manager/zellij.nix | 2 - hosts/gabbielaptop/configuration.nix | 3 + modules/waydroid.nix | 4 +- 8 files changed, 349 insertions(+), 34 deletions(-) create mode 100644 home-manager/plasma.nix diff --git a/flake.lock b/flake.lock index 75dc121..8d126cb 100644 --- a/flake.lock +++ b/flake.lock @@ -338,11 +338,11 @@ ] }, "locked": { - "lastModified": 1752246954, - "narHash": "sha256-c1Rq5Hc4WZLKj1RkmjLFCcX4QHBwrL+DIZNMEHno7DU=", + "lastModified": 1752402455, + "narHash": "sha256-mCHfZhQKdTj2JhCFcqfOfa3uKZbwUkPQbd0/zPnhOE8=", "owner": "nix-community", "repo": "home-manager", - "rev": "e90b28967cacc64de7fb8742314ed0d7d12f47c6", + "rev": "bf893ad4cbf46610dd1b620c974f824e266cd1df", "type": "github" }, "original": { @@ -421,11 +421,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1752078530, - "narHash": "sha256-TrRmlYdhWcadWvBpDjB9Xlry4uT4ZUIO46d+o5tjtCQ=", + "lastModified": 1752421961, + "narHash": "sha256-9uTU9mZO3SOSKgn/Qz4RVJqwsoNpM1Bx2e7bNfHALs0=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "d231d92313192d4d0c78d6ef04167fed9dee87cf", + "rev": "c97425d44edb8879e8c4a3d1991e4442c03395ea", "type": "github" }, "original": { @@ -454,11 +454,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1750791124, - "narHash": "sha256-F5iVU/hjoSHSSe0gllxm0PcAaseEtGNanYK5Ha3k2Tg=", + "lastModified": 1752418007, + "narHash": "sha256-3DyujBgCewh7r5fz4L0ZRw28BJBqfqeDSVpeTud/aEU=", "owner": "YaLTeR", "repo": "niri", - "rev": "37458d94b288945f6cfbd3c5c233f634d59f246c", + "rev": "bb40a35ccf6edbe2c838686562cbdad1ef98ce72", "type": "github" }, "original": { @@ -501,11 +501,11 @@ }, "nixpkgs-master": { "locked": { - "lastModified": 1752249803, - "narHash": "sha256-mTFVVMvxP2w8oWjYEQJyZOYMTF0ElSO0lqitvsWM89E=", + "lastModified": 1752422695, + "narHash": "sha256-y8HQ2baUdXlp6z4N/PdRc4OoNaRDr76o74GuxCZnVg4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "41eb75c7167ba7d9e511158140c45e177e8dc173", + "rev": "a144e808919d8c3e547a25146f269a6805dffe0f", "type": "github" }, "original": { @@ -517,11 +517,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1751943650, - "narHash": "sha256-7orTnNqkGGru8Je6Un6mq1T8YVVU/O5kyW4+f9C1mZQ=", + "lastModified": 1752162966, + "narHash": "sha256-3MxxkU8ZXMHXcbFz7UE4M6qnIPTYGcE/7EMqlZNnVDE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "88983d4b665fb491861005137ce2b11a9f89f203", + "rev": "10e687235226880ed5e9f33f1ffa71fe60f2638a", "type": "github" }, "original": { @@ -533,11 +533,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1751943650, - "narHash": "sha256-7orTnNqkGGru8Je6Un6mq1T8YVVU/O5kyW4+f9C1mZQ=", + "lastModified": 1752162966, + "narHash": "sha256-3MxxkU8ZXMHXcbFz7UE4M6qnIPTYGcE/7EMqlZNnVDE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "88983d4b665fb491861005137ce2b11a9f89f203", + "rev": "10e687235226880ed5e9f33f1ffa71fe60f2638a", "type": "github" }, "original": { @@ -585,11 +585,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1752248434, - "narHash": "sha256-ud6xU5FlZSdi9RSPNIt+NWdZ3MmFGfQj4VoC7AQF+I0=", + "lastModified": 1752421718, + "narHash": "sha256-epf+PdlVdvMLgXpCN9qtEPBjKlQc5VrjcnjIuxcfj9g=", "owner": "nix-community", "repo": "NUR", - "rev": "db699ccf4981f144e5200406f717a72e6751a0e2", + "rev": "e38a134b32b1a9b1dc96a3e8c549467e7329024a", "type": "github" }, "original": { @@ -634,11 +634,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1752180730, - "narHash": "sha256-aSmib/P5DWXrpOdwFOo+lxuupUlNTGUDsLVSxJwWfUg=", + "lastModified": 1752417534, + "narHash": "sha256-06CASFKAxc81QycTSsTw26EJOKi6VgMie6wp0ZUnvqE=", "owner": "notashelf", "repo": "nvf", - "rev": "8ea010d7e3bf00c2a1f24d52da88afaed87d96f5", + "rev": "5e2df2dd5b83c07bad3d5e17dc056b52541ecb9c", "type": "github" }, "original": { @@ -647,6 +647,29 @@ "type": "github" } }, + "plasma-manager": { + "inputs": { + "home-manager": [ + "home-manager" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1748196248, + "narHash": "sha256-1iHjsH6/5UOerJEoZKE+Gx1BgAoge/YcnUsOA4wQ/BU=", + "owner": "nix-community", + "repo": "plasma-manager", + "rev": "b7697abe89967839b273a863a3805345ea54ab56", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "plasma-manager", + "type": "github" + } + }, "pre-commit-hooks-nix": { "inputs": { "flake-compat": [ @@ -687,6 +710,7 @@ "nixpkgs-stable": "nixpkgs-stable_2", "nur": "nur", "nvf": "nvf", + "plasma-manager": "plasma-manager", "satisfactory-server": "satisfactory-server", "stylix": "stylix" } @@ -775,11 +799,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1752250117, - "narHash": "sha256-zCPV1a8w9hRn5ukOQwaAggA3X5cMmVsZVBYo8wLfLuU=", + "lastModified": 1752422722, + "narHash": "sha256-4iP54tgAYwpZwdA67Z1b4QH7+SK4BG9aCQZrrh0pGFw=", "owner": "nix-community", "repo": "stylix", - "rev": "0da583a359fd911d5cbfd2c789424b888b777a4b", + "rev": "2947a83755d206553fb88116058f5322f3bc2d0e", "type": "github" }, "original": { @@ -919,11 +943,11 @@ "xwayland-satellite-unstable": { "flake": false, "locked": { - "lastModified": 1751228685, - "narHash": "sha256-MENtauGBhJ+kDeFaawvWGXaFG3Il6qQzjaP0RmtfM0k=", + "lastModified": 1752338000, + "narHash": "sha256-Fxlp/yKtynug0jyuauAmvZU2SzHCfwlwWf85j+IvQ0U=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "557ebeb616e03d5e4a8049862bbbd1f02c6f020b", + "rev": "ba78881a68182ce338041846164cbfed0d70935c", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 719f88c..41f926c 100644 --- a/flake.nix +++ b/flake.nix @@ -55,6 +55,12 @@ url = "github:sodiboo/niri-flake"; inputs.nixpkgs.follows = "nixpkgs"; }; + + plasma-manager = { + url = "github:nix-community/plasma-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.home-manager.follows = "home-manager"; + }; }; outputs = @@ -156,6 +162,7 @@ inputs.nix-flatpak.homeManagerModules.nix-flatpak inputs.niri.homeModules.niri inputs.niri.homeModules.stylix + inputs.plasma-manager.homeManagerModules.plasma-manager ]; }; # set formatter, using nixfmt-tree here diff --git a/home-manager/home.nix b/home-manager/home.nix index 7eb571b..e8ee01b 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -22,6 +22,7 @@ ./zellij.nix ./obs-studio.nix ./packages.nix + ./plasma.nix ]; home.stateVersion = "24.05"; diff --git a/home-manager/packages.nix b/home-manager/packages.nix index 6e1c4a2..450095f 100644 --- a/home-manager/packages.nix +++ b/home-manager/packages.nix @@ -14,7 +14,7 @@ stable.jetbrains.idea-community # IDE telegram-desktop # Telegram messenger client pavucontrol # Useful audio control GUI - stable.prismlauncher # Minecraft launcher + prismlauncher # Minecraft launcher bat # cat but with syntax highlighting bc # terminal calculator wget # download files diff --git a/home-manager/plasma.nix b/home-manager/plasma.nix new file mode 100644 index 0000000..ca6b172 --- /dev/null +++ b/home-manager/plasma.nix @@ -0,0 +1,280 @@ +{ pkgs, ... }: +{ + programs.plasma = { + enable = true; + + hotkeys.commands."launch-konsole" = { + name = "Launch Konsole"; + key = "Meta+Alt+K"; + command = "konsole"; + }; + + fonts = { + general = { + family = "JetBrains Mono"; + pointSize = 12; + }; + }; + + desktop.widgets = [ + { + plasmusicToolbar = { + position = { + horizontal = 51; + vertical = 100; + }; + size = { + width = 250; + height = 250; + }; + }; + } + ]; + + panels = [ + # Windows-like panel at the bottom + { + location = "bottom"; + widgets = [ + # We can configure the widgets by adding the name and config + # attributes. For example to add the the kickoff widget and set the + # icon to "nix-snowflake-white" use the below configuration. This will + # add the "icon" key to the "General" group for the widget in + # ~/.config/plasma-org.kde.plasma.desktop-appletsrc. + { + name = "org.kde.plasma.kickoff"; + config = { + General = { + icon = "nix-snowflake-white"; + alphaSort = true; + }; + }; + } + # Or you can configure the widgets by adding the widget-specific options for it. + # See modules/widgets for supported widgets and options for these widgets. + # For example: + { + kickoff = { + sortAlphabetically = true; + icon = "nix-snowflake-white"; + }; + } + # Adding configuration to the widgets can also for example be used to + # pin apps to the task-manager, which this example illustrates by + # pinning dolphin and konsole to the task-manager by default with widget-specific options. + { + iconTasks = { + launchers = [ + "applications:org.kde.dolphin.desktop" + "applications:org.kde.konsole.desktop" + ]; + }; + } + # Or you can do it manually, for example: + { + name = "org.kde.plasma.icontasks"; + config = { + General = { + launchers = [ + "applications:org.kde.dolphin.desktop" + "applications:org.kde.konsole.desktop" + ]; + }; + }; + } + # If no configuration is needed, specifying only the name of the + # widget will add them with the default configuration. + "org.kde.plasma.marginsseparator" + # If you need configuration for your widget, instead of specifying the + # the keys and values directly using the config attribute as shown + # above, plasma-manager also provides some higher-level interfaces for + # configuring the widgets. See modules/widgets for supported widgets + # and options for these widgets. The widgets below shows two examples + # of usage, one where we add a digital clock, setting 12h time and + # first day of the week to Sunday and another adding a systray with + # some modifications in which entries to show. + { + digitalClock = { + calendar.firstDayOfWeek = "sunday"; + time.format = "12h"; + }; + } + { + systemTray.items = { + # We explicitly show bluetooth and battery + shown = [ + "org.kde.plasma.battery" + "org.kde.plasma.bluetooth" + ]; + # And explicitly hide networkmanagement and volume + hidden = [ + "org.kde.plasma.networkmanagement" + "org.kde.plasma.volume" + ]; + }; + } + ]; + hiding = "none"; + } + # Application name, Global menu and Song information and playback controls at the top + { + location = "top"; + height = 26; + widgets = [ + { + applicationTitleBar = { + behavior = { + activeTaskSource = "activeTask"; + }; + layout = { + elements = [ "windowTitle" ]; + horizontalAlignment = "left"; + showDisabledElements = "deactivated"; + verticalAlignment = "center"; + }; + overrideForMaximized.enable = false; + titleReplacements = [ + { + type = "regexp"; + originalTitle = "^Brave Web Browser$"; + newTitle = "Brave"; + } + { + type = "regexp"; + originalTitle = ''\\bDolphin\\b''; + newTitle = "File manager"; + } + ]; + windowTitle = { + font = { + bold = false; + fit = "fixedSize"; + size = 12; + }; + hideEmptyTitle = true; + margins = { + bottom = 0; + left = 10; + right = 5; + top = 0; + }; + source = "appName"; + }; + }; + } + "org.kde.plasma.appmenu" + "org.kde.plasma.panelspacer" + { + plasmusicToolbar = { + panelIcon = { + albumCover = { + useAsIcon = false; + radius = 8; + }; + icon = "view-media-track"; + }; + playbackSource = "auto"; + musicControls.showPlaybackControls = true; + songText = { + displayInSeparateLines = true; + maximumWidth = 640; + scrolling = { + behavior = "alwaysScroll"; + speed = 3; + }; + }; + }; + } + ]; + } + ]; + + window-rules = [ + { + description = "Dolphin"; + match = { + window-class = { + value = "dolphin"; + type = "substring"; + }; + window-types = [ "normal" ]; + }; + apply = { + noborder = { + value = true; + apply = "force"; + }; + # `apply` defaults to "apply-initially" + maximizehoriz = true; + maximizevert = true; + }; + } + ]; + + powerdevil = { + AC = { + powerButtonAction = "lockScreen"; + autoSuspend = { + action = "shutDown"; + idleTimeout = 1000; + }; + turnOffDisplay = { + idleTimeout = 1000; + idleTimeoutWhenLocked = "immediately"; + }; + }; + battery = { + powerButtonAction = "sleep"; + whenSleepingEnter = "standbyThenHibernate"; + }; + lowBattery = { + whenLaptopLidClosed = "hibernate"; + }; + }; + + kwin = { + edgeBarrier = 0; # Disables the edge-barriers introduced in plasma 6.1 + cornerBarrier = false; + + scripts.polonium.enable = true; + }; + + kscreenlocker = { + lockOnResume = true; + timeout = 10; + }; + + # + # Some mid-level settings: + # + shortcuts = { + ksmserver = { + "Lock Session" = [ + "Screensaver" + "Meta+Ctrl+Alt+L" + ]; + }; + + kwin = { + "Expose" = "Meta+,"; + "Switch Window Down" = "Meta+J"; + "Switch Window Left" = "Meta+H"; + "Switch Window Right" = "Meta+L"; + "Switch Window Up" = "Meta+K"; + }; + }; + + # + # Some low-level settings: + # + configFile = { + baloofilerc."Basic Settings"."Indexing-Enabled" = false; + kwinrc."org.kde.kdecoration2".ButtonsOnLeft = "SF"; + kwinrc.Desktops.Number = { + value = 8; + # Forces kde to not change this value (even through the settings app). + immutable = true; + }; + }; + }; +} diff --git a/home-manager/zellij.nix b/home-manager/zellij.nix index b8714c0..77af09c 100644 --- a/home-manager/zellij.nix +++ b/home-manager/zellij.nix @@ -2,7 +2,5 @@ { programs.zellij = { enable = true; - exitShellOnExit = true; - attachExistingSession = true; }; } diff --git a/hosts/gabbielaptop/configuration.nix b/hosts/gabbielaptop/configuration.nix index b088324..673f89a 100644 --- a/hosts/gabbielaptop/configuration.nix +++ b/hosts/gabbielaptop/configuration.nix @@ -85,6 +85,9 @@ # Enable the Hyprland WM functionality for NixOS (xdg portals etc.) programs.hyprland.enable = true; + # Enable plasma 6 + services.desktopManager.plasma6.enable = true; + # Enable fwupd for BIOS updates services.fwupd.enable = true; diff --git a/modules/waydroid.nix b/modules/waydroid.nix index 00ff0d9..3e8838b 100644 --- a/modules/waydroid.nix +++ b/modules/waydroid.nix @@ -1,3 +1,5 @@ { - virtualisation.waydroid.enable = true; + virtualisation.waydroid = { + enable = true; + }; }