diff --git a/homes/x86_64-linux/rafiq/desktop/default.nix b/homes/x86_64-linux/rafiq/desktop/default.nix index f94c7c4..f523d7f 100644 --- a/homes/x86_64-linux/rafiq/desktop/default.nix +++ b/homes/x86_64-linux/rafiq/desktop/default.nix @@ -14,4 +14,5 @@ mkMerge [ (import ./launcher.nix) (import ./media-player.nix) (import ./status-bar.nix { inherit pkgs; }) + (import ./terminal.nix) ] diff --git a/homes/x86_64-linux/rafiq/desktop/terminal.nix b/homes/x86_64-linux/rafiq/desktop/terminal.nix new file mode 100644 index 0000000..4ffde8b --- /dev/null +++ b/homes/x86_64-linux/rafiq/desktop/terminal.nix @@ -0,0 +1,4 @@ +{ + home.sessionVariables.TERMINAL = "ghostty -e"; + programs.ghostty.settings.confirm-close-surface = false; +} diff --git a/modules/home/desktop/terminal/default.nix b/modules/home/desktop/terminal/default.nix deleted file mode 100644 index f3af070..0000000 --- a/modules/home/desktop/terminal/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - osConfig, - lib, - pkgs, - ... -}: -{ - config = lib.mkMerge [ - (lib.mkIf (osConfig.desktop.terminal == "kitty") { - home.packages = with pkgs; [ kitty ]; - home.sessionVariables.TERMINAL = "kitty"; - }) - (lib.mkIf (osConfig.desktop.terminal == "ghostty") { - home.sessionVariables.TERMINAL = "ghostty -e"; - programs.ghostty = { - enable = true; - settings = { - confirm-close-surface = false; - }; - }; - }) - ]; -} diff --git a/modules/nixos/desktop/default.nix b/modules/nixos/desktop/default.nix index 560ce16..0251e8d 100644 --- a/modules/nixos/desktop/default.nix +++ b/modules/nixos/desktop/default.nix @@ -22,7 +22,6 @@ in refresh-rate = lib.pantheon.mkStrOption; }; windowManager = lib.pantheon.mkStrOption; - terminal = lib.pantheon.mkStrOption; enableSpotifyd = lib.mkEnableOption ""; enableSteam = lib.mkEnableOption ""; enableVR = lib.mkEnableOption ""; diff --git a/modules/nixos/desktop/terminal/default.nix b/modules/nixos/desktop/terminal/default.nix new file mode 100644 index 0000000..c32da9d --- /dev/null +++ b/modules/nixos/desktop/terminal/default.nix @@ -0,0 +1,24 @@ +{ + config, + lib, + pkgs, + ... +}: +let + inherit (lib) mkEnableOption singleton optional; + inherit (pkgs) kitty; + cfg = config.desktop.terminal; +in +{ + options.desktop.terminal = { + kitty.enable = mkEnableOption ""; + ghostty.enable = mkEnableOption ""; + }; + + config = { + home-manager.sharedModules = singleton { + home.packages = optional cfg.kitty.enable kitty; + programs.ghostty.enable = cfg.ghostty.enable; + }; + }; +} diff --git a/systems/x86_64-linux/desktop.nix b/systems/x86_64-linux/desktop.nix index 3da30e8..905b17d 100644 --- a/systems/x86_64-linux/desktop.nix +++ b/systems/x86_64-linux/desktop.nix @@ -7,8 +7,8 @@ media-player.vlc.enable = true; notification-daemon.mako.enable = true; status-bar.waybar.enable = true; + terminal.ghostty.enable = true; windowManager = "hyprland"; - terminal = "ghostty"; enableSpotifyd = true; enableSteam = true; enableVR = true;