From ec7429d3846284d06c9c77cedaae6ea483e06479 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Sun, 23 Mar 2025 14:58:05 +0100 Subject: [PATCH] trying several things in order to figure out why plasma-manager is not co-operating... --- flake.nix | 10 ----- modules/home/desktop/plasma.nix | 55 ++++++++++++++++++----- modules/home/desktop/terminal/ghostty.nix | 4 +- modules/home/themes/default.nix | 9 +--- shell.nix | 22 --------- 5 files changed, 48 insertions(+), 52 deletions(-) delete mode 100644 shell.nix diff --git a/flake.nix b/flake.nix index 6211323..7ad63ca 100644 --- a/flake.nix +++ b/flake.nix @@ -72,18 +72,8 @@ unstable = pkgs-unstable; my = self.packages.${system}; }; - -# nvfetcher = final: prev: { -# sources = -# builtins.mapAttrs (_: p: p.src) -# ((import ./packages/_sources/generated.nix) { -# inherit (final) fetchurl fetchgit fetchFromGitHub dockerTools; -# }); -# }; }; -# packages."${system}" = mapModules ./packages (p: pkgs.callPackage p {}); - nixosModules = { sneeuwvlok = import ./.; diff --git a/modules/home/desktop/plasma.nix b/modules/home/desktop/plasma.nix index 7b30c96..54017fa 100644 --- a/modules/home/desktop/plasma.nix +++ b/modules/home/desktop/plasma.nix @@ -1,6 +1,5 @@ -{ config, options, lib, pkgs, user, ... }: +{ inputs, config, lib, pkgs, user, ... }: let - inherit (lib.meta) getExe; inherit (lib.modules) mkIf; cfg = config.modules.${user}.desktop.plasma; @@ -20,10 +19,20 @@ in }; config = mkIf cfg.enable { + environment.systemPackages = with pkgs.kdePackages; [ + kcoreaddons + ]; + + # environment.plasma6.excludePackages = with pkgs.kdePackages; [ konsole kate ghostwriter oxygen ]; + environment.sessionVariables.NIXOS_OZONE_WL = "1"; + services = { + xserver.enable = true; + desktopManager.plasma6.enable = true; displayManager = { + defaultSession = "plasma"; sddm = { enable = true; wayland.enable = true; @@ -35,19 +44,22 @@ in }; }; - environment.sessionVariables.NIXOS_OZONE_WL = "1"; - - environment.plasma6.excludePackages = with pkgs.kdePackages; [ konsole kate ghostwriter ]; - # should enable theme integration with gtk apps (i.e. firefox, thunderbird) programs.dconf.enable = true; + home-manager = { + sharedModules = [ + inputs.plasma-manager.homeManagerModules.plasma-manager + ]; + }; + home-manager.users.${user}.programs.plasma = { enable = true; - immutableByDefault = true; - + immutableByDefault = false; + windows.allowWindowsToRememberPositions = true; + workspace = { - lookAndFeel = "org.kde.breezedark.desktop"; + colorScheme = "CatppuccinMocha"; }; spectacle.shortcuts = { @@ -120,12 +132,23 @@ in autoSuspend.action = "nothing"; dimDisplay.enable = false; + turnOffDisplay = { + idleTimeout = "never"; + }; + }; + lowBattery = { + powerButtonAction = "shutDown"; + whenLaptopLidClosed = "doNothing"; + + autoSuspend.action = "nothing"; + dimDisplay.enable = false; + turnOffDisplay = { idleTimeout = "never"; }; }; }; - + kscreenlocker = { autoLock = false; lockOnResume = false; @@ -146,6 +169,18 @@ in XftSubPixel = "rgb"; }; }; + kwalletrc = { + Wallet.Enabled = false; + }; + plasmarc = { + General = { + RaiseMaximumVolume = true; + VolumeStep = 2; + }; + }; + kcminputrc = { + Keyboard.NumLock.value = 0; + }; }; }; }; diff --git a/modules/home/desktop/terminal/ghostty.nix b/modules/home/desktop/terminal/ghostty.nix index 5b974d6..1133e2b 100644 --- a/modules/home/desktop/terminal/ghostty.nix +++ b/modules/home/desktop/terminal/ghostty.nix @@ -25,8 +25,8 @@ in { enable = true; settings = { background-blur-radius = 20; - theme = "dark:everforest,light:everforest"; - window-theme = "dark"; + theme = "dark:stylix,light:stylix"; + window-theme = config.stylix.polarity; background-opacity = 0.8; minimum-contrast = 1.1; }; diff --git a/modules/home/themes/default.nix b/modules/home/themes/default.nix index aaa51f7..f782abc 100644 --- a/modules/home/themes/default.nix +++ b/modules/home/themes/default.nix @@ -35,19 +35,12 @@ in { stylix = { enable = true; + autoEnable = true; base16Scheme = "${pkgs.base16-schemes}/share/themes/${cfg.theme}.yaml"; image = ./${cfg.theme}.jpg; polarity = cfg.polarity; - targets = { - grub.enable = true; - plymouth.enable = true; - console.enable = true; - nixos-icons.enable = true; - qt.enable = true; - }; - fonts = { serif = { package = pkgs.dejavu_fonts; diff --git a/shell.nix b/shell.nix deleted file mode 100644 index 22a29d0..0000000 --- a/shell.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ lib, pkgs ? import {} }: -let - inherit (lib.attrsets) attrValues; - inherit (lib.meta) getExe; -in - pkgs.mkShell { - buildInputs = attrValues { - inherit (pkgs) git nix-bash-completions; - }; - - shellHook = let - inherit (pkgs) nixStable writeShelScriptBin; - - nixBin = writeShellScriptBin "nix" '' - ${ getExe nixStable} --option experimental-features "nix-command flakes" "$@" - ''; - in '' - export FLAKE="$(pwd)" - export PATH="$FLAKE/bin:${nixBin}/bin:$PATH" - ''; - } -