Skip to content

Instantly share code, notes, and snippets.

@ebzzry
Last active May 21, 2020 00:17
Show Gist options
  • Save ebzzry/023fb85e753fd5bb78d7cd10f7bf5bb4 to your computer and use it in GitHub Desktop.
Save ebzzry/023fb85e753fd5bb78d7cd10f7bf5bb4 to your computer and use it in GitHub Desktop.
{ config, lib, pkgs, ... }:
{
imports = [
./hardware-configuration.nix
];
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
initrd.availableKernelModules = [
"xhci_pci"
"ehci_pci"
"ahci"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
initrd.luks.devices = {
"root" = {
device = "/dev/vg/root";
preLVM = false;
};
};
cleanTmpDir = true;
};
fileSystems = {
"/boot" = {
device = "/dev/disk/by-uuid/D5FE-BECB";
fsType = "vfat";
};
"/" = {
device = "/dev/mapper/root";
fsType = "ext4";
};
};
swapDevices = [
{
device = "/dev/vg/swap";
}
];
networking = {
hostName = "mehfoo";
hostId = "7B1548AE";
enableIPv6 = true;
networkmanager = {
enable = true;
};
};
environment = {
systemPackages = with pkgs; [ zsh ];
};
fonts = {
fontconfig.enable = true;
enableCoreFonts = true;
enableGhostscriptFonts = true;
fonts = with pkgs; [
dejavu_fonts
liberation_ttf
ttf_bitstream_vera
];
};
time.timeZone = "Asia/Manila";
security.sudo = {
enable = true;
configFile = ''
Defaults env_reset
root ALL = (ALL:ALL) ALL
%wheel ALL = (ALL) SETENV: NOPASSWD: ALL
'';
};
nixpkgs.config = {
allowUnfree = true;
};
nix = {
maxJobs = lib.mkDefault 4;
gc.automatic = false;
trustedBinaryCaches = [
"http://hydra.nixos.org"
"http://hydra.cryp.to"
"http://cache.nixos.org"
];
useSandbox = true;
};
programs = {
ssh = {
startAgent = true;
};
};
hardware = {
cpu.intel.updateMicrocode = true;
opengl.driSupport = true;
opengl.driSupport32Bit = true;
bluetooth.enable = true;
};
services = {
xserver = {
autorun = true;
defaultDepth = 24;
enable = true;
displayManager.lightdm.enable = true;
desktopManager.plasma5.enable = true;
videoDrivers = [ "intel" ];
};
openssh = {
enable = true;
ports = [ 2222 ];
passwordAuthentication = false;
permitRootLogin = "no";
};
ntp = {
enable = true;
servers = [ "asia.pool.ntp.org" "0.pool.ntp.org" "1.pool.ntp.org" "2.pool.ntp.org" ];
};
};
users = {
extraUsers.user = {
isNormalUser = true;
uid = 1000;
extraGroups = [ "wheel" "networkmanager" "docker" ];
};
defaultUserShell = "/run/current-system/sw/bin/zsh";
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment