shorkie-flake/base/umbriel/configuration.nix
2025-07-27 00:01:27 +01:00

224 lines
5.8 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, lib, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
nix.package = pkgs.lix;
programs = {
adb.enable = true;
firefox.enable = true;
fish.enable = true;
gamescope = {
enable = true;
capSysNice = false;
};
flashrom.enable = true;
nix-ld.enable = true;
nix-ld.libraries = with pkgs; [xorg.libxcb libao xorg.libX11 libusb1 cargo rustc pkg-config cacert];
};
services.journald.extraConfig = ''
SystemMaxUse=2G
'';
environment.pathsToLink = [ "/share/xdg-desktop-portal" ];
security.sudo.package = pkgs.sudo.override { withInsults = true; };
services.tailscale = {
enable = true;
useRoutingFeatures = "both";
};
boot.supportedFilesystems = ["exfat" "ntfs" "xfs"];
boot.loader.limine.enable = true;
boot.loader.limine.style.wallpapers = [];
boot.loader.limine.additionalFiles = {
"efi/memtest86.efi" = "${pkgs.memtest86-efi}/BOOTX64.efi";
"efi/shell.efi" = "${pkgs.edk2-uefi-shell}/shell.efi";
};
boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.systemd.enable = true;
boot.loader.efi.efiSysMountPoint = "/boot/";
boot.kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ];
boot.extraModprobeConfig = "options nvidia_drm fbdev=1";
boot.extraModulePackages = [
config.boot.kernelPackages.v4l2loopback.out
];
boot.kernelPackages = pkgs.linuxKernel.packages.linux_xanmod_latest;
boot.kernel.sysctl = {
"vm.max_map_count" = 2147483642;
};
networking.hostName = "umbriel"; # Define your hostname.
powerManagement.cpuFreqGovernor = "performance";
# 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
hardware.graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [amdvlk mesa.opencl libvdpau-va-gl vaapiVdpau intel-media-driver vaapiIntel nvidia-vaapi-driver vulkan-validation-layers];
extraPackages32 = with pkgs; [driversi686Linux.amdvlk driversi686Linux.mesa.opencl];
};
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = true;
powerManagement.finegrained = true;
open = false;
nvidiaSettings = true;
nvidiaPersistenced = true;
package = config.boot.kernelPackages.nvidiaPackages.beta;
prime = {
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
offload = {
enable = true;
enableOffloadCmd = true;
};
};
};
hardware.bluetooth.enable = true;
services.blueman.enable = true;
networking.networkmanager = {
enable = true;
wifi.backend = "iwd";
};
# Set your time zone.
time.timeZone = "Europe/London";
# Select internationalisation properties.
i18n.defaultLocale = "en_GB.UTF-8";
services.udisks2.enable = true;
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_GB.UTF-8";
LC_IDENTIFICATION = "en_GB.UTF-8";
LC_MEASUREMENT = "en_GB.UTF-8";
LC_MONETARY = "en_GB.UTF-8";
LC_NAME = "en_GB.UTF-8";
LC_NUMERIC = "en_GB.UTF-8";
LC_PAPER = "en_GB.UTF-8";
LC_TELEPHONE = "en_GB.UTF-8";
LC_TIME = "en_GB.UTF-8";
};
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
systemd = {
user.services.polkit-gnome-authentication-agent-1 = {
description = "polkit-gnome-authentication-agent-1";
wantedBy = [ "graphical-session.target" ];
wants = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
};
security.polkit.enable = true;
# Enable the X11 windowing system.
services.xserver.enable = true;
services.xserver.videoDrivers = [ "nvidia" "i915" ];
programs.dconf.enable = true;
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "colemak";
};
# Enable CUPS to print documents.
services.printing.enable = true;
services.printing.drivers = [pkgs.gutenprint];
security = {
rtkit.enable = true;
};
# Enable sound with pipewire.
services.pulseaudio.enable = false;
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;
};
# Define a user account. Don't forget to set a password with passwd.
users.users.alyx = {
isNormalUser = true;
description = "Alyx";
extraGroups = [ "networkmanager" "wheel" "camera" "libvirtd" "qemu-libvirtd" "lxd" ];
packages = with pkgs; [
];
};
programs.virt-manager.enable = true;
nixpkgs.config.packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;};
};
services.libinput.enable = true;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
wget
neovim
cbfstool
xwayland-satellite
git
keepassxc
pulseaudio
winetricks
p7zip
cabextract
unzip
wineWowPackages.stable
vulkan-extension-layer
vulkan-loader
vulkan-tools
(pkgs.python3.withPackages (ps: with ps; [tkinter]))
];
powerManagement.powertop.enable = true;
services.thermald.enable = true;
system.stateVersion = "24.11"; # Did you read the comment?
}