nixos-config/modules/common.nix
Luke Else e9416202dd
Some checks failed
NixOS Configuration Check / nixos-check (push) Failing after 23s
Removed encryption on root partition
2025-04-24 19:53:21 +01:00

61 lines
1.1 KiB
Nix

{ config, pkgs, ... }:
{
# Bootloader: systemd-boot with EFI support
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
# Kernel parameters for root
kernelParams = [ "root=/dev/sda1" ];
};
# File systems
fileSystems."/" = {
device = "/dev/sda1"; # root partition
fsType = "ext4";
};
# EFI partition mount (usually /boot or /boot/efi)
fileSystems."/boot" = {
device = "/dev/sda2"; # EFI partition
fsType = "vfat";
options = [ "nofail" "defaults" ];
};
# Swap file (4GB)
swapDevices = [
{
device = "/swapfile";
size = 4096; # 4GB
}
];
# Locale and timezone
time.timeZone = "Europe/London";
i18n.defaultLocale = "en_GB.UTF-8";
# Enable SSH
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
};
};
# Enable Docker
virtualisation.docker.enable = true;
# PipeWire for audio
services.pipewire = {
enable = true;
pulse.enable = true;
};
# Bluetooth
services.blueman.enable = true;
}