refactor && clean

This commit is contained in:
do butterflies cry? 2026-02-23 12:28:01 +10:00
parent eb74b94f02
commit fb4b2c1ed9

View file

@ -4,21 +4,82 @@
lib, lib,
pkgs, pkgs,
... ...
}: let }: {
nvidiaPackage = config.hardware.nvidia.package;
in {
imports = [ imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
# Allow unfree packages
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = ["nix-command" "flakes"];
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true; boot.loader = {
boot.loader.efi.canTouchEfiVariables = true; systemd-boot.enable = true;
programs.silentSDDM = { efi.canTouchEfiVariables = true;
};
# Set your time zone.
time.timeZone = "America/Chicago";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "us";
};
networking = {
hostName = "girlCore";
networkmanager.enable = true;
firewall = {
enable = true;
allowedTCPPorts = [];
allowedUDPPorts = [];
};
};
users.users.ashley = {
isNormalUser = true;
extraGroups = ["wheel"]; # Enable sudo for the user.
packages = with pkgs; [
tree
];
};
services = {
displayManager.sddm = {
enable = true;
wayland.enable = true;
defaultSession = "hyprland";
};
xserver.videoDrivers = lib.mkDefault ["nvidia"];
# Enable touchpad support (enabled default in most desktopManager).
libinput.enable = true;
# Enable audio
pipewire = {
enable = true;
pulse.enable = true;
};
};
programs = {
hyprland = {
enable = true;
package = inputs.hyprland-git.packages."x86_64-linux".hyprland;
};
steam = {
enable = true;
remotePlay.openFirewall = true; # optional
dedicatedServer.openFirewall = true; # optional
localNetworkGameTransfers.openFirewall = true; # optional
gamescopeSession.enable = true; # optional
};
silentSDDM = {
enable = true; enable = true;
theme = "rei"; theme = "rei";
settings = { settings = {
@ -34,88 +95,46 @@ in {
}; };
}; };
}; };
networking.hostName = "girlCore"; # Define your hostname.
# Configure network connections interactively with nmcli or nmtui.
networking.networkmanager.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";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "us";
}; };
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
};
services.displayManager.defaultSession = "hyprland";
programs.hyprland.enable = true;
programs.hyprland.package = inputs.hyprland-git.packages."x86_64-linux".hyprland;
programs.steam = { hardware = {
graphics = {
enable = true; enable = true;
remotePlay.openFirewall = true; # optional enable32Bit = true;
dedicatedServer.openFirewall = true; # optional
localNetworkGameTransfers.openFirewall = true; # optional
gamescopeSession.enable = true; # optional
}; };
# nvidia drivers # nvidia drivers
hardware.graphics.enable = true; nvidia = rec {
hardware.graphics.enable32Bit = true; package = config.boot.kernelPackages.nvidiaPackages.stable;
services.xserver.videoDrivers = lib.mkDefault ["nvidia"]; open = lib.mkOverride 990 (package ? open && package ? firmware);
hardware.nvidia = {
nvidiaSettings = true;
modesetting.enable = true; modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail. # Nvidia power management. Experimental, and can cause sleep/suspend to fail.
# Enable this if you have graphical corruption issues or application crashes after waking # Enable this if you have graphical corruption issues or application crashes after waking
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead # up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
# of just the bare essentials. # of just the bare essentials.
powerManagement.enable = false; powerManagement = {
enable = false;
powerManagement.finegrained = false; finegrained = false;
# open = true; };
open = lib.mkOverride 990 (nvidiaPackage ? open && nvidiaPackage ? firmware);
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
}; };
services.pipewire = {
enable = true;
pulse.enable = true;
}; };
# Enable touchpad support (enabled default in most desktopManager). environment = {
services.libinput.enable = true; variables = {
# Define a user account. Don't forget to set a password with passwd. EDITOR = "nvim";
users.users.ashley = {
isNormalUser = true;
extraGroups = ["wheel"]; # Enable sudo for the user.
packages = with pkgs; [
tree
];
}; };
# List packages installed in system profile. # List packages installed in system profile.
# You can use https://search.nixos.org/ to find more packages (and options). # You can use https://search.nixos.org/ to find more packages (and options).
nix.settings.experimental-features = ["nix-command" "flakes"]; systemPackages = with pkgs; [
environment.systemPackages = with pkgs; [
git git
neovim neovim
wget wget
]; ];
environment.variables.EDITOR = "nvim"; };
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# List services that you want to enable:
# Enable the OpenSSH daemon.
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [];
networking.firewall.allowedUDPPorts = [];
networking.firewall.enable = true;
# This option defines the first version of NixOS you have installed on this particular machine, # 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. # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
# #