dotfiles/nixos/configuration.nix

119 lines
2.9 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.

# 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, inputs, ... }:
{
imports = [
./hardware-configuration.nix
];
# Enable experimental nix features.
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Networking
networking.hostName = "randomctf"; # Define your hostname.
networking.wireless.iwd.enable = true;
networking.networkmanager = {
enable = true;
wifi.backend = "iwd";
};
# General setup
time.timeZone = "America/Los_Angeles";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Enable Nvidia drivers
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
modesetting.enable = true;
# Power management is experimental and known to cause issues.
powerManagement.enable = false;
powerManagement.finegrained = false;
open = false; # Don't use open source kernel.
nvidiaSettings = true;
};
# Fix issue with Nvidia display scaling.
services.xserver.dpi = 96;
environment.variables.GDK_SCALE = "0.5";
# Enable the X11 windowing system and i3 window manager.
environment.pathsToLink = [ "/libexec" ];
services.xserver = {
enable = true;
windowManager.i3 = {
enable = true;
package = pkgs.i3-gaps;
extraPackages = with pkgs; [
rofi
polybar
rxvt-unicode
arandr
];
};
};
# Configure keymap in X11
services.xserver = {
layout = "us";
xkbVariant = "";
xkbOptions = "caps:escape";
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with
sound.enable = true;
hardware.pulseaudio.enable = true;
# Change default shell to zsh.
users.defaultUserShell = pkgs.zsh;
programs.zsh = {
enable = true;
autosuggestions.enable = true;
syntaxHighlighting.enable = true;
};
# Define a user account. Don't forget to set a password with passwd.
users.users.random = {
isNormalUser = true;
useDefaultShell = true;
description = "random";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [];
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
vim
git
picom
killall
];
system.stateVersion = "23.11";
}