Merge pull request #66990 from worldofpeace/gnome-vte-config
nixos/gnome-terminal: init
This commit is contained in:
commit
4ba10fbbfd
52
nixos/modules/config/vte.nix
Normal file
52
nixos/modules/config/vte.nix
Normal file
@ -0,0 +1,52 @@
|
||||
# VTE
|
||||
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
vteInitSnippet = ''
|
||||
# Show current working directory in VTE terminals window title.
|
||||
# Supports both bash and zsh, requires interactive shell.
|
||||
. ${pkgs.vte}/etc/profile.d/vte.sh
|
||||
'';
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
options = {
|
||||
|
||||
programs.bash.vteIntegration = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether to enable Bash integration for VTE terminals.
|
||||
This allows it to preserve the current directory of the shell
|
||||
across terminals.
|
||||
'';
|
||||
};
|
||||
|
||||
programs.zsh.vteIntegration = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether to enable Zsh integration for VTE terminals.
|
||||
This allows it to preserve the current directory of the shell
|
||||
across terminals.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
(mkIf config.programs.bash.vteIntegration {
|
||||
programs.bash.interactiveShellInit = vteInitSnippet;
|
||||
})
|
||||
|
||||
(mkIf config.programs.zsh.vteIntegration {
|
||||
programs.zsh.interactiveShellInit = vteInitSnippet;
|
||||
})
|
||||
];
|
||||
}
|
@ -38,6 +38,7 @@
|
||||
./config/unix-odbc-drivers.nix
|
||||
./config/users-groups.nix
|
||||
./config/vpnc.nix
|
||||
./config/vte.nix
|
||||
./config/zram.nix
|
||||
./hardware/acpilight.nix
|
||||
./hardware/all-firmware.nix
|
||||
@ -116,6 +117,7 @@
|
||||
./programs/fuse.nix
|
||||
./programs/gnome-disks.nix
|
||||
./programs/gnome-documents.nix
|
||||
./programs/gnome-terminal.nix
|
||||
./programs/gpaste.nix
|
||||
./programs/gnupg.nix
|
||||
./programs/gphoto2.nix
|
||||
@ -297,7 +299,6 @@
|
||||
./services/desktops/gnome3/gnome-remote-desktop.nix
|
||||
./services/desktops/gnome3/gnome-online-miners.nix
|
||||
./services/desktops/gnome3/gnome-settings-daemon.nix
|
||||
./services/desktops/gnome3/gnome-terminal-server.nix
|
||||
./services/desktops/gnome3/gnome-user-share.nix
|
||||
./services/desktops/gnome3/rygel.nix
|
||||
./services/desktops/gnome3/seahorse.nix
|
||||
|
36
nixos/modules/programs/gnome-terminal.nix
Normal file
36
nixos/modules/programs/gnome-terminal.nix
Normal file
@ -0,0 +1,36 @@
|
||||
# GNOME Terminal.
|
||||
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.programs.gnome-terminal;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
# Added 2019-08-19
|
||||
imports = [
|
||||
(mkRenamedOptionModule
|
||||
[ "services" "gnome3" "gnome-terminal-server" "enable" ]
|
||||
[ "programs" "gnome-terminal" "enable" ])
|
||||
];
|
||||
|
||||
options = {
|
||||
|
||||
programs.gnome-terminal.enable = mkEnableOption "GNOME Terminal";
|
||||
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.gnome3.gnome-terminal ];
|
||||
services.dbus.packages = [ pkgs.gnome3.gnome-terminal ];
|
||||
systemd.packages = [ pkgs.gnome3.gnome-terminal ];
|
||||
|
||||
programs.bash.vteIntegration = true;
|
||||
programs.zsh.vteIntegration = true;
|
||||
};
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
# GNOME Documents daemon.
|
||||
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.gnome3.gnome-terminal-server = {
|
||||
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable GNOME Terminal server service,
|
||||
needed for gnome-terminal.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.services.gnome3.gnome-terminal-server.enable {
|
||||
|
||||
environment.systemPackages = [ pkgs.gnome3.gnome-terminal ];
|
||||
|
||||
services.dbus.packages = [ pkgs.gnome3.gnome-terminal ];
|
||||
|
||||
systemd.packages = [ pkgs.gnome3.gnome-terminal ];
|
||||
|
||||
};
|
||||
|
||||
}
|
@ -136,7 +136,6 @@ in {
|
||||
services.gnome3.gnome-online-accounts.enable = mkDefault true;
|
||||
services.gnome3.gnome-remote-desktop.enable = mkDefault true;
|
||||
services.gnome3.gnome-settings-daemon.enable = true;
|
||||
services.gnome3.gnome-terminal-server.enable = mkDefault true;
|
||||
services.gnome3.gnome-user-share.enable = mkDefault true;
|
||||
services.gvfs.enable = true;
|
||||
services.gnome3.rygel.enable = mkDefault true;
|
||||
@ -166,6 +165,7 @@ in {
|
||||
programs.file-roller.enable = mkDefault true;
|
||||
programs.gnome-disks.enable = mkDefault true;
|
||||
programs.gnome-documents.enable = mkDefault true;
|
||||
programs.gnome-terminal.enable = mkDefault true;
|
||||
|
||||
# If gnome3 is installed, build vim for gtk3 too.
|
||||
nixpkgs.config.vim.gui = "gtk3";
|
||||
|
Loading…
Reference in New Issue
Block a user