{ config, lib, pkgs, sops, ... }: { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix ../../modules/common.nix ../../modules/aarch64-emu.nix ../../modules/smartd.nix ]; boot = { blacklistedKernelModules = [ "k10temp" ]; extraModulePackages = with config.boot.kernelPackages; [ zenpower ]; kernelParams = [ "amd_pstate=passive" ]; loader.systemd-boot.enable = true; loader.efi.canTouchEfiVariables = true; 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"; }; tmp.cleanOnBoot = true; }; powerManagement.cpuFreqGovernor = "schedutil"; sops.age.sshKeyPaths = [ "/persist/etc/ssh/ssh_host_ed25519_key" ]; sops.secrets."cdombroski/password" = { neededForUsers = true; sopsFile = ../../secrets/smolboi/users.yaml; }; networking = { hostName = "smolboi"; # Define your hostname. networkmanager.enable = true; # Easiest to use and most distros use this by default. firewall.allowedTCPPorts = [ 22000 ]; }; 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 ]; }; }; }; services = { displayManager.sddm = { enable = true; autoNumlock = true; wayland.enable = true; }; desktopManager.plasma6.enable = true; printing = { enable = true; drivers = [ pkgs.gutenprint ]; }; avahi = { enable = true; nssmdns4 = true; nssmdns6 = 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; fileSystems = [ "/" "/home" ]; }; }; hardware = { sane = { enable = true; extraBackends = [ pkgs.sane-airscan ]; }; bluetooth.enable = true; }; security = { sudo.extraConfig = "Defaults lecture = never"; rtkit.enable = true; }; users.users = { cdombroski = { isNormalUser = true; extraGroups = [ "wheel" ]; uid = 1000; hashedPasswordFile = config.sops.secrets."cdombroski/password".path; }; }; 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 kate cifs-utils tio ]; persistence."/persist" = { hideMounts = true; directories = [ "/etc/NetworkManager/system-connections" "/var/lib/bluetooth" "/var/lib/nixos" "/var/log" "/var/lib/systemd" "/tmp" "/var/lib/cups" ]; files = [ "/etc/machine-id" "/var/lib/NetworkManager/secret_key" "/etc/adjtime" "/etc/ssh/ssh_host_rsa_key" "/etc/ssh/ssh_host_rsa_key.pub" "/etc/ssh/ssh_host_ed25519_key" "/etc/ssh/ssh_host_ed25519_key.pub" ]; }; }; 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; }; zramSwap = { enable = true; writebackDevice = "/dev/disk/by-partuuid/e8f5eaf8-46ca-40de-854a-f6dfe964b92d"; }; fileSystems = { "/persist".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" ]; }; stylix = { image = "${pkgs.kdePackages.breeze}/share/wallpapers/Next/contents/images_dark/2560x1440.png"; base16Scheme = { #attrSet until the new yaml is supported scheme = "Solar Flare"; author = "Chuck Harmston (https://chuck.harmston.ch)"; base00 = "18262F"; base01 = "222E38"; base02 = "586875"; base03 = "667581"; base04 = "85939E"; base05 = "A6AFB8"; base06 = "E8E9ED"; base07 = "F5F7FA"; base08 = "EF5253"; base09 = "E66B2B"; base0A = "E4B51C"; base0B = "7CC844"; base0C = "52CBB0"; base0D = "33B5E1"; base0E = "A363D5"; base0F = "D73C9A"; }; fonts = { serif = { package = pkgs.noto-fonts; name = "Noto Serif"; }; sansSerif = { package = pkgs.noto-fonts; name = "Noto Sans"; }; monospace = { package = pkgs.jetbrains-mono; name = "JetBrains Mono Regular"; }; }; cursor = { package = pkgs.breeze-qt5; name = "breeze_cursors"; size = 24; }; }; system.stateVersion = "23.11"; # Did you read the comment? }