264 lines
7.7 KiB
Nix
264 lines
7.7 KiB
Nix
# Edit this configuration file to define what should be installed on
|
||
# your system. Help is available in the configuration.nix(5) man page, on
|
||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||
|
||
{ config, lib, pkgs, ... }:
|
||
let
|
||
# discover-wrapper is needed as of 1/24/24 since PackageKit does not work correctly so this removes error messages.
|
||
discover-wrapped = pkgs.symlinkJoin
|
||
{
|
||
name = "discover-flatpak-backend";
|
||
paths = [ pkgs.libsForQt5.discover ];
|
||
buildInputs = [ pkgs.makeWrapper ];
|
||
postBuild = ''
|
||
wrapProgram $out/bin/plasma-discover --add-flags "--backends flatpak"
|
||
'';
|
||
};
|
||
in
|
||
{
|
||
imports =
|
||
[ # Include the results of the hardware scan.
|
||
./hardware-configuration.nix
|
||
./cachix.nix
|
||
];
|
||
|
||
# Enable nix flakes and nix-command tools
|
||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||
|
||
# Enable non free
|
||
nixpkgs.config.allowUnfree = true;
|
||
|
||
time.hardwareClockInLocalTime = true;
|
||
|
||
# Use the systemd-boot EFI boot loader.
|
||
boot.loader.systemd-boot.enable = false;
|
||
boot.loader.systemd-boot.configurationLimit = 5;
|
||
boot.loader.efi.canTouchEfiVariables = true;
|
||
boot.loader.efi.efiSysMountPoint = "/boot";
|
||
|
||
boot.bootspec.enable = true;
|
||
|
||
boot.lanzaboote = {
|
||
enable = true;
|
||
pkiBundle = "/etc/secureboot";
|
||
settings = {
|
||
default = "@saved";
|
||
console-mode = "max";
|
||
};
|
||
configurationLimit = 2;
|
||
};
|
||
|
||
services.fwupd.enable = true;
|
||
hardware.enableAllFirmware = true;
|
||
|
||
# Override kernel to latest
|
||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||
|
||
networking.hostName = "matt-nixos"; # Define your hostname.
|
||
# Pick only one of the below networking options.
|
||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||
|
||
# Bluetooth
|
||
hardware.bluetooth.enable = true;
|
||
hardware.xpadneo.enable = true;
|
||
|
||
# Steam udev rules for remote play
|
||
hardware.steam-hardware.enable = true;
|
||
|
||
# Set your time zone.
|
||
time.timeZone = "America/Chicago";
|
||
|
||
# Configure network proxy if necessary
|
||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||
|
||
# Network option required using sysctl to let Ubisoft Connect work as of 7-12-2023
|
||
boot.kernel.sysctl."net.ipv4.tcp_mtu_probing" = 1;
|
||
|
||
# Select internationalisation properties.
|
||
# i18n.defaultLocale = "en_US.UTF-8";
|
||
# console = {
|
||
# font = "Lat2-Terminus16";
|
||
# keyMap = "us";
|
||
# useXkbConfig = true; # use xkb.options in tty.
|
||
# };
|
||
|
||
# Enable the X11 windowing system.
|
||
services.xserver.enable = true;
|
||
|
||
|
||
# Enable the Plasma 5 Desktop Environment.
|
||
services.xserver.displayManager.sddm.enable = true;
|
||
# services.xserver.desktopManager.plasma5.enable = true;
|
||
services.xserver.desktopManager.plasma6.enable = true;
|
||
# services.xserver.displayManager.defaultSession = "plasmawayland";
|
||
services.xserver.displayManager.defaultSession = "plasma";
|
||
|
||
# Configure keymap in X11
|
||
# services.xserver.xkb.layout = "us";
|
||
# services.xserver.xkb.options = "eurosign:e,caps:escape";
|
||
|
||
# Enable CUPS to print documents.
|
||
services.printing.enable = true;
|
||
|
||
# enable auto discovery of printers
|
||
services.avahi = {
|
||
enable = true;
|
||
nssmdns4 = true;
|
||
openFirewall = true;
|
||
};
|
||
|
||
# Enable sound.
|
||
# sound.enable = true;
|
||
# hardware.pulseaudio.enable = true;
|
||
|
||
hardware.pulseaudio.enable = false;
|
||
security.rtkit.enable = true;
|
||
services.pipewire = {
|
||
enable = true;
|
||
alsa.enable = true;
|
||
alsa.support32Bit = true;
|
||
pulse.enable = true;
|
||
};
|
||
|
||
# Enable Flatpak
|
||
services.flatpak.enable = true;
|
||
# xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-kde ];
|
||
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||
|
||
# Enable AppImage
|
||
boot.binfmt.registrations.appimage = {
|
||
wrapInterpreterInShell = false;
|
||
interpreter = "${pkgs.appimage-run}/bin/appimage-run";
|
||
recognitionType = "magic";
|
||
offset = 0;
|
||
mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff'';
|
||
magicOrExtension = ''\x7fELF....AI\x02'';
|
||
};
|
||
|
||
# Force radv
|
||
environment.variables.AMD_VULKAN_ICD = "RADV";
|
||
|
||
hardware.opengl.extraPackages = [
|
||
pkgs.amdvlk
|
||
];
|
||
|
||
# To enable Vulkan support for 32-bit applications, also add:
|
||
hardware.opengl.extraPackages32 = [
|
||
pkgs.driversi686Linux.amdvlk
|
||
];
|
||
|
||
# Enable touchpad support (enabled default in most desktopManager).
|
||
# services.xserver.libinput.enable = true;
|
||
|
||
programs.fish.enable = true;
|
||
|
||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||
users.users.matt = {
|
||
isNormalUser = true;
|
||
extraGroups = [ "wheel" "networkmanager" ]; # Enable ‘sudo’ for the user.
|
||
shell = pkgs.fish;
|
||
packages = with pkgs; [
|
||
firefox
|
||
tree
|
||
lm_sensors
|
||
vmware-horizon-client
|
||
];
|
||
};
|
||
|
||
# List packages installed in system profile. To search, run:
|
||
# $ nix search wget
|
||
environment.systemPackages = with pkgs; [
|
||
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||
wget
|
||
nano
|
||
os-prober
|
||
efibootmgr
|
||
git
|
||
sbctl
|
||
gparted
|
||
discover-wrapped
|
||
pciutils
|
||
papirus-icon-theme
|
||
|
||
neofetch
|
||
gamescope
|
||
mangohud
|
||
goverlay
|
||
heroic
|
||
];
|
||
|
||
programs.java.enable = true;
|
||
programs.corectrl.enable = true;
|
||
|
||
# Steam
|
||
programs.steam = {
|
||
enable = true;
|
||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
||
};
|
||
hardware.opengl.driSupport32Bit = true; # Enables support for 32bit libs that steam uses
|
||
|
||
nixpkgs.config.packageOverrides = pkgs: {
|
||
steam = pkgs.steam.override {
|
||
extraPkgs = pkgs: with pkgs; [
|
||
xorg.libXcursor
|
||
xorg.libXi
|
||
xorg.libXinerama
|
||
xorg.libXScrnSaver
|
||
libpng
|
||
libpulseaudio
|
||
libvorbis
|
||
stdenv.cc.cc.lib
|
||
libkrb5
|
||
keyutils
|
||
];
|
||
};
|
||
};
|
||
|
||
# Some programs need SUID wrappers, can be configured further or are
|
||
# started in user sessions.
|
||
# programs.mtr.enable = true;
|
||
# programs.gnupg.agent = {
|
||
# enable = true;
|
||
# enableSSHSupport = true;
|
||
# };
|
||
|
||
# List services that you want to enable:
|
||
|
||
# Enable the OpenSSH daemon.
|
||
# services.openssh.enable = true;
|
||
|
||
# Open ports in the firewall.
|
||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||
# Or disable the firewall altogether.
|
||
# networking.firewall.enable = false;
|
||
|
||
# Copy the NixOS configuration file and link it from the resulting system
|
||
# (/run/current-system/configuration.nix). This is useful in case you
|
||
# accidentally delete configuration.nix.
|
||
# system.copySystemConfiguration = true;
|
||
|
||
# This option defines the first version of NixOS you have installed on this particular machine,
|
||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||
#
|
||
# Most users should NEVER change this value after the initial install, for any reason,
|
||
# even if you've upgraded your system to a new NixOS release.
|
||
#
|
||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||
# so changing it will NOT upgrade your system.
|
||
#
|
||
# This value being lower than the current NixOS release does NOT mean your system is
|
||
# out of date, out of support, or vulnerable.
|
||
#
|
||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||
# and migrated your data accordingly.
|
||
#
|
||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||
system.stateVersion = "23.11"; # Did you read the comment?
|
||
|
||
}
|
||
|