2019-07-02 03:47:20 +00:00
|
|
|
# Configuration common to all my servers
|
2019-06-27 01:44:00 +00:00
|
|
|
|
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
{
|
2019-09-06 06:52:44 +00:00
|
|
|
|
|
|
|
imports =
|
|
|
|
[
|
2020-01-07 00:01:42 +00:00
|
|
|
./tmux.nix
|
2019-09-06 06:52:44 +00:00
|
|
|
];
|
|
|
|
|
2019-06-27 01:44:00 +00:00
|
|
|
# Select internationalisation properties.
|
|
|
|
i18n = {
|
2019-12-09 05:09:40 +00:00
|
|
|
consoleFont = "ter-powerline-v16Rv";
|
2019-06-27 01:44:00 +00:00
|
|
|
consoleKeyMap = "us";
|
|
|
|
defaultLocale = "en_AU.UTF-8";
|
|
|
|
};
|
|
|
|
|
|
|
|
time.timeZone = "Australia/Brisbane"; # Set your preferred timezone:
|
|
|
|
|
|
|
|
# Set security options:
|
|
|
|
security.sudo.enable = true;
|
|
|
|
security.sudo.wheelNeedsPassword = false;
|
|
|
|
|
2019-12-09 05:09:40 +00:00
|
|
|
# Configure and install required fonts
|
|
|
|
fonts.enableDefaultFonts = true;
|
|
|
|
fonts.enableFontDir = true;
|
|
|
|
fonts.fonts = with pkgs; [
|
|
|
|
powerline-fonts # Required for Powerline prompts
|
|
|
|
];
|
|
|
|
|
2019-07-02 03:47:20 +00:00
|
|
|
# Enable Nix garbage collection:
|
|
|
|
nix.gc.automatic = true;
|
|
|
|
nix.gc.dates = "weekly";
|
|
|
|
nix.gc.options = "--delete-older-than 90d";
|
2019-08-08 03:53:48 +00:00
|
|
|
nix.autoOptimiseStore = true;
|
2019-07-02 03:47:20 +00:00
|
|
|
|
2019-07-03 13:00:17 +00:00
|
|
|
# Set the system-wide environment
|
|
|
|
environment = {
|
|
|
|
systemPackages = with pkgs; [
|
2019-08-20 11:04:28 +00:00
|
|
|
byobu # text-based window manager and terminal multiplexer.
|
|
|
|
htop # interactive process viewer
|
|
|
|
git # Distributed version control system
|
|
|
|
powerline-fonts # For zsh themes
|
|
|
|
lsof # list open files
|
2019-11-12 23:30:29 +00:00
|
|
|
direnv # A shell extension that manages your environment
|
2019-09-10 11:13:48 +00:00
|
|
|
(
|
2019-11-12 23:38:25 +00:00
|
|
|
import ../roles/vim.nix
|
2019-09-10 11:13:48 +00:00
|
|
|
)
|
2019-07-03 13:00:17 +00:00
|
|
|
];
|
2019-12-09 05:09:40 +00:00
|
|
|
variables = {
|
|
|
|
EDITOR = [ "vim"]; # Set the default editor
|
|
|
|
};
|
2019-07-03 13:00:17 +00:00
|
|
|
};
|
|
|
|
|
2019-12-10 14:37:04 +00:00
|
|
|
# Program defaults for all hosts
|
2019-07-02 03:47:20 +00:00
|
|
|
programs.zsh = {
|
|
|
|
enable = true;
|
|
|
|
autosuggestions = {
|
|
|
|
enable = true;
|
|
|
|
};
|
2019-11-12 23:30:29 +00:00
|
|
|
interactiveShellInit = ''
|
|
|
|
eval "$(direnv hook zsh)"
|
|
|
|
'';
|
2019-07-03 13:00:17 +00:00
|
|
|
# List of strings concatenated with "\n"
|
|
|
|
#loginShellInit = ''
|
2019-07-05 12:05:44 +00:00
|
|
|
# _byobu_sourced=1 . byobu 2>/dev/null || true
|
2019-07-03 13:00:17 +00:00
|
|
|
#'';
|
|
|
|
ohMyZsh = {
|
2019-07-02 03:47:20 +00:00
|
|
|
enable = true;
|
2019-07-05 13:10:37 +00:00
|
|
|
plugins = [ "git" "tmux" ];
|
2019-07-02 03:47:20 +00:00
|
|
|
};
|
2020-01-07 00:01:42 +00:00
|
|
|
promptInit = "source ${pkgs.zsh-powerlevel9k}/share/zsh-powerlevel9k/powerlevel9k.zsh-theme";
|
2019-07-02 03:47:20 +00:00
|
|
|
};
|
2019-06-27 01:44:00 +00:00
|
|
|
|
2019-12-10 14:37:04 +00:00
|
|
|
users.defaultUserShell = pkgs.zsh; # Set the default shell for all users
|
2019-07-02 03:12:01 +00:00
|
|
|
|
2019-06-27 01:44:00 +00:00
|
|
|
# Users common across MIO Ops:
|
|
|
|
users.mutableUsers = false; # Remove any users not defined in here
|
|
|
|
|
|
|
|
}
|