diff --git a/homeManagerModules/options.nix b/homeManagerModules/options.nix index b7b62a11..10ce5f2f 100644 --- a/homeManagerModules/options.nix +++ b/homeManagerModules/options.nix @@ -167,6 +167,12 @@ in { }; }; + laptopMode = lib.mkOption { + description = "Enable laptop configuration."; + default = osConfig.ar.laptopMode; + type = lib.types.bool; + }; + services = { easyeffects = { enable = lib.mkEnableOption "EasyEffects user service."; diff --git a/homes/aly/windowManagers/default.nix b/homes/aly/windowManagers/default.nix index c6d8f8e4..6f83fa5a 100644 --- a/homes/aly/windowManagers/default.nix +++ b/homes/aly/windowManagers/default.nix @@ -1,14 +1,11 @@ { config, lib, - osConfig, pkgs, ... }: { - imports = - if (osConfig.networking.hostName == "mauville") - then [./ultrawide.nix] - else [./laptop.nix]; + imports = [./laptop.nix]; + programs.waybar.settings.mainBar."bluetooth" = { "on-click" = lib.mkForce "${lib.getExe pkgs.rofi-bluetooth} -i"; }; diff --git a/homes/aly/windowManagers/laptop.nix b/homes/aly/windowManagers/laptop.nix index 87fe0d3b..ec172316 100644 --- a/homes/aly/windowManagers/laptop.nix +++ b/homes/aly/windowManagers/laptop.nix @@ -4,33 +4,35 @@ pkgs, ... }: { - wayland.windowManager = { - sway.config = { - assigns = { - "workspace 1:web" = [{app_id = "firefox";} {app_id = "brave-browser";}]; - "workspace 2:note" = [{app_id = "obsidian";}]; - "workspace 3:code" = [{app_id = "codium-url-handler";} {app_id = "dev.zed.Zed";}]; - "workspace 4:mail" = [{app_id = "thunderbird";}]; - "workspace 5:work" = [{app_id = "firework";}]; + config = lib.mkIf config.ar.home.laptopMode { + wayland.windowManager = { + sway.config = { + assigns = { + "workspace 1:web" = [{app_id = "firefox";} {app_id = "brave-browser";}]; + "workspace 2:note" = [{app_id = "obsidian";}]; + "workspace 3:code" = [{app_id = "codium-url-handler";} {app_id = "dev.zed.Zed";}]; + "workspace 4:mail" = [{app_id = "thunderbird";}]; + "workspace 5:work" = [{app_id = "firework";}]; + }; + + startup = [ + {command = "sleep 2 && ${lib.getExe' config.wayland.windowManager.sway.package "swaymsg"} workspace 1:web";} + ]; }; - startup = [ - {command = "sleep 2 && ${lib.getExe' config.wayland.windowManager.sway.package "swaymsg"} workspace 1:web";} - ]; - }; + hyprland.settings = { + exec-once = [ + "sleep 2 && hyprctl dispatch workspace 2 && sleep 2 && hyprctl dispatch workspace 3 && sleep 2 && hyprctl dispatch workspace 4 && sleep 2 && hyprctl dispatch workspace 1;" + ]; - hyprland.settings = { - exec-once = [ - "sleep 2 && hyprctl dispatch workspace 2 && sleep 2 && hyprctl dispatch workspace 3 && sleep 2 && hyprctl dispatch workspace 4 && sleep 2 && hyprctl dispatch workspace 1;" - ]; - - workspace = [ - "1,defaultName:web,on-created-empty:${lib.getExe config.ar.home.defaultApps.webBrowser}" - "2,defaultName:note,on-created-empty:${lib.getExe' pkgs.obsidian "obsidian"}" - "3,defaultName:code,on-created-empty:${lib.getExe config.ar.home.defaultApps.editor}" - "4,defaultName:mail,on-created-empty:${lib.getExe pkgs.thunderbird}" - "special:magic,on-created-empty:${lib.getExe pkgs.fractal}" - ]; + workspace = [ + "1,defaultName:web,on-created-empty:${lib.getExe config.ar.home.defaultApps.webBrowser}" + "2,defaultName:note,on-created-empty:${lib.getExe' pkgs.obsidian "obsidian"}" + "3,defaultName:code,on-created-empty:${lib.getExe config.ar.home.defaultApps.editor}" + "4,defaultName:mail,on-created-empty:${lib.getExe pkgs.thunderbird}" + "special:magic,on-created-empty:${lib.getExe pkgs.fractal}" + ]; + }; }; }; } diff --git a/homes/aly/windowManagers/ultrawide.nix b/homes/aly/windowManagers/ultrawide.nix deleted file mode 100644 index 2c63c085..00000000 --- a/homes/aly/windowManagers/ultrawide.nix +++ /dev/null @@ -1,2 +0,0 @@ -{ -} diff --git a/hosts/fallarbor/default.nix b/hosts/fallarbor/default.nix index babf1912..94b05aa4 100644 --- a/hosts/fallarbor/default.nix +++ b/hosts/fallarbor/default.nix @@ -41,7 +41,8 @@ sway.enable = true; }; - + + laptopMode = true; services.flatpak.enable = true; users = { diff --git a/hosts/lavaridge/default.nix b/hosts/lavaridge/default.nix index 6b2891a2..e935676d 100644 --- a/hosts/lavaridge/default.nix +++ b/hosts/lavaridge/default.nix @@ -45,6 +45,8 @@ hyprland.enable = true; sway.enable = true; }; + + laptopMode = true; users.aly = { enable = true; diff --git a/hosts/petalburg/default.nix b/hosts/petalburg/default.nix index 84adc1eb..06ef459a 100644 --- a/hosts/petalburg/default.nix +++ b/hosts/petalburg/default.nix @@ -65,6 +65,8 @@ hyprland.enable = true; sway.enable = true; }; + + laptopMode = true; users.aly = { enable = true; diff --git a/hosts/rustboro/default.nix b/hosts/rustboro/default.nix index ad911fd4..849035ed 100644 --- a/hosts/rustboro/default.nix +++ b/hosts/rustboro/default.nix @@ -40,6 +40,8 @@ sway.enable = true; }; + + laptopMode = true; users.aly = { enable = true; diff --git a/nixosModules/options.nix b/nixosModules/options.nix index 98ebe9a4..370a8318 100644 --- a/nixosModules/options.nix +++ b/nixosModules/options.nix @@ -33,6 +33,8 @@ steam.enable = lib.mkEnableOption "Steam + Gamescope session."; sway.enable = lib.mkEnableOption "Sway wayland session."; }; + + laptopMode = lib.mkEnableOption "Enable laptop configuration."; services.flatpak.enable = lib.mkEnableOption "Flatpak support with GUI."; };