Files
dotfiles/nixos/configuration.nix
T

169 lines
3.3 KiB
Nix
Raw 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
];
# Bootloader.
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.useOSProber = true;
boot.kernelParams = [ "quiet" ];
boot.extraModulePackages = [ config.boot.kernelPackages.amneziawg ];
boot.kernelModules = [ "amneziawg" ];
programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [
stdenv.cc.cc
zlib
fuse3
icu
nss
openssl
curl
expat
];
networking.hostName = "nixos-vm";
networking.networkmanager.enable = true;
time.timeZone = "Europe/Moscow";
i18n.defaultLocale = "en_US.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";
};
services.xserver.enable = true;
services.xserver.displayManager.sddm.enable = true;
services.xserver.displayManager.sddm.wayland.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
environment.sessionVariables.NIXOS_OZONE_WL = "1";
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "";
};
# Enable CUPS to print documents.
services.printing.enable = true;
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
# Define a user account. Don't forget to set a password with passwd.
users.users.ada = {
isNormalUser = true;
description = "ada";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
vim
neovim
code
jetbrains.idea-community
tmux
zsh
oh-my-zsh
fzf
ripgrep
fd
bat
eza
lsd
git
gh
lazygit
curl
wget
jq
nix-output-monitor
nvd
nix-tree
comma
htop
btop
tree
];
};
environment.systemPackages = with pkgs; [
vim
wget
git
curl
amneziawg-tools
nix-output-monitor
nvd
nix-tree
comma
htop
neofetch
];
nix = {
package = pkgs.nix;
settings = {
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
};
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
};
nixpkgs.config.allowUnfree = true;
programs.firefox.enable = true;
programs.amnezia-vpn.enable = true;
programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
PubkeyAuthentication = true;
};
};
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ 22 ];
virtualisation.virtualbox.guest.enable = true;
virtualisation.virtualbox.guest.dragAndDrop = true;
virtualisation.virtualbox.guest.clipboard = true;
system.stateVersion = "25.05";
}