gpd-pocket2/configuration.nix
2020-11-13 21:51:29 +03:00

149 lines
5.4 KiB
Nix
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ░██████╗░██████╗░██████╗░  ██████╗░░█████╗░░█████╗░██╗░░██╗███████╗████████╗  ██████╗░
# ██╔════╝░██╔══██╗██╔══██╗  ██╔══██╗██╔══██╗██╔══██╗██║░██╔╝██╔════╝╚══██╔══╝  ╚════██╗
# ██║░░██╗░██████╔╝██║░░██║  ██████╔╝██║░░██║██║░░╚═╝█████═╝░█████╗░░░░░██║░░░  ░░███╔═╝
# ██║░░╚██╗██╔═══╝░██║░░██║  ██╔═══╝░██║░░██║██║░░██╗██╔═██╗░██╔══╝░░░░░██║░░░  ██╔══╝░░
# ╚██████╔╝██║░░░░░██████╔╝  ██║░░░░░╚█████╔╝╚█████╔╝██║░╚██╗███████╗░░░██║░░░  ███████╗
# ░╚═════╝░╚═╝░░░░░╚═════╝░  ╚═╝░░░░░░╚════╝░░╚════╝░╚═╝░░╚═╝╚══════╝░░░╚═╝░░░  ╚══════╝
{ config, pkgs, lib, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./kernel.nix
./gnome.nix
./sway.nix
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.timeout = 2;
#boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelParams = [ "video=efifb" "fbcon=rotate:1" "quiet" ];
boot.kernel.sysctl."vm.swappiness" = 1;
hardware.cpu.intel.updateMicrocode = true;
networking.hostName = "pipboy4k";
networking.useDHCP = false;
#networking.interfaces.wlp1s0.useDHCP = true;
networking.networkmanager.enable = true;
networking.networkmanager.wifi.backend = "iwd";
i18n.defaultLocale = "en_US.UTF-8";
# Set your time zone.
time.timeZone = "Europe/Moscow";
nixpkgs.config.allowUnfree = true; # I'm sorry Mr. Richard
environment.systemPackages = with pkgs; [
wget neovim curl git neofetch pv ncdu mesa-demos mpv exa aria2
kitty firefox-wayland rsync qutebrowser qbittorrent gimp synergy
vulkan-tools vulkan-loader ranger nnn fd mdcat youtube-dl atool p7zip
lazygit htop libva-utils intel-gpu-tools fscrypt-experimental zstd
element-desktop
];
#Flatpak
services.flatpak.enable = true;
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-wlr ];
#EDITOR
programs.vim.defaultEditor = true;
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# pinentryFlavor = "gnome3";
# };
# Services:
# TLP
services.tlp.enable = true;
# Enable the OpenSSH daemon.
services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
networking.firewall.enable = false;
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
sound.enable = true;
hardware.pulseaudio.enable = true;
hardware.pulseaudio.extraModules = [ pkgs.pulseaudio-modules-bt ];
hardware.pulseaudio.daemon.config = {
resample-method = "soxr-hq";
avoid-resampling = "true";
default-sample-format="float32le";
};
# Enable the X11 windowing system.
services.xserver.enable = true;
services.xserver.layout = "us,ru";
services.xserver.xkbVariant = ",phonetic_winkeys";
services.xserver.xkbOptions = "grp:caps_toggle";
# Hardware video encoding
nixpkgs.config.packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
};
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver
vaapiIntel
vaapiVdpau
libvdpau-va-gl
];
};
# Enable touchpad support.
# services.xserver.libinput.enable = true;
# Groups / Users
users.groups.games = {};
#security.pam.enableFscrypt = true;
users.users.neothefox = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "video" "games" ];
shell = pkgs.zsh;
};
programs.zsh = {
enable = true;
enableCompletion = true;
enableBashCompletion = true;
ohMyZsh = {
enable = true;
plugins = [ "git" "sudo" "man" ];
theme = "robbyrussell";
};
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "20.03"; # Did you read the comment?
}