298 lines
7.6 KiB
Nix
298 lines
7.6 KiB
Nix
# 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
|
||
./nix-alien.nix
|
||
./wireguard.nix
|
||
./apps/firefox.nix
|
||
];
|
||
|
||
# Bootloader.
|
||
boot.loader.efi.canTouchEfiVariables = true;
|
||
boot.loader = {
|
||
grub = {
|
||
enable = true;
|
||
useOSProber = true;
|
||
efiSupport = true;
|
||
device = "nodev";
|
||
gfxmodeEfi = "3440x1440";
|
||
# font = "${pkgs.ubuntu_font_family}/share/fonts/ubuntu/UbuntuMono-R.ttf";
|
||
font = "${pkgs.hack-font}/share/fonts/truetype/Hack-Regular.ttf";
|
||
fontSize = 36;
|
||
};
|
||
};
|
||
|
||
boot.kernelPackages = pkgs.linuxPackages_6_12;
|
||
# boot.kernelPatches = [
|
||
# {
|
||
# name = "amd-drm-glitch-fix";
|
||
# patch = (pkgs.fetchurl {
|
||
# url = "https://patchwork.freedesktop.org/patch/605900/raw/";
|
||
# hash = "sha256-WR537QGQak5pwm4BnLiQ/pc7gAkn2SdI3QRvGTRZSFE=";
|
||
# });
|
||
# }
|
||
# ];
|
||
boot.kernelParams = ["amd_pstate=active" "iommu=relaxed"];
|
||
boot.supportedFilesystems = ["ntfs"];
|
||
|
||
networking.hostName = "nixos"; # Define your hostname.
|
||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||
|
||
# Configure network proxy if necessary
|
||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||
|
||
# Enable networking
|
||
networking.networkmanager.enable = true;
|
||
|
||
# Set your time zone.
|
||
time.timeZone = "Europe/Moscow";
|
||
|
||
environment.sessionVariables = rec {
|
||
# fixing disappering cursor in alacritty - https://github.com/NixOS/nixpkgs/issues/22652
|
||
XCURSOR_THEME = "Vimix-cursors";
|
||
};
|
||
|
||
# Select internationalisation properties.
|
||
i18n.defaultLocale = "ru_RU.UTF-8";
|
||
|
||
i18n.extraLocaleSettings = {
|
||
LC_ADDRESS = "ru_RU.UTF-8";
|
||
LC_IDENTIFICATION = "ru_RU.UTF-8";
|
||
LC_MEASUREMENT = "ru_RU.UTF-8";
|
||
LC_MONETARY = "ru_RU.UTF-8";
|
||
LC_NAME = "ru_RU.UTF-8";
|
||
LC_NUMERIC = "ru_RU.UTF-8";
|
||
LC_PAPER = "ru_RU.UTF-8";
|
||
LC_TELEPHONE = "ru_RU.UTF-8";
|
||
LC_TIME = "ru_RU.UTF-8";
|
||
};
|
||
|
||
# Enable the X11 windowing system.
|
||
services.xserver.enable = true;
|
||
|
||
# Enable the GNOME Desktop Environment.
|
||
services.xserver.displayManager.gdm = {
|
||
enable = true;
|
||
wayland = true;
|
||
};
|
||
|
||
services.xserver.desktopManager.gnome = {
|
||
enable = true;
|
||
extraGSettingsOverridePackages = [ pkgs.mutter ];
|
||
extraGSettingsOverrides = ''
|
||
[org.gnome.mutter]
|
||
experimental-features=['scale-monitor-framebuffer']
|
||
'';
|
||
};
|
||
|
||
# Configure keymap in X11
|
||
services.xserver.xkb = {
|
||
layout = "us";
|
||
variant = "";
|
||
};
|
||
|
||
# Enable CUPS to print documents.
|
||
services.printing.enable = true;
|
||
|
||
# Enable sound with pipewire.
|
||
services.pulseaudio.enable = false;
|
||
security.rtkit.enable = true;
|
||
services.pipewire = {
|
||
enable = true;
|
||
alsa.enable = true;
|
||
alsa.support32Bit = true;
|
||
pulse.enable = true;
|
||
# If you want to use JACK applications, uncomment this
|
||
#jack.enable = true;
|
||
|
||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||
# no need to redefine it in your config for now)
|
||
#media-session.enable = true;
|
||
};
|
||
|
||
services.cpupower-gui.enable = true;
|
||
services.power-profiles-daemon.enable = false;
|
||
services.tlp = {
|
||
enable = true;
|
||
settings = {
|
||
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||
|
||
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||
|
||
CPU_MIN_PERF_ON_AC = 0;
|
||
CPU_MAX_PERF_ON_AC = 100;
|
||
CPU_MIN_PERF_ON_BAT = 0;
|
||
CPU_MAX_PERF_ON_BAT = 20;
|
||
|
||
USB_EXCLUDE_BTUSB = 1;
|
||
|
||
#Optional helps save long term battery health
|
||
START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge
|
||
STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
|
||
|
||
};
|
||
};
|
||
|
||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||
users.users.venya = {
|
||
isNormalUser = true;
|
||
description = "Dmitry Chumak";
|
||
extraGroups = [ "networkmanager" "wheel" ];
|
||
packages = with pkgs; [
|
||
];
|
||
};
|
||
|
||
# Install firefox.
|
||
|
||
programs.nix-ld.enable = true;
|
||
|
||
programs.steam = {
|
||
enable = true;
|
||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
||
};
|
||
|
||
# Allow unfree packages
|
||
nixpkgs.config.allowUnfree = true;
|
||
|
||
services.flatpak.enable = true;
|
||
# List packages installed in system profile. To search, run:
|
||
# $ nix search wget
|
||
|
||
services.syncthing = {
|
||
enable = true;
|
||
user = "venya";
|
||
dataDir = "/home/venya/Documents"; # Default folder for new synced folders
|
||
configDir = "/home/venya/.config/syncthing"; # Folder for Syncthing's settings and keys
|
||
};
|
||
|
||
environment.systemPackages = with pkgs; [
|
||
nix-search-cli
|
||
alacritty
|
||
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||
neovim
|
||
ripgrep
|
||
gnumake
|
||
dconf-editor
|
||
git
|
||
pstree
|
||
jq
|
||
nixd
|
||
nixpkgs-fmt
|
||
bfg-repo-cleaner
|
||
lazygit
|
||
tmux
|
||
ripgrep
|
||
dig
|
||
xclip
|
||
wget
|
||
nekoray
|
||
nix-index
|
||
inetutils
|
||
pciutils
|
||
tcpdump
|
||
gparted
|
||
inkscape
|
||
flameshot
|
||
thunderbird-128
|
||
cpupower-gui
|
||
ryzenadj
|
||
powertop
|
||
gcc
|
||
python312
|
||
python312Packages.nsz
|
||
python312Packages.detect-secrets
|
||
nodejs_20
|
||
go_1_23
|
||
jdk
|
||
linuxKernel.packages.linux_6_12.cpupower
|
||
linuxKernel.packages.linux_6_12.ryzen-smu
|
||
appimage-run
|
||
desktop-file-utils
|
||
vimix-cursors
|
||
vimix-icon-theme
|
||
vimix-gtk-themes
|
||
];
|
||
|
||
|
||
fonts = {
|
||
# https://www.programmingfonts.org/#roboto to check fonts visually
|
||
fontDir = {
|
||
enable = true;
|
||
};
|
||
fontconfig = {
|
||
defaultFonts = {
|
||
monospace = [
|
||
"RecMonoLinear Nerd Font Mono"
|
||
"Ubuntu Mono"
|
||
];
|
||
};
|
||
localConf = ''
|
||
<alias>
|
||
<family>RecMonoLinear Nerd Font Mono</family>
|
||
<prefer>
|
||
<family>Roboto Mono</family>
|
||
</prefer>
|
||
</alias>
|
||
'';
|
||
};
|
||
packages = with pkgs; [
|
||
iosevka
|
||
ubuntu_font_family
|
||
hack-font
|
||
cascadia-code
|
||
roboto-mono
|
||
nerd-fonts.fira-code
|
||
nerd-fonts.recursive-mono
|
||
nerd-fonts.iosevka
|
||
nerd-fonts.symbols-only
|
||
];
|
||
|
||
};
|
||
|
||
# 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;
|
||
# };
|
||
|
||
# List services that you want to enable:
|
||
|
||
# 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;
|
||
|
||
# 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. It‘s 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 = "23.11"; # Did you read the comment?
|
||
|
||
virtualisation.docker = {
|
||
enable = true;
|
||
rootless = {
|
||
enable = true;
|
||
setSocketVariable = true;
|
||
};
|
||
};
|
||
|
||
}
|