Files
Olympus/system/configuration/configuration.nix
2024-10-02 00:54:05 -05:00

298 lines
7.1 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, lib, pkgs, inputs, ... }:
{
nixpkgs.config.allowUnfree = true;
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelParams = [ "snd-intel-dspcfg.dsp_driver=1" ];
hardware = {
#graphics.enable = true;
opengl = {
enable = true;
driSupport = true;
};
nvidia = {
modesetting.enable = true;
powerManagement.enable = true;
powerManagement.finegrained = false;
open = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.beta;
prime = {
# Make sure to use the correct Bus ID values for your system!
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
# WARNING: sync and offload are mutually exclusive.
# You can only pick one!!
#sync.enable = true;
offload = {
enable = true;
enableOffloadCmd = true;
};
};
};
#enable bluetooth
bluetooth.enable = true;
pulseaudio.enable = false;
};
# Enable the X11 windowing system.
services.xserver = {
enable = true;
videoDrivers = ["nvidia"];
};
services.displayManager.enable = true;
services.avahi = {
enable = true;
ipv4 = true;
ipv6 = true;
openFirewall = true;
nssmdns4 = true;
wideArea = true;
};
#networking
networking = {
hostName = "laptop";
nameservers = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ];
networkmanager = {
enable = true;
};
};
# nix experimental features
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
substituters = ["https://hyprland.cachix.org"];
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
};
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Set your time zone.
time.timeZone = "America/Chicago";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
programs.steam = {
enable = true;
};
programs.git = {
enable = true;
config = {
user = {
name = "blacknull";
email = "nathanblunkall5@gmail.com";
};
};
};
environment.sessionVariables = {
NIXOS_OZONE_WL = "1";
};
environment.shells = with pkgs; [ zsh ];
xdg.portal = {
enable = true;
config.common.default = "*";
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
sound.enable = true;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
package = pkgs.pipewire;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
extraConfig.pipewire-pulse."92-low-latency" = {
context.modules = [
{
name = "libpipewire-module-protocol-pulse";
args = {
pulse.min.req = "32/48000";
pulse.default.req = "32/48000";
pulse.max.req = "32/48000";
pulse.min.quantum = "32/48000";
pulse.max.quantum = "32/48000";
};
}
];
stream.properties = {
node.latency = "32/48000";
resample.quality = 1;
};
};
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
wireplumber.enable = true;
};
services.mpd = {
enable = true;
startWhenNeeded = true;
network.port = 6600;
network.listenAddress = "127.0.0.1";
user = "nathan";
musicDirectory = "/home/nathan/Music";
extraConfig = ''
audio_output {
type "pipewire"
name "Audio1"
}
audio_output {
type "fifo"
name "visualizer"
path "/tmp/mpd.fifo"
format "44100:16:1"
}
'';
};
systemd.services.mpd.environment = {
XDG_RUNTIME_DIR = "/run/user/1000";
};
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
programs.adb.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.nathan = {
isNormalUser = true;
description = "Nathan";
extraGroups = [
"networkmanager"
"wheel"
"adbusers"
#school?
"plugdev"
];
# packages supplied by home-manager
};
users.defaultUserShell = pkgs.zsh;
programs.zsh.enable = true;
home-manager.backupFileExtension = ".backup";
home-manager.users = {
root = inputs.root.homeManagerModule;
# nathan = inputs.nathan.homeManagerModule;
};
programs.nh = {
enable = true;
flake = "/home/nathan/.nixos";
clean = {
enable = true;
dates = "weekly";
extraArgs = "--keep 5 --keep-since 3d";
};
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# gstreamer
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-ugly
];
fonts.packages = with pkgs; [
nerdfonts
];
# 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;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
#networking.firewall.allowedTCPPorts = [ 80 443 ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
#networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.05"; # Did you read the comment?
}