FINALLY, it was stylix that was breaking the desktop!!!

This commit is contained in:
Chris Kruining 2025-03-23 16:12:22 +01:00
parent ec7429d384
commit 32f2213e88
Signed by: chris
SSH key fingerprint: SHA256:nG82MUfuVdRVyCKKWqhY+pCrbz9nbX6uzUns4RKa1Pg
10 changed files with 317 additions and 234 deletions

View file

@ -1,26 +0,0 @@
{ inputs, config, lib, pkgs, ... }:
let
inherit (builtins) toString;
inherit (lib.modules) mkAliasOptionModule mkIf;
inherit (lib.my) mapModulesRec' mapModules mkSysUser mkHmUser;
in
{
imports = [
inputs.sops-nix.nixosModules.sops
];
config = {
nix.settings.experimental-features = [ "nix-command" "flakes" ];
environment.variables = {
NIXPKGS_ALLOW_UNFREE = "1";
};
sops = {
defaultSopsFile = ./secrets/secrets.yml;
defaultSopsFormat = "yml";
age.keyFile = "/home/";
};
};
}

View file

@ -74,12 +74,7 @@
};
};
nixosModules =
{
sneeuwvlok = import ./.;
}
// mapModulesRec ./modules import;
nixosModules = mapModulesRec ./modules import;
nixosConfigurations = mapHosts ./hosts {};
};
}

View file

@ -57,7 +57,6 @@ in rec
};
})
(filterAttrs (n: v: !elem n ["system"]) attrs)
../. # ../default.nix
(import path)
]
++ (map (user: {

View file

@ -51,15 +51,15 @@ in
sharedModules = [
inputs.plasma-manager.homeManagerModules.plasma-manager
];
};
home-manager.users.${user}.programs.plasma = {
users.${user}.programs.plasma = {
enable = true;
immutableByDefault = false;
immutableByDefault = true;
windows.allowWindowsToRememberPositions = true;
workspace = {
colorScheme = "CatppuccinMocha";
wallpaper = config.stylix.image;
};
spectacle.shortcuts = {
@ -87,29 +87,115 @@ in
# Windows-like panel at the bottom
{
location = "bottom";
floating = true;
lengthMode = "fill";
height = 32;
hiding = "dodgewindows";
screen = "all";
widgets = [
"org.kde.plasma.kickoff"
{
name = "org.kde.plasma.icontasks";
config = {
kickoff = {
applicationsDisplayMode = "list";
compactDisplayStyle = false;
favoritesDisplayMode = "grid";
sortAlphabetically = true;
showButtonsFor = {
custom = [
"shutdown"
"reboot"
"logout"
"lock-screen"
];
};
showActionButtonCaptions = true;
};
}
{
appMenu = {
compactView = false;
};
}
{
panelSpacer = {
expanding = true;
};
}
{
iconTasks = {
appearance = {
fill = false;
highlightWindows = true;
iconSpacing = "medium";
indicateAudioStreams = true;
rows = {
multirowView = "never";
maximum = null;
};
showTooltips = true;
};
behavior = {
grouping = {
clickAction = "showPresentWindowsEffect";
method = "byProgramName";
};
minimizeActiveTaskOnClick = true;
newTasksAppearOn = "right";
showTasks = {
onlyInCurrentActivity = true;
onlyInCurrentDesktop = true;
onlyMinimized = false;
onlyInCurrentScreen = false;
};
sortingMethod = "manually";
unhideOnAttentionNeeded = true;
wheel = {
ignoreMinimizedTasks = true;
switchBetweenTasks = true;
};
};
launchers = [
"preferred://browser"
"applications:org.kde.konsole.desktop"
"applications:org.kde.dolphin.desktop"
"applications:equibop.desktop"
"applications:code.desktop"
"applications:com.obsproject.Studio"
"applications:spotify.desktop"
"preferred://browser"
"preferred://terminal"
"preferred://editor"
"applications:vesktop.desktop"
"applications:steam.desktop"
];
};
}
"org.kde.plasma.systemtray"
"org.kde.plasma.digitalclock"
{
panelSpacer = {
expanding = true;
};
}
{
systemTray = {
icons = {
scaleToFit = true;
spacing = "small";
};
items = {
hidden = [
"org.kde.plasma.brightness"
];
};
pin = false;
};
}
{
digitalClock = {
date = {
enable = true;
format = "shortDate";
position = "belowTime";
};
time = {
format = "24h";
showSeconds = "onlyInTooltip";
};
};
}
];
floating = true;
minLength = 1743;
maxLength = 1920;
hiding = "dodgewindows";
}
];
@ -184,4 +270,5 @@ in
};
};
};
};
}

View file

@ -25,8 +25,8 @@ in {
enable = true;
settings = {
background-blur-radius = 20;
theme = "dark:stylix,light:stylix";
window-theme = config.stylix.polarity;
# theme = "dark:stylix,light:stylix";
# window-theme = config.stylix.polarity;
background-opacity = 0.8;
minimum-contrast = 1.1;
};

View file

@ -1,19 +1,25 @@
{ config, options, lib, pkgs, user, ... }:
{ config, lib, user, ... }:
let
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
in
{
options.modules.${user}.shell.toolset.starship = let
inherit (lib.options) mkEnableOption;
in {
enable = mkEnableOption "minimal shell ricing";
options.modules.${user}.shell.toolset.starship = {
enable = mkEnableOption "fancy pansy shell prompt";
};
config = mkIf config.modules.${user}.shell.toolset.starship.enable {
home-manager.users.${user}.programs.starship = {
enable = true;
settings = let
inherit (config.lib.stylix.colors) cyan red magenta yellow green blue;
# inherit (config.lib.stylix.colors) cyan red magenta yellow green blue;
cyan = "#00ffff";
red = "#ff0000";
magenta = "#ff00ff";
yellow = "#ffff00";
green = "#00ff00";
blue = "#0000ff";
in {
scan_timeout = 10;
add_newline = true;

View file

@ -1,19 +1,13 @@
{ inputs, config, options, lib, pkgs, user, ... }:
{ config, lib, pkgs, user, ... }:
let
inherit (builtins) getEnv map;
inherit (lib.attrsets) attrValues mapAttrsToList;
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.strings) concatStringsSep optionalString;
cfg = config.modules.${user}.themes;
desktop = config.modules.${user}.desktop;
in {
options.modules.${user}.themes = let
inherit (lib) mkIf mkDefault;
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) nullOr enum;
cfg = config.modules.${user}.themes;
in {
options.modules.${user}.themes = {
enable = mkEnableOption "Theming (Stylix)";
theme = mkOption {
@ -33,6 +27,24 @@ in {
config = mkIf (cfg.enable) {
modules.theming.enable = true;
environment.sessionVariables = { QT_QPA_PLATFORMTHEME = "kde"; };
home-manager.users.${user} = {
xdg.configFile."menus/applications.menu".source = "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
qt = {
enable = true;
platformTheme.package = with pkgs.kdePackages; [
plasma-integration
systemsettings
];
style = {
package = pkgs.kdePackages.breeze;
name = mkDefault "Breeze";
};
};
};
stylix = {
enable = true;
autoEnable = true;

View file

@ -14,6 +14,10 @@ in
};
config = {
environment.variables = {
NIXPKGS_ALLOW_UNFREE = "1";
};
nix.settings = let
inherit (lib) elem attrNames filterAttrs;
@ -22,6 +26,7 @@ in
{
trusted-users = users;
allowed-users = users;
experimental-features = [ "nix-command" "flakes" ];
};
};
}

View file

@ -1,11 +1,22 @@
{ pkgs, ... }:
{ inputs, pkgs, ... }:
{
imports = [
inputs.sops-nix.nixosModules.sops
];
config = {
environment.systemPackages = with pkgs; [
kdePackages.kwallet-pam
bitwarden
sops
];
sops = {
defaultSopsFile = ./secrets/secrets.yml;
defaultSopsFormat = "yml";
age.keyFile = "/home/";
};
security = {
sudo.execWheelOnly = true;
acme.acceptTerms = true;
@ -15,11 +26,6 @@
enable = true;
settings.cue = true;
};
services.kwallet = {
name = "kwallet";
enableKwallet = true;
};
};
};
@ -67,4 +73,5 @@
"net.core.default_qdisc" = "cake";
};
};
};
}

View file

@ -1,6 +1,7 @@
{ inputs, config, options, lib, pkgs, ... }:
{ inputs, config, lib, ... }:
let
inherit (lib) mkIf;
inherit (lib.options) mkEnableOption;
cfg = config.modules.theming;
in
@ -9,10 +10,7 @@ in
inputs.stylix.nixosModules.stylix
];
options.modules.theming = let
inherit (lib.options) mkEnableOption;
in
{
options.modules.theming = {
enable = mkEnableOption "enable theming";
};