refactor && clean
This commit is contained in:
parent
eb74b94f02
commit
fb4b2c1ed9
1 changed files with 105 additions and 86 deletions
|
|
@ -4,94 +4,40 @@
|
||||||
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;
|
||||||
enable = true;
|
|
||||||
theme = "rei";
|
|
||||||
settings = {
|
|
||||||
"LoginScreen.LoginArea.Avatar" = {
|
|
||||||
shape = "circle";
|
|
||||||
active-border-color = "#ffcfce";
|
|
||||||
};
|
|
||||||
"LoginScreen" = {
|
|
||||||
background = "hana.jpg";
|
|
||||||
};
|
|
||||||
"LockScreen" = {
|
|
||||||
background = "kokomi96024.png";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
networking.hostName = "girlCore"; # Define your hostname.
|
|
||||||
# Configure network connections interactively with nmcli or nmtui.
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "America/Chicago";
|
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.
|
# Select internationalisation properties.
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
console = {
|
console = {
|
||||||
font = "Lat2-Terminus16";
|
font = "Lat2-Terminus16";
|
||||||
keyMap = "us";
|
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 = {
|
networking = {
|
||||||
enable = true;
|
hostName = "girlCore";
|
||||||
remotePlay.openFirewall = true; # optional
|
networkmanager.enable = true;
|
||||||
dedicatedServer.openFirewall = true; # optional
|
|
||||||
localNetworkGameTransfers.openFirewall = true; # optional
|
firewall = {
|
||||||
gamescopeSession.enable = true; # optional
|
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 = {
|
users.users.ashley = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = ["wheel"]; # Enable ‘sudo’ for the user.
|
extraGroups = ["wheel"]; # Enable ‘sudo’ for the user.
|
||||||
|
|
@ -99,23 +45,96 @@ in {
|
||||||
tree
|
tree
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
# List packages installed in system profile.
|
|
||||||
# You can use https://search.nixos.org/ to find more packages (and options).
|
services = {
|
||||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
displayManager.sddm = {
|
||||||
environment.systemPackages = with pkgs; [
|
enable = true;
|
||||||
git
|
wayland.enable = true;
|
||||||
neovim
|
defaultSession = "hyprland";
|
||||||
wget
|
};
|
||||||
];
|
|
||||||
environment.variables.EDITOR = "nvim";
|
xserver.videoDrivers = lib.mkDefault ["nvidia"];
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
|
||||||
# started in user sessions.
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
# List services that you want to enable:
|
libinput.enable = true;
|
||||||
# Enable the OpenSSH daemon.
|
|
||||||
# Open ports in the firewall.
|
# Enable audio
|
||||||
networking.firewall.allowedTCPPorts = [];
|
pipewire = {
|
||||||
networking.firewall.allowedUDPPorts = [];
|
enable = true;
|
||||||
networking.firewall.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,
|
# 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.
|
||||||
#
|
#
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue