mio-ops/roles/host_common.nix
Serĉanto de Scio d77d188e85
Set powerline variables
Also carved out options to server_common.nix
2019-12-09 15:09:40 +10:00

83 lines
2 KiB
Nix

# Configuration common to all my servers
{ config, pkgs, lib, ... }:
{
imports =
[
];
# Select internationalisation properties.
i18n = {
consoleFont = "ter-powerline-v16Rv";
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;
# Configure and install required fonts
fonts.enableDefaultFonts = true;
fonts.enableFontDir = true;
fonts.fonts = with pkgs; [
powerline-fonts # Required for Powerline prompts
];
# Enable Nix garbage collection:
nix.gc.automatic = true;
nix.gc.dates = "weekly";
nix.gc.options = "--delete-older-than 90d";
nix.autoOptimiseStore = true;
# Set the system-wide environment
environment = {
systemPackages = with pkgs; [
byobu # text-based window manager and terminal multiplexer.
htop # interactive process viewer
tmux # Terminal multiplexer required by byobu
git # Distributed version control system
powerline-fonts # For zsh themes
lsof # list open files
direnv # A shell extension that manages your environment
(
import ../roles/vim.nix
)
];
variables = {
EDITOR = [ "vim"]; # Set the default editor
};
};
# Program defauls for Linode VMs
programs.zsh = {
enable = true;
autosuggestions = {
enable = true;
};
interactiveShellInit = ''
eval "$(direnv hook zsh)"
'';
# List of strings concatenated with "\n"
#loginShellInit = ''
# _byobu_sourced=1 . byobu 2>/dev/null || true
#'';
ohMyZsh = {
enable = true;
plugins = [ "git" "tmux" ];
theme = "agnoster";
};
};
# Set the default shell for all users
users.defaultUserShell = "/run/current-system/sw/bin/zsh";
# Users common across MIO Ops:
users.mutableUsers = false; # Remove any users not defined in here
}