From d77d188e85267e9210185a6e5a08e4c19580fa73 Mon Sep 17 00:00:00 2001 From: Craige McWhirter Date: Mon, 9 Dec 2019 15:09:40 +1000 Subject: [PATCH] Set powerline variables Also carved out options to server_common.nix --- roles/host_common.nix | 55 +++++++++---------------------------------- 1 file changed, 11 insertions(+), 44 deletions(-) diff --git a/roles/host_common.nix b/roles/host_common.nix index ac844c9..0e28f91 100644 --- a/roles/host_common.nix +++ b/roles/host_common.nix @@ -10,7 +10,7 @@ # Select internationalisation properties. i18n = { - consoleFont = "Lat2-Terminus16"; + consoleFont = "ter-powerline-v16Rv"; consoleKeyMap = "us"; defaultLocale = "en_AU.UTF-8"; }; @@ -21,6 +21,13 @@ 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"; @@ -41,6 +48,9 @@ import ../roles/vim.nix ) ]; + variables = { + EDITOR = [ "vim"]; # Set the default editor + }; }; # Program defauls for Linode VMs @@ -62,25 +72,6 @@ theme = "agnoster"; }; }; - programs.mosh = { - enable = true; - withUtempter = true; - }; - - # List services that you want to enable: - services.openssh = { - enable = true; # Enable the OpenSSH daemon. - permitRootLogin = "without-password"; - challengeResponseAuthentication = false; - passwordAuthentication = false; - openFirewall = true; - hostKeys = [ - { - path = "/etc/ssh/ssh_host_ed25519_key"; - type = "ed25519"; - } - ]; - }; # Set the default shell for all users users.defaultUserShell = "/run/current-system/sw/bin/zsh"; @@ -88,28 +79,4 @@ # Users common across MIO Ops: users.mutableUsers = false; # Remove any users not defined in here - users.users.root = { - hashedPassword = "$6$yak.T2uXItw5j2tU$E5kW9iDMXBc86voxJjxnrUcY0DrW/7WaQY0aGZ5sIJ2JPYZOhDslTKqOYK8sDSJGhM/mCxjPbJq4JGFsObN7D1"; - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDtjE0YstRzlh+Zhlj03th9DYOkMqJ5xHUcderBq151K craige@mcwhirter.io" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID7qAXTCAnqq+3ks4L8/2f4J8RxmrFaMOCA7m9ImbW2m craige@sealgair" - ]; - }; - - # MIO Ops groups: - users.groups.craige.gid = 1000; - - # MIO Ops Users - users.users.craige = { - isNormalUser = true; - uid = 1000; - group = "craige"; - extraGroups = ["wheel" ]; - hashedPassword = "$6$ZNvCXNzwtdeV0pd$iKraghNGImwzx3IhVk6.wi6Bl7yFS6jLbxm9zeE4xq6.WLkYtVnnP323bstos8sVhD4L9Z21gMGVY3MLtmvlH0"; - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDtjE0YstRzlh+Zhlj03th9DYOkMqJ5xHUcderBq151K craige@mcwhirter.io" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID7qAXTCAnqq+3ks4L8/2f4J8RxmrFaMOCA7m9ImbW2m craige@sealgair" - ]; - }; - }