feat(desktop): move terminal config to homes and use home-manager modules
This commit is contained in:
parent
ee2dfd8398
commit
a04688d17b
6 changed files with 30 additions and 25 deletions
|
@ -14,4 +14,5 @@ mkMerge [
|
||||||
(import ./launcher.nix)
|
(import ./launcher.nix)
|
||||||
(import ./media-player.nix)
|
(import ./media-player.nix)
|
||||||
(import ./status-bar.nix { inherit pkgs; })
|
(import ./status-bar.nix { inherit pkgs; })
|
||||||
|
(import ./terminal.nix)
|
||||||
]
|
]
|
||||||
|
|
4
homes/x86_64-linux/rafiq/desktop/terminal.nix
Normal file
4
homes/x86_64-linux/rafiq/desktop/terminal.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
home.sessionVariables.TERMINAL = "ghostty -e";
|
||||||
|
programs.ghostty.settings.confirm-close-surface = false;
|
||||||
|
}
|
|
@ -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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -22,7 +22,6 @@ in
|
||||||
refresh-rate = lib.pantheon.mkStrOption;
|
refresh-rate = lib.pantheon.mkStrOption;
|
||||||
};
|
};
|
||||||
windowManager = lib.pantheon.mkStrOption;
|
windowManager = lib.pantheon.mkStrOption;
|
||||||
terminal = lib.pantheon.mkStrOption;
|
|
||||||
enableSpotifyd = lib.mkEnableOption "";
|
enableSpotifyd = lib.mkEnableOption "";
|
||||||
enableSteam = lib.mkEnableOption "";
|
enableSteam = lib.mkEnableOption "";
|
||||||
enableVR = lib.mkEnableOption "";
|
enableVR = lib.mkEnableOption "";
|
||||||
|
|
24
modules/nixos/desktop/terminal/default.nix
Normal file
24
modules/nixos/desktop/terminal/default.nix
Normal file
|
@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -7,8 +7,8 @@
|
||||||
media-player.vlc.enable = true;
|
media-player.vlc.enable = true;
|
||||||
notification-daemon.mako.enable = true;
|
notification-daemon.mako.enable = true;
|
||||||
status-bar.waybar.enable = true;
|
status-bar.waybar.enable = true;
|
||||||
|
terminal.ghostty.enable = true;
|
||||||
windowManager = "hyprland";
|
windowManager = "hyprland";
|
||||||
terminal = "ghostty";
|
|
||||||
enableSpotifyd = true;
|
enableSpotifyd = true;
|
||||||
enableSteam = true;
|
enableSteam = true;
|
||||||
enableVR = true;
|
enableVR = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue