nixos-config/modules/generic.nix
2021-11-07 11:44:06 +01:00

69 lines
1.4 KiB
Nix

{ config, pkgs, ... }:
let
sshPubkeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE+X4vceRi79FLwwyzFzxNvaQlolQFrpYn0N4bgdLLaI root@hardlyworking"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFyGaBZIZYjiBhOFD2drvG316B9NUVSbMpTIhOCQur8P arch"
];
in
{
users.users = {
root.openssh.authorizedKeys.keys = sshPubkeys;
mc-fucker = {
isNormalUser = true;
openssh.authorizedKeys.keys = sshPubkeys;
hashedPassword = "$6$VlNqS5D2uxmzs$AXEEg63iQ5bMQDtU9.Cy4cd/UfQCHk9QNo2RuQmucNz6Y4Z2l0qM5lvr6KFcEdJi6vO7mYd761LrVrQ8J7nPw1";
extraGroups = [ "wheel" ];
};
};
time.timeZone = "Europe/Berlin";
i18n.defaultLocale = "en_GB.UTF-8";
zramSwap = {
enable = true;
memoryPercent = 200;
algorithm = "lzo-rle";
};
programs = {
zsh = import ./zsh.nix;
atop = {
enable = true;
netatop.enable = true;
};
vim.defaultEditor = true;
};
users.defaultUserShell = pkgs.zsh;
security.sudo.wheelNeedsPassword = false;
system.autoUpgrade = {
enable = true;
allowReboot = true;
};
services = {
openssh = {
enable = true;
passwordAuthentication = false;
};
tailscale.enable = true;
};
networking.firewall = {
trustedInterfaces = [ "tailscale0" ];
allowedUDPPorts = [ config.services.tailscale.port ];
};
environment.systemPackages = with pkgs; [
wget
htop
git
screen
rxvt_unicode.terminfo
nmap
dig
(import ./vim.nix)
];
}