# 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, ... }: { 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!"; } ]; nixpkgs.config.allowUnfree = true; # Bootloader. 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; }; nvidia = { modesetting.enable = true; 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"; # 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; }; sysconfig.opts = { openssh.enable = false; steam.enable = true; pipewire.enable = true; ags.enable = true; hyprland.enable = true; git.enable = true; nh.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; }; # Configure network proxy if necessary # networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; environment.shells = with pkgs; [ zsh ]; # Enable CUPS to print documents. services.printing.enable = true; # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true; programs.adb.enable = true; users.defaultUserShell = pkgs.zsh; programs.zsh.enable = true; # 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? }; }