diff options
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r-- | nixos/modules/programs/bash/bash.nix | 2 | ||||
-rw-r--r-- | nixos/modules/programs/tmux.nix | 35 | ||||
-rw-r--r-- | nixos/modules/programs/virtualbox.nix | 4 |
3 files changed, 38 insertions, 3 deletions
diff --git a/nixos/modules/programs/bash/bash.nix b/nixos/modules/programs/bash/bash.nix index e4e264ec0036..1c3c07a1c210 100644 --- a/nixos/modules/programs/bash/bash.nix +++ b/nixos/modules/programs/bash/bash.nix @@ -56,7 +56,7 @@ in */ shellAliases = mkOption { - default = config.environment.shellAliases; + default = config.environment.shellAliases // { which = "type -P"; }; description = '' Set of aliases for bash shell. See <option>environment.shellAliases</option> for an option format description. diff --git a/nixos/modules/programs/tmux.nix b/nixos/modules/programs/tmux.nix new file mode 100644 index 000000000000..4220a2e17b3f --- /dev/null +++ b/nixos/modules/programs/tmux.nix @@ -0,0 +1,35 @@ +{ config, pkgs, lib, ... }: + +let + inherit (lib) mkOption mkEnableOption mkIf mkMerge types; + + cfg = config.programs.tmux; + +in +{ + ###### interface + + options = { + programs.tmux = { + + enable = mkEnableOption "<command>tmux</command> - a <command>screen</command> replacement."; + + tmuxconf = mkOption { + default = ""; + description = '' + The contents of /etc/tmux.conf + ''; + type = types.lines; + }; + }; + }; + + ###### implementation + + config = mkIf cfg.enable { + environment = { + systemPackages = [ pkgs.tmux ]; + etc."tmux.conf".text = cfg.tmuxconf; + }; + }; +} diff --git a/nixos/modules/programs/virtualbox.nix b/nixos/modules/programs/virtualbox.nix index a00b1e5f64d0..be96cf23b396 100644 --- a/nixos/modules/programs/virtualbox.nix +++ b/nixos/modules/programs/virtualbox.nix @@ -1,8 +1,8 @@ let msg = "Importing <nixpkgs/nixos/modules/programs/virtualbox.nix> is " - + "deprecated, please use `services.virtualboxHost.enable = true' " + + "deprecated, please use `virtualisation.virtualbox.host.enable = true' " + "instead."; in { config.warnings = [ msg ]; - config.services.virtualboxHost.enable = true; + config.virtualisation.virtualbox.host.enable = true; } |