It builds!
This commit is contained in:
@@ -2,70 +2,215 @@
|
||||
# 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, core_inputs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
options = {
|
||||
sysconfig.laptop.enable = lib.mkEnableOption "uses laptop config";
|
||||
#imports = [ ./hardware-configuration.nix ];
|
||||
|
||||
options.sysconfig.laptop.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.sysconfig.laptop.enable {
|
||||
|
||||
assertions = [
|
||||
{
|
||||
assertion = !config.sysconfig.homebox.enable;
|
||||
message = "sysconfig laptop conflicts with homebox";
|
||||
}
|
||||
];
|
||||
|
||||
sysconfig.generic.enable = lib.mkForce false;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
boot.kernelParams = [ "snd-intel-dspcfg.dsp_driver=1" ];
|
||||
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
kernelParams = [ "snd-intel-dspcfg.dsp_driver=1" ];
|
||||
};
|
||||
|
||||
hardware = {
|
||||
#graphics.enable = true;
|
||||
|
||||
opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
extraPackages = with pkgs; [
|
||||
nvidia-vaapi-driver
|
||||
];
|
||||
};
|
||||
|
||||
nvidia = {
|
||||
modesetting.enable = true;
|
||||
open = false; #suspend fails with open drivers
|
||||
powerManagement.enable = true;
|
||||
powerManagement.finegrained = false;
|
||||
open = false;
|
||||
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";
|
||||
# #sync.enable = true;
|
||||
# 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;
|
||||
};
|
||||
|
||||
services = {
|
||||
xserver = {
|
||||
enable = true;
|
||||
videoDrivers = [ "nvidia" ];
|
||||
};
|
||||
|
||||
displayManager.enable = true;
|
||||
# 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;
|
||||
};
|
||||
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
# 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
|
||||
];
|
||||
# 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. It‘s 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?
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user