274 lines
7.7 KiB
Nix
274 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, ... }:
|
|||
|
|
|||
|
{
|
|||
|
imports =
|
|||
|
[ # Include the results of the hardware scan.
|
|||
|
./hardware-configuration.nix
|
|||
|
];
|
|||
|
|
|||
|
# Use the systemd-boot EFI boot loader.
|
|||
|
boot = {
|
|||
|
blacklistedKernelModules = [ "k10temp" ];
|
|||
|
extraModulePackages = with config.boot.kernelPackages; [ zenpower ];
|
|||
|
kernelParams = [ "amd_pstate=passive" ];
|
|||
|
loader.systemd-boot.enable = true;
|
|||
|
loader.efi.canTouchEfiVariables = true;
|
|||
|
plymouth = {
|
|||
|
enable = false;
|
|||
|
theme = "breeze";
|
|||
|
};
|
|||
|
binfmt.emulatedSystems = [ "aarch64-linux" ];
|
|||
|
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'';
|
|||
|
};
|
|||
|
};
|
|||
|
powerManagement.cpuFreqGovernor = "schedutil";
|
|||
|
|
|||
|
|
|||
|
networking = {
|
|||
|
hostName = "smolboi"; # Define your hostname.
|
|||
|
# Pick only one of the below networking options.
|
|||
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|||
|
networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
|||
|
firewall.allowedTCPPorts = [ 22000 ];
|
|||
|
};
|
|||
|
nix = {
|
|||
|
settings = {
|
|||
|
experimental-features = [ "nix-command" "flakes" ];
|
|||
|
sandbox = true;
|
|||
|
};
|
|||
|
gc = {
|
|||
|
automatic = true;
|
|||
|
options = "--delete-older-than 30d";
|
|||
|
};
|
|||
|
optimise.automatic = true;
|
|||
|
};
|
|||
|
nixpkgs.config = {
|
|||
|
allowUnfree = true;
|
|||
|
permittedInsecurePackages = [
|
|||
|
"electron-25.9.0"
|
|||
|
"nix-2.16.2"
|
|||
|
];
|
|||
|
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
|
|||
|
winetricks
|
|||
|
];
|
|||
|
};
|
|||
|
};
|
|||
|
};
|
|||
|
|
|||
|
# Set your time zone.
|
|||
|
time.timeZone = "America/New_York";
|
|||
|
|
|||
|
# Configure network proxy if necessary
|
|||
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
|||
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|||
|
|
|||
|
# 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;
|
|||
|
displayManager.sddm = {
|
|||
|
enable = true;
|
|||
|
autoNumlock = true;
|
|||
|
};
|
|||
|
desktopManager.plasma5.enable = true;
|
|||
|
};
|
|||
|
|
|||
|
# Configure keymap in X11
|
|||
|
# services.xserver.xkb.layout = "us";
|
|||
|
# services.xserver.xkb.options = "eurosign:e,caps:escape";
|
|||
|
|
|||
|
# Enable CUPS to print documents.
|
|||
|
printing = {
|
|||
|
enable = true;
|
|||
|
drivers = [ pkgs.gutenprint ];
|
|||
|
};
|
|||
|
avahi = {
|
|||
|
enable = true;
|
|||
|
nssmdns = true;
|
|||
|
openFirewall = true;
|
|||
|
};
|
|||
|
printing.cups-pdf.enable = true;
|
|||
|
pipewire = {
|
|||
|
enable = true;
|
|||
|
alsa.enable = true;
|
|||
|
alsa.support32Bit = true;
|
|||
|
pulse.enable = true;
|
|||
|
};
|
|||
|
hardware.openrgb.enable = true;
|
|||
|
resolved.enable = true;
|
|||
|
btrfs.autoScrub.enable = true;
|
|||
|
};
|
|||
|
hardware = {
|
|||
|
sane = {
|
|||
|
enable = true;
|
|||
|
extraBackends = [ pkgs.sane-airscan ];
|
|||
|
};
|
|||
|
bluetooth.enable = true;
|
|||
|
};
|
|||
|
|
|||
|
# Enable sound.
|
|||
|
security = {
|
|||
|
rtkit.enable = true;
|
|||
|
wrappers.sunshine = {
|
|||
|
owner = "root";
|
|||
|
group = "root";
|
|||
|
capabilities = "cap_sys_admin+p";
|
|||
|
source = "${pkgs.sunshine}/bin/sunshine";
|
|||
|
};
|
|||
|
};
|
|||
|
# hardware.pulseaudio.enable = true;
|
|||
|
|
|||
|
# Enable touchpad support (enabled default in most desktopManager).
|
|||
|
# services.xserver.libinput.enable = true;
|
|||
|
|
|||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|||
|
# users.users.alice = {
|
|||
|
# isNormalUser = true;
|
|||
|
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
|||
|
# packages = with pkgs; [
|
|||
|
# firefox
|
|||
|
# tree
|
|||
|
# ];
|
|||
|
# };
|
|||
|
users.users.cdombroski = {
|
|||
|
isNormalUser = true;
|
|||
|
extraGroups = [ "wheel" ];
|
|||
|
uid = 1000;
|
|||
|
};
|
|||
|
|
|||
|
# List packages installed in system profile. To search, run:
|
|||
|
# $ nix search wget
|
|||
|
environment = {
|
|||
|
systemPackages = with pkgs; [
|
|||
|
vim-full # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
|||
|
libreoffice-qt
|
|||
|
firefox
|
|||
|
syncthing
|
|||
|
chromium
|
|||
|
skanlite
|
|||
|
htop
|
|||
|
git
|
|||
|
kate
|
|||
|
cifs-utils
|
|||
|
sunshine
|
|||
|
];
|
|||
|
pathsToLink = [ "/share/bash-completion" ];
|
|||
|
};
|
|||
|
|
|||
|
# 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;
|
|||
|
};
|
|||
|
|
|||
|
steam = {
|
|||
|
enable = true;
|
|||
|
remotePlay.openFirewall = true;
|
|||
|
gamescopeSession.enable = true;
|
|||
|
};
|
|||
|
firefox.nativeMessagingHosts.packages = with pkgs; [keepassxc libsForQt5.plasma-browser-integration ];
|
|||
|
gamemode = {
|
|||
|
enable = true;
|
|||
|
settings = {
|
|||
|
general = {
|
|||
|
reaper_freq = 5;
|
|||
|
desiredgov = "performance";
|
|||
|
softrealtime = "auto";
|
|||
|
};
|
|||
|
gpu = {
|
|||
|
apply_gpu_optimisations = "accept-responsibility";
|
|||
|
gpu_device = 0;
|
|||
|
amd_performance_level = "high";
|
|||
|
};
|
|||
|
};
|
|||
|
};
|
|||
|
gamescope.enable = true;
|
|||
|
};
|
|||
|
# List services that you want to enable:
|
|||
|
zramSwap = {
|
|||
|
enable = true;
|
|||
|
writebackDevice = "/dev/disk/by-partuuid/e8f5eaf8-46ca-40de-854a-f6dfe964b92d";
|
|||
|
};
|
|||
|
|
|||
|
# 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.
|
|||
|
|
|||
|
fileSystems = {
|
|||
|
"/".options = [ "compress=lzo" "autodefrag" "discard=async" "defaults" ];
|
|||
|
"/nix".options = [ "compress=lzo" "autodefrag" "discard=async" "noatime" "defaults" ];
|
|||
|
"/steam-library".options = [ "compress=lzo" "autodefrag" "discard=async" "defaults" ];
|
|||
|
"/home".options = [ "compress=lzo" "autodefrag" "discard=async" "defaults" ];
|
|||
|
};
|
|||
|
|
|||
|
# 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?
|
|||
|
system.autoUpgrade = {
|
|||
|
enable = true;
|
|||
|
flake = "/home/cdombroski/.dotfiles";
|
|||
|
flags = [
|
|||
|
"--update-input"
|
|||
|
"nixpkgs"
|
|||
|
];
|
|||
|
};
|
|||
|
|
|||
|
}
|
|||
|
|