2024-04-05 22:04:41 -04:00
|
|
|
|
# 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
|
2024-04-26 14:14:50 -04:00
|
|
|
|
../../modules/common.nix
|
2024-04-26 12:54:06 -04:00
|
|
|
|
../../modules/smartd.nix
|
2024-04-05 22:04:41 -04:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# 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";
|
2024-04-13 14:13:38 -04:00
|
|
|
|
dates = "weekly";
|
2024-04-05 22:04:41 -04:00
|
|
|
|
};
|
|
|
|
|
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.
|
|
|
|
|
# };
|
|
|
|
|
|
2024-04-24 22:06:46 -04:00
|
|
|
|
system.autoUpgrade = {
|
|
|
|
|
enable = true;
|
|
|
|
|
flake = "git+https://git.icanttype.org/cdombroski/nix-configs.git";
|
|
|
|
|
};
|
|
|
|
|
|
2024-04-05 22:04:41 -04:00
|
|
|
|
# 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;
|
2024-04-13 14:13:38 -04:00
|
|
|
|
openssh.enable = true;
|
2024-04-05 22:04:41 -04:00
|
|
|
|
};
|
|
|
|
|
hardware = {
|
|
|
|
|
sane = {
|
|
|
|
|
enable = true;
|
|
|
|
|
extraBackends = [ pkgs.sane-airscan ];
|
|
|
|
|
};
|
|
|
|
|
bluetooth.enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Enable sound.
|
|
|
|
|
security = {
|
|
|
|
|
rtkit.enable = true;
|
|
|
|
|
};
|
|
|
|
|
# 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
|
|
|
|
|
# ];
|
|
|
|
|
# };
|
2024-04-13 14:13:38 -04:00
|
|
|
|
users.users.root.openssh.authorizedKeys.keys = [
|
|
|
|
|
"ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAgEApZvmNao6HvjOI3NQ96+Hu+N4MTw20KSvrx7ml8/PD4zb5GXo2sXRROHy0VclIXBEPKPKq93QGCMhfCR0jvr2tSib5CwrCMDnjjRxGJV36jhCE1mOV6TKis1MDdigg/7NSVf+eszUW4ed6CSDNFu3ooVZSwdf4Tja2672ROk1W59rDbfgs0Et7pRNnmWM1q+sTbD0eRbY9+0DXBhx5u4OVjp6eNNmO59WGErVvAAjOnZR3rw2LSX7MDrtzeCe1sdR/28WGPIIUVL8eCorlhzPB6PfrTL1Y/fbWAOGdvs6h+wTPX3ivTlrs8J5AXERCymp/CXIA1mwVjnM9zOklFhun+VvCNNJsZPSM62jrHfD4bP11y1kSt87TORGW517nWdS80oUY6MwxRcN2salwWzZA0sVjIHmvc4FkAuPHhdlMQpkym9fpFfR9taWlxU2NMP/+Quj3NaAPKksPvUGwos8lP8Z+QF5ljedNZFsC5/S0u6Fqoa26zRTnVki4KhfGPyKHXIUp9kNV7PRz4oRizHibUfp05xVMACtVIn+pQU7CaQEJCdYfLpo9gMDZ+6ZanmQX0vCUEyiaimrF/eSCkzjBtqSKMRHLd6ADEFEDxSr5nfaqgkddQVkQiBvngCnKwYcKfINA5mYIIFJZyLxpki03SHT6qGT541iHT3OX9F4MBc="
|
|
|
|
|
];
|
2024-04-05 22:04:41 -04:00
|
|
|
|
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
|
|
|
|
|
];
|
|
|
|
|
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?
|
|
|
|
|
}
|
|
|
|
|
|