refactor(modules): make sure nothing is added without setting enable

This commit is contained in:
matt1432 2025-01-04 19:02:30 -05:00
parent 4a2ad39114
commit 49dc072b81
56 changed files with 684 additions and 506 deletions

View file

@ -1,12 +1,21 @@
self: {pkgs, ...}: {
config = let
inherit (self.scopedPackages.${pkgs.system}) dracula;
self: {
lib,
osConfig,
pkgs,
...
}: let
inherit (self.scopedPackages.${pkgs.system}) dracula;
cursorTheme = dracula.hyprcursor;
cursorThemeName = "Dracula-cursors";
hyprcursorThemeName = "Dracula-hyprcursor";
cursorSize = 24;
in {
inherit (lib) mkIf;
cfg = osConfig.roles.desktop;
cursorTheme = dracula.hyprcursor;
cursorThemeName = "Dracula-cursors";
hyprcursorThemeName = "Dracula-hyprcursor";
cursorSize = 24;
in {
config = mkIf cfg.enable {
home.pointerCursor = {
name = cursorThemeName;
package = dracula.gtk;
@ -35,5 +44,5 @@ self: {pkgs, ...}: {
};
# For accurate stack trace
_file = ./cursors.nix;
_file = ./default.nix;
}

View file

@ -1,26 +1,36 @@
self: {...}: {
self: {
lib,
osConfig,
...
}: let
inherit (lib) mkIf;
cfg = osConfig.roles.desktop;
in {
imports = [
./gtk
./xresources.nix
./xresources
(import ./cursors.nix self)
(import ./qt.nix self)
(import ./hyprpaper.nix self)
(import ./cursors self)
(import ./hyprpaper self)
(import ./qt self)
];
config.wayland.windowManager.hyprland = {
settings = {
windowrule = [
"size 1231 950,title:^(Open Folder)$"
"float,title:^(Open Folder)$"
config = mkIf cfg.enable {
wayland.windowManager.hyprland = {
settings = {
windowrule = [
"size 1231 950,title:^(Open Folder)$"
"float,title:^(Open Folder)$"
"size 1231 950,title:^(Open File)$"
"float,title:^(Open File)$"
];
"size 1231 950,title:^(Open File)$"
"float,title:^(Open File)$"
];
layerrule = [
"noanim, selection"
];
layerrule = [
"noanim, selection"
];
};
};
};

View file

@ -3,12 +3,14 @@
lib,
osConfig,
...
}: {
config = let
inherit (import ./gradience.nix {inherit pkgs lib;}) gradience;
}: let
inherit (lib) mkIf;
cfg = osConfig.roles.desktop;
in {
inherit (import ./gradience.nix {inherit pkgs lib;}) gradience;
cfg = osConfig.roles.desktop;
in {
config = mkIf cfg.enable {
home.packages = [
pkgs.gnomeExtensions.user-themes
];

View file

@ -1,12 +1,17 @@
self: {
lib,
osConfig,
pkgs,
...
}: {
config = let
hyprpaper = self.inputs.hyprpaper.packages.${pkgs.system}.default;
wallpaper = toString self.scopedPackages.${pkgs.system}.dracula.wallpaper;
in {
}: let
inherit (lib) mkIf;
cfg = osConfig.roles.desktop;
hyprpaper = self.inputs.hyprpaper.packages.${pkgs.system}.default;
wallpaper = toString self.scopedPackages.${pkgs.system}.dracula.wallpaper;
in {
config = mkIf cfg.enable {
home.packages = [hyprpaper];
xdg.configFile."hypr/hyprpaper.conf" = {
@ -26,5 +31,5 @@ self: {
};
# For accurate stack trace
_file = ./hyprpaper.nix;
_file = ./default.nix;
}

View file

@ -3,12 +3,14 @@ self: {
osConfig,
pkgs,
...
}: {
config = let
inherit (self.scopedPackages.${pkgs.system}) dracula;
}: let
inherit (self.scopedPackages.${pkgs.system}) dracula;
cfg = osConfig.roles.desktop;
in {
inherit (lib) mkIf;
cfg = osConfig.roles.desktop;
in {
config = mkIf cfg.enable {
home.packages = [
pkgs.libsForQt5.qtstyleplugin-kvantum
pkgs.kdePackages.qtstyleplugin-kvantum
@ -44,5 +46,5 @@ self: {
};
# For accurate stack trace
_file = ./qt.nix;
_file = ./default.nix;
}

View file

@ -1,23 +0,0 @@
{...}: {
xresources.extraConfig = ''
! Dracula Xresources palette
*.foreground: #F8F8F2
*.background: #282A36
*.color0: #000000
*.color8: #4D4D4D
*.color1: #FF5555
*.color9: #FF6E67
*.color2: #50FA7B
*.color10: #5AF78E
*.color3: #F1FA8C
*.color11: #F4F99D
*.color4: #BD93F9
*.color12: #CAA9FA
*.color5: #FF79C6
*.color13: #FF92D0
*.color6: #8BE9FD
*.color14: #9AEDFE
*.color7: #BFBFBF
*.color15: #E6E6E6
'';
}

View file

@ -0,0 +1,36 @@
{
lib,
osConfig,
...
}: let
inherit (lib) mkIf;
cfg = osConfig.roles.desktop;
in {
config = mkIf cfg.enable {
xresources.extraConfig = ''
! Dracula Xresources palette
*.foreground: #F8F8F2
*.background: #282A36
*.color0: #000000
*.color8: #4D4D4D
*.color1: #FF5555
*.color9: #FF6E67
*.color2: #50FA7B
*.color10: #5AF78E
*.color3: #F1FA8C
*.color11: #F4F99D
*.color4: #BD93F9
*.color12: #CAA9FA
*.color5: #FF79C6
*.color13: #FF92D0
*.color6: #8BE9FD
*.color14: #9AEDFE
*.color7: #BFBFBF
*.color15: #E6E6E6
'';
};
# For accurate stack trace
_file = ./default.nix;
}