Added nix files
This commit is contained in:
35
modules/common.nix
Normal file
35
modules/common.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Bootloader
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
version = 2;
|
||||
device = "nodev";
|
||||
efiSupport = true;
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/mapper/root";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [{ device = "/swapfile"; size = 4096; }];
|
||||
|
||||
# Locales and timezone
|
||||
time.timeZone = "Europe/London";
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
|
||||
# UFW Firewall
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 22 ]; # Allow SSH
|
||||
};
|
||||
|
||||
# Enable SSH
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
permitRootLogin = "no";
|
||||
passwordAuthentication = false;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user