refactor(hm/gui): reorganize modules
This way we are not `import`ing stuff which is slow. It also makes it easier to turn off the sway module.
This commit is contained in:
parent
816cfdd2af
commit
5358188ad1
7 changed files with 392 additions and 383 deletions
|
@ -21,6 +21,11 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./sway.nix
|
||||
./waybar.nix
|
||||
];
|
||||
|
||||
config = lib.mkIf (jhome.enable && cfg.enable) {
|
||||
home.packages =
|
||||
(with pkgs; [
|
||||
|
@ -73,30 +78,6 @@ in
|
|||
};
|
||||
# Text editor
|
||||
nixvim.clipboard.providers.wl-copy.enable = lib.mkDefault true;
|
||||
# Status bar
|
||||
waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
settings = lib.mkIf config.jhome.styling.enable (
|
||||
import ./waybar-settings.nix { inherit config lib; }
|
||||
);
|
||||
# Style overrides to highlight workspaces with windows
|
||||
style =
|
||||
lib.pipe
|
||||
# css
|
||||
''
|
||||
.modules-left #workspaces button {
|
||||
border-bottom: 3px solid @base01;
|
||||
}
|
||||
.modules-left #workspaces button.persistent {
|
||||
border-bottom: 3px solid transparent;
|
||||
}
|
||||
''
|
||||
[
|
||||
(lib.optionalString config.jhome.styling.enable)
|
||||
lib.mkAfter
|
||||
];
|
||||
};
|
||||
# Terminal
|
||||
wezterm = {
|
||||
enable = cfg.terminal == "wezterm";
|
||||
|
@ -173,17 +154,6 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
# Window Manager
|
||||
wayland.windowManager.sway = {
|
||||
inherit (cfg.sway) enable;
|
||||
package = swayPkg; # no sway package if it comes from the OS
|
||||
config = import ./sway-config.nix { inherit config pkgs; };
|
||||
systemd = {
|
||||
enable = true;
|
||||
xdgAutostart = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Set cursor style
|
||||
stylix = lib.mkIf config.jhome.styling.enable { inherit cursor; };
|
||||
home.pointerCursor = lib.mkIf config.jhome.styling.enable (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue