nixos-config/Laptop/configuration.nix

137 lines
3.2 KiB
Nix
Raw Normal View History

2019-12-25 11:19:09 +00:00
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./software.nix
./modules/gnome.nix
./modules/zsh.nix
];
2020-05-16 17:32:53 +00:00
nixpkgs.config = {
allowUnfree = true;
android_sdk.accept_license = true;
};
2019-12-25 11:19:09 +00:00
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
2020-05-16 17:32:53 +00:00
boot.extraModulePackages = [ config.boot.kernelPackages.wireguard ];
2019-12-25 11:19:09 +00:00
# Networking
networking = {
hostName = "inex-hp-envy";
networkmanager.enable = true;
useDHCP = false;
interfaces = {
enp7s0 = {
useDHCP = true;
};
wlp8s0 = {
useDHCP = true;
};
};
firewall = {
2020-05-16 17:32:53 +00:00
allowedTCPPorts = [ 1716 51820 24642 ];
allowedUDPPorts = [ 1716 51820 24642 ];
2019-12-25 11:19:09 +00:00
};
};
# BLuetooth and audio
sound.enable = true;
hardware = {
bluetooth = {
enable = true;
package = pkgs.bluezFull;
};
pulseaudio = {
enable = true;
package = pkgs.pulseaudioFull;
2020-03-04 22:14:35 +00:00
support32Bit = true;
2019-12-25 11:19:09 +00:00
extraModules = [ pkgs.pulseaudio-modules-bt ];
};
};
# Select internationalisation properties.
# i18n = {
# consoleFont = "Lat2-Terminus16";
# consoleKeyMap = "us";
# defaultLocale = "en_US.UTF-8";
# };
# Set your time zone.
time.timeZone = "Europe/Moscow";
# List services that you want to enable:
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable the X11 windowing system.
services.xserver = {
enable = true;
layout = "us";
2020-05-16 17:32:53 +00:00
videoDrivers = [ "nvidia" ];
2019-12-25 11:19:09 +00:00
libinput.enable = true;
exportConfiguration = true;
wacom.enable = true;
#xkbOptions = "eurosign:e";
#displayManager.startx.enable = true;
};
# Video driver
2020-05-16 17:32:53 +00:00
hardware = {/*
2019-12-25 11:19:09 +00:00
bumblebee = {
enable = true;
driver = "nouveau";
2020-05-16 17:32:53 +00:00
};*/
2019-12-25 11:19:09 +00:00
opengl = {
enable = true;
driSupport32Bit = true;
2020-05-16 17:32:53 +00:00
};
2019-12-25 11:19:09 +00:00
nvidia = {
modesetting.enable = true;
2020-05-16 17:32:53 +00:00
prime = {
offload.enable = true;
# allowExternalGpu = true;
2019-12-25 11:19:09 +00:00
nvidiaBusId = "PCI:1:0:0";
intelBusId = "PCI:0:2:0";
};
2020-05-16 17:32:53 +00:00
};
2019-12-25 11:19:09 +00:00
};
2020-03-04 22:14:35 +00:00
programs = {
adb.enable = true;
java = {
enable = true;
};
};
2020-05-16 17:32:53 +00:00
virtualisation.docker.enable = true;
2020-03-04 22:14:35 +00:00
hardware.steam-hardware.enable = true;
2019-12-25 11:19:09 +00:00
# Define a user account. Don't forget to set a password with passwd.
users.users.inex = {
isNormalUser = true;
home = "/home/inex";
description = "Inex Code";
2020-05-16 17:32:53 +00:00
extraGroups = [ "wheel" "networkmanager" "jackaudio" "audio" "video" "adbusers" "docker" ]; # Enable sudo for the user.
2019-12-25 11:19:09 +00:00
};
# This value determines the NixOS release with which your system is to be
# compatible, in order to avoid breaking some software such as database
# servers. You should change this only after NixOS release notes say you
# should.
system.stateVersion = "19.09"; # Did you read the comment?}
}