Surface-Nixos/configuration.nix

165 lines
4.0 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, lib, pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
./bootloader-configuration.nix
./surfacebook-configuration.nix
./networking-configuration.nix
./application-configuration.nix
./software-development-configuration.nix
./faf-linux.nix
];
# Set time zone.
time.timeZone = "America/New_York";
# Select internationalisation properties.
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 opengl
hardware.graphics = {
enable = true;
enable32Bit = true;
};
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"vista-fonts"
"corefonts"
"steam"
"steam-original"
"steam-run"
"nvidia-x11"
"nvidia-settings"
"nvidia-persistenced"
"vscode"
"code"
"vscode-extension-ms-vscode-cpptools"
"vscode-extension-ms-vscode-remote-remote-ssh"
];
# Enable the X11 windowing system.
services.xserver.enable = true;
services.xserver.videoDrivers = [ "nvidia" ];
# Enable the KDE Plasma Desktop Environment.
services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;
# fonts
fonts.packages = with pkgs; [
vistafonts
corefonts
nerdfonts # nvchad dependency
];
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
# Define a user account.
users.users.caleb = {
isNormalUser = true;
description = "caleb";
extraGroups = [ "networkmanager" "wheel" ];
hashedPassword = "$y$j9T$v6EDyPW8C/K.Th4xg8MHL/$tA67k6U0kLtafTNNW2DM7j.xObjPSaZFQ4e/beBX7g2";
packages = with pkgs;
[
# spellcheck
hunspell
hunspellDicts.en-us
hunspellDicts.en-us-large
];
};
# disable sudo password for wheel
security.sudo.wheelNeedsPassword = false;
# List packages installed in system profile:
environment.systemPackages = with pkgs; [
appimage-run
git
protontricks
steam-run
wget
winetricks
wineWowPackages.stable
ripgrep # nvchad dependency
];
#neovim
programs.neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
configure = {
packages.nvchad-complete = with pkgs.vimPlugins; {
start = [
nvchad
nvchad-ui
];
};
};
};
# Enable CUPS to print documents.
services.printing.enable = true;
services.printing.drivers = [ pkgs.brlaser ];
# remote build
nix.buildMachines = [
{
hostName = "talos";
system = "x86_64-linux";
protocol = "ssh-ng";
speedFactor = 2;
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
mandatoryFeatures = [ ];
}
{
hostName = "january";
system = "x86_64-linux";
protocol = "ssh-ng";
speedFactor = 3;
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
mandatoryFeatures = [ ];
}
];
nix.distributedBuilds = true;
# optional, useful when the builder has a faster internet connection than yours
nix.extraOptions = ''
builders-use-substitutes = true
'';
# 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 = "23.11";
}