From 4a46140d29bd4e1b75ac61070b8272728aa819ba Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Wed, 21 Aug 2019 15:58:59 -0400 Subject: [PATCH] nixos/gnome-terminal: init This module obsoletes services.gnome3.gnome-terminal-server as that's a confusing option for users, and sounds internal. It's much simpler to have a gnome-terminal module. --- nixos/modules/module-list.nix | 2 +- nixos/modules/programs/gnome-terminal.nix | 36 ++++++++++++++++ .../desktops/gnome3/gnome-terminal-server.nix | 41 ------------------- .../services/x11/desktop-managers/gnome3.nix | 2 +- 4 files changed, 38 insertions(+), 43 deletions(-) create mode 100644 nixos/modules/programs/gnome-terminal.nix delete mode 100644 nixos/modules/services/desktops/gnome3/gnome-terminal-server.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index fc5821f6030a..249f50afaef9 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -116,6 +116,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 @@ -296,7 +297,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/gvfs.nix ./services/desktops/gnome3/rygel.nix diff --git a/nixos/modules/programs/gnome-terminal.nix b/nixos/modules/programs/gnome-terminal.nix new file mode 100644 index 000000000000..0036677a1576 --- /dev/null +++ b/nixos/modules/programs/gnome-terminal.nix @@ -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; + }; +} diff --git a/nixos/modules/services/desktops/gnome3/gnome-terminal-server.nix b/nixos/modules/services/desktops/gnome3/gnome-terminal-server.nix deleted file mode 100644 index fd14efee5f2e..000000000000 --- a/nixos/modules/services/desktops/gnome3/gnome-terminal-server.nix +++ /dev/null @@ -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 ]; - - }; - -} diff --git a/nixos/modules/services/x11/desktop-managers/gnome3.nix b/nixos/modules/services/x11/desktop-managers/gnome3.nix index b0e2b34a31e2..b8e2db600a99 100644 --- a/nixos/modules/services/x11/desktop-managers/gnome3.nix +++ b/nixos/modules/services/x11/desktop-managers/gnome3.nix @@ -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.gnome3.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";