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 = nixosModules = mapModulesRec ./modules import;
{
sneeuwvlok = import ./.;
}
// mapModulesRec ./modules import;
nixosConfigurations = mapHosts ./hosts {}; nixosConfigurations = mapHosts ./hosts {};
}; };
} }

View file

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

View file

@ -51,15 +51,15 @@ in
sharedModules = [ sharedModules = [
inputs.plasma-manager.homeManagerModules.plasma-manager inputs.plasma-manager.homeManagerModules.plasma-manager
]; ];
};
home-manager.users.${user}.programs.plasma = { users.${user}.programs.plasma = {
enable = true; enable = true;
immutableByDefault = false; immutableByDefault = true;
windows.allowWindowsToRememberPositions = true; windows.allowWindowsToRememberPositions = true;
workspace = { workspace = {
colorScheme = "CatppuccinMocha"; colorScheme = "CatppuccinMocha";
wallpaper = config.stylix.image;
}; };
spectacle.shortcuts = { spectacle.shortcuts = {
@ -87,29 +87,115 @@ in
# Windows-like panel at the bottom # Windows-like panel at the bottom
{ {
location = "bottom"; location = "bottom";
floating = true;
lengthMode = "fill";
height = 32;
hiding = "dodgewindows";
screen = "all";
widgets = [ widgets = [
"org.kde.plasma.kickoff"
{ {
name = "org.kde.plasma.icontasks"; kickoff = {
config = { 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 = [ launchers = [
"preferred://browser"
"applications:org.kde.konsole.desktop"
"applications:org.kde.dolphin.desktop" "applications:org.kde.dolphin.desktop"
"applications:equibop.desktop" "preferred://browser"
"applications:code.desktop" "preferred://terminal"
"applications:com.obsproject.Studio" "preferred://editor"
"applications:spotify.desktop" "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; enable = true;
settings = { settings = {
background-blur-radius = 20; background-blur-radius = 20;
theme = "dark:stylix,light:stylix"; # theme = "dark:stylix,light:stylix";
window-theme = config.stylix.polarity; # window-theme = config.stylix.polarity;
background-opacity = 0.8; background-opacity = 0.8;
minimum-contrast = 1.1; minimum-contrast = 1.1;
}; };

View file

@ -1,19 +1,25 @@
{ config, options, lib, pkgs, user, ... }: { config, lib, user, ... }:
let let
inherit (lib.modules) mkIf; inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
in in
{ {
options.modules.${user}.shell.toolset.starship = let options.modules.${user}.shell.toolset.starship = {
inherit (lib.options) mkEnableOption; enable = mkEnableOption "fancy pansy shell prompt";
in {
enable = mkEnableOption "minimal shell ricing";
}; };
config = mkIf config.modules.${user}.shell.toolset.starship.enable { config = mkIf config.modules.${user}.shell.toolset.starship.enable {
home-manager.users.${user}.programs.starship = { home-manager.users.${user}.programs.starship = {
enable = true; enable = true;
settings = let 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 { in {
scan_timeout = 10; scan_timeout = 10;
add_newline = true; add_newline = true;

View file

@ -1,19 +1,13 @@
{ inputs, config, options, lib, pkgs, user, ... }: { config, lib, pkgs, user, ... }:
let let
inherit (builtins) getEnv map; inherit (lib) mkIf mkDefault;
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.options) mkOption mkEnableOption; inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) nullOr enum; inherit (lib.types) nullOr enum;
in {
cfg = config.modules.${user}.themes;
in {
options.modules.${user}.themes = {
enable = mkEnableOption "Theming (Stylix)"; enable = mkEnableOption "Theming (Stylix)";
theme = mkOption { theme = mkOption {
@ -33,6 +27,24 @@ in {
config = mkIf (cfg.enable) { config = mkIf (cfg.enable) {
modules.theming.enable = true; 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 = { stylix = {
enable = true; enable = true;
autoEnable = true; autoEnable = true;

View file

@ -14,6 +14,10 @@ in
}; };
config = { config = {
environment.variables = {
NIXPKGS_ALLOW_UNFREE = "1";
};
nix.settings = let nix.settings = let
inherit (lib) elem attrNames filterAttrs; inherit (lib) elem attrNames filterAttrs;
@ -22,6 +26,7 @@ in
{ {
trusted-users = users; trusted-users = users;
allowed-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; [ environment.systemPackages = with pkgs; [
kdePackages.kwallet-pam
bitwarden bitwarden
sops sops
]; ];
sops = {
defaultSopsFile = ./secrets/secrets.yml;
defaultSopsFormat = "yml";
age.keyFile = "/home/";
};
security = { security = {
sudo.execWheelOnly = true; sudo.execWheelOnly = true;
acme.acceptTerms = true; acme.acceptTerms = true;
@ -15,11 +26,6 @@
enable = true; enable = true;
settings.cue = true; settings.cue = true;
}; };
services.kwallet = {
name = "kwallet";
enableKwallet = true;
};
}; };
}; };
@ -67,4 +73,5 @@
"net.core.default_qdisc" = "cake"; "net.core.default_qdisc" = "cake";
}; };
}; };
};
} }

View file

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