Surface-Nixos/configuration.nix

165 lines
4.0 KiB
Nix
Raw Permalink Normal View History

2024-01-29 23:07:13 -05:00
{ config, lib, pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
./bootloader-configuration.nix
./surfacebook-configuration.nix
./networking-configuration.nix
2024-01-29 23:07:13 -05:00
./application-configuration.nix
./software-development-configuration.nix
2024-03-15 23:20:46 -04:00
./faf-linux.nix
2024-01-29 23:07:13 -05:00
];
# 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
2024-07-23 11:01:31 -04:00
hardware.graphics = {
2024-01-29 23:07:13 -05:00
enable = true;
2024-07-23 11:01:31 -04:00
enable32Bit = true;
2024-01-29 23:07:13 -05:00
};
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"vista-fonts"
"corefonts"
"steam"
"steam-original"
"steam-run"
"nvidia-x11"
"nvidia-settings"
"nvidia-persistenced"
2024-02-29 19:19:49 -05:00
2024-01-29 23:07:13 -05:00
"vscode"
"code"
2024-05-10 11:04:18 -04:00
"vscode-extension-ms-vscode-cpptools"
"vscode-extension-ms-vscode-remote-remote-ssh"
2024-01-29 23:07:13 -05:00
];
# Enable the X11 windowing system.
services.xserver.enable = true;
services.xserver.videoDrivers = [ "nvidia" ];
# Enable the KDE Plasma Desktop Environment.
services.displayManager.sddm.enable = true;
2024-07-23 11:01:31 -04:00
services.desktopManager.plasma6.enable = true;
2024-01-29 23:07:13 -05:00
# fonts
fonts.packages = with pkgs; [
vistafonts
corefonts
2024-05-05 18:53:07 -04:00
nerdfonts # nvchad dependency
2024-01-29 23:07:13 -05:00
];
# 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;
};
2024-05-05 18:53:07 -04:00
# Define a user account.
2024-01-29 23:07:13 -05:00
users.users.caleb = {
isNormalUser = true;
description = "caleb";
extraGroups = [ "networkmanager" "wheel" ];
2024-01-29 23:07:13 -05:00
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";
2024-05-05 18:53:07 -04:00
speedFactor = 2;
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
mandatoryFeatures = [ ];
}
{
hostName = "january";
system = "x86_64-linux";
protocol = "ssh-ng";
2024-05-05 18:53:07 -04:00
speedFactor = 3;
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
mandatoryFeatures = [ ];
}
];
2024-01-29 23:07:13 -05:00
nix.distributedBuilds = true;
# optional, useful when the builder has a faster internet connection than yours
nix.extraOptions = ''
builders-use-substitutes = true
'';
2024-01-29 23:07:13 -05:00
# 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";
}