From fb4b2c1ed9287decba95192652703af9ee470723 Mon Sep 17 00:00:00 2001 From: _cry64 Date: Mon, 23 Feb 2026 12:28:01 +1000 Subject: [PATCH] refactor && clean --- configuration.nix | 191 +++++++++++++++++++++++++--------------------- 1 file changed, 105 insertions(+), 86 deletions(-) diff --git a/configuration.nix b/configuration.nix index fa38077..e6f1443 100644 --- a/configuration.nix +++ b/configuration.nix @@ -4,94 +4,40 @@ lib, pkgs, ... -}: let - nvidiaPackage = config.hardware.nvidia.package; -in { +}: { imports = [ - # Include the results of the hardware scan. ./hardware-configuration.nix ]; - # Allow unfree packages nixpkgs.config.allowUnfree = true; + nix.settings.experimental-features = ["nix-command" "flakes"]; # Use the systemd-boot EFI boot loader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - programs.silentSDDM = { - enable = true; - theme = "rei"; - settings = { - "LoginScreen.LoginArea.Avatar" = { - shape = "circle"; - active-border-color = "#ffcfce"; - }; - "LoginScreen" = { - background = "hana.jpg"; - }; - "LockScreen" = { - background = "kokomi96024.png"; - }; - }; + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; }; - 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 = { - enable = true; - remotePlay.openFirewall = true; # optional - dedicatedServer.openFirewall = true; # optional - localNetworkGameTransfers.openFirewall = true; # optional - gamescopeSession.enable = true; # optional + networking = { + hostName = "girlCore"; + networkmanager.enable = true; + + firewall = { + enable = true; + allowedTCPPorts = []; + allowedUDPPorts = []; + }; }; - # nvidia drivers - hardware.graphics.enable = true; - hardware.graphics.enable32Bit = true; - services.xserver.videoDrivers = lib.mkDefault ["nvidia"]; - hardware.nvidia = { - modesetting.enable = true; - # Nvidia power management. Experimental, and can cause sleep/suspend to fail. - # 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 - # of just the bare essentials. - powerManagement.enable = false; - - powerManagement.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). - services.libinput.enable = true; - # Define a user account. Don't forget to set a password with ‘passwd’. users.users.ashley = { isNormalUser = true; extraGroups = ["wheel"]; # Enable ‘sudo’ for the user. @@ -99,23 +45,96 @@ in { tree ]; }; - # List packages installed in system profile. - # You can use https://search.nixos.org/ to find more packages (and options). - nix.settings.experimental-features = ["nix-command" "flakes"]; - environment.systemPackages = with pkgs; [ - git - neovim - 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; + + 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; + theme = "rei"; + settings = { + "LoginScreen.LoginArea.Avatar" = { + shape = "circle"; + active-border-color = "#ffcfce"; + }; + "LoginScreen" = { + background = "hana.jpg"; + }; + "LockScreen" = { + background = "kokomi96024.png"; + }; + }; + }; + }; + + hardware = { + graphics = { + enable = true; + enable32Bit = true; + }; + + # nvidia drivers + nvidia = rec { + package = config.boot.kernelPackages.nvidiaPackages.stable; + open = lib.mkOverride 990 (package ? open && package ? firmware); + + nvidiaSettings = true; + modesetting.enable = true; + # Nvidia power management. Experimental, and can cause sleep/suspend to fail. + # 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 + # of just the bare essentials. + powerManagement = { + enable = false; + finegrained = false; + }; + }; + }; + + environment = { + variables = { + EDITOR = "nvim"; + }; + + # List packages installed in system profile. + # You can use https://search.nixos.org/ to find more packages (and options). + systemPackages = with pkgs; [ + git + neovim + wget + ]; + }; + # 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. #