cleanup the mess

Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
2025-07-13 12:02:59 +03:00
parent 6554808614
commit 3937656ce1
6 changed files with 106 additions and 113 deletions

View File

@ -1,21 +1,24 @@
{
perSystem,
osConfig,
config,
inputs,
pkgs,
lib,
osConfig,
# perSystem,
pkgs,
...
}: let
# inherit (lib.strings) removeSuffix;
inherit (lib) mkIf mkEnableOption mkDefault mkForce getExe;
inherit (config.lib.stylix) colors;
# inherit (osConfig.module.stylix) theme;
inherit (osConfig.networking) hostName;
cfg = config.desktop.niri;
ifLaptop = mkIf (hostName != "dunamis");
launcher = getExe pkgs.walker;
lockscreen = getExe pkgs.gtklock;
commonArgs = {
inherit config inputs lib osConfig pkgs;
launcher = getExe pkgs.walker;
lockscreen = getExe pkgs.gtklock;
};
in {
imports = with inputs; [
walker.homeManagerModules.default
@ -30,6 +33,24 @@ in {
wpaperd.enable = true;
qt.enable = false;
};
stylix.iconTheme = {
enable = true;
light = "Papirus-Light";
dark = "Papirus-Dark";
package = let
inherit (lib.strings) hasPrefix;
inherit (osConfig.module.stylix) theme;
color =
if (hasPrefix "rose-pine" theme)
then "indigo"
else if (hasPrefix "nord" theme)
then "nordic"
else if (hasPrefix "s" theme)
then "teal"
else null;
in
pkgs.papirus-icon-theme.override {inherit color;};
};
dconf.settings = {
"org/gnome/desktop/wm/preferences" = {
button-layout = "icon:close";
@ -42,40 +63,14 @@ in {
else lib.mkDefault "prefer-light";
};
};
gtk = {
enable = true;
iconTheme = let
name =
if (lib.strings.hasPrefix "gruvbox" osConfig.module.stylix.theme)
then "Gruvbox-Plus-Dark"
else if config.stylix.polarity == "dark"
then "Papirus-Dark"
else "Papirus-Light";
package = let
inherit (osConfig.module.stylix) theme;
in
if (lib.strings.hasPrefix "gruvbox" theme)
then pkgs.gruvbox-plus-icons
else if (lib.strings.hasPrefix "rose-pine" theme)
then pkgs.papirus-icon-theme.override {color = "indigo";}
else if (lib.strings.hasPrefix "nord" theme)
then pkgs.papirus-icon-theme.override {color = "nordic";}
else if (lib.strings.hasPrefix "s" theme)
then pkgs.papirus-icon-theme.override {color = "teal";}
else pkgs.papirus-icon-theme;
in {inherit name package;};
};
qt = {
enable = true;
platformTheme.name = "gtk3";
};
programs = {
walker = import ./programs/walker {inherit config inputs pkgs;};
waybar = import ./programs/waybar {inherit config colors getExe ifLaptop launcher pkgs;};
};
services = import ./services {inherit pkgs lockscreen getExe perSystem osConfig;};
programs.walker = import ./programs/walker commonArgs;
programs.waybar = import ./programs/waybar commonArgs;
services = import ./services commonArgs;
home.packages = with pkgs;
[
@ -85,13 +80,9 @@ in {
helvum # pipewire patchbay in rust
junction # app chooser
loupe # image viewer and editor in rust
mission-center # task manager in rust (partly)
nautilus # file manager
overskride # bluetooth gui in rust
papers # pdf reader in rust
pika-backup # borg gui in rust
pwvucontrol # pipewire gui in rust
sonusmix # pipewire routing tool in rust
wdisplays # wlroots display configurator
]
++ [
@ -105,7 +96,7 @@ in {
xdg = {
configFile = {
niri = import ./niri.nix {inherit config hostName launcher lockscreen;};
niri = import ./niri.nix commonArgs;
"mimeapps.list".force = true;
};
mime.enable = true;
@ -136,7 +127,6 @@ in {
};
systemd.user = {
settings.Manager.DefaultEnvironment = {
QT_QPA_PLATFORM = "wayland";
DISPLAY = ":123";
};
targets.tray.Unit.Description = "Home Manager System Tray"; # workaround for udiskie