136 lines
3.7 KiB
Nix
136 lines
3.7 KiB
Nix
{ self, inputs, ... }: {
|
||
|
||
flake.nixosModules.laptop = { config, pkgs, lib, ... }:
|
||
|
||
{
|
||
|
||
imports = with self.nixosModules; [
|
||
inputs.home-manager.nixosModules.default
|
||
|
||
self.nixosModules.default
|
||
aurora-greeter
|
||
hyprland
|
||
pipewire
|
||
steam
|
||
avahi
|
||
netbird
|
||
];
|
||
|
||
config = {
|
||
|
||
nixpkgs.config = {
|
||
allowUnfree = true;
|
||
};
|
||
|
||
# Bootloader.
|
||
boot = {
|
||
kernelPackages = pkgs.linuxKernel.packages.linux_6_18;
|
||
loader = {
|
||
systemd-boot.enable = true;
|
||
efi.canTouchEfiVariables = true;
|
||
timeout = null;
|
||
};
|
||
};
|
||
|
||
systemd.settings.Manager.DefaultLimitNOFILE = 2048;
|
||
|
||
hardware = {
|
||
graphics.enable = true;
|
||
|
||
firmware = with pkgs; [
|
||
sof-firmware
|
||
];
|
||
|
||
#enable bluetooth
|
||
bluetooth.enable = true;
|
||
|
||
};
|
||
|
||
programs.partition-manager.enable = true;
|
||
services.pulseaudio.enable = false;
|
||
|
||
environment.systemPackages = with pkgs; [
|
||
alsa-utils
|
||
];
|
||
|
||
# Enable the X11 windowing system.
|
||
services.xserver = {
|
||
enable = true;
|
||
};
|
||
|
||
services.displayManager.enable = true;
|
||
|
||
|
||
environment.shells = with pkgs; [ zsh bashInteractive ];
|
||
|
||
# Enable CUPS to print documents.
|
||
services.printing.enable = true;
|
||
|
||
programs.adb.enable = true;
|
||
|
||
programs.zsh.enable = true;
|
||
|
||
networking = {
|
||
nameservers = [
|
||
"1.1.1.1"
|
||
"1.0.0.1"
|
||
];
|
||
networkmanager = {
|
||
enable = true;
|
||
dns = "none";
|
||
};
|
||
useDHCP = false;
|
||
dhcpcd.enable = false;
|
||
};
|
||
|
||
|
||
fonts.packages = with pkgs; [ nerd-fonts.fira-code ];
|
||
|
||
|
||
boot.kernelParams = [ "snd-intel-dspcfg.dsp_driver=1" ];
|
||
|
||
hardware = {
|
||
nvidia = {
|
||
modesetting.enable = true;
|
||
powerManagement.enable = true;
|
||
powerManagement.finegrained = true;
|
||
open = false;
|
||
nvidiaSettings = true;
|
||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||
|
||
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;
|
||
};
|
||
};
|
||
};
|
||
};
|
||
|
||
sops = {
|
||
defaultSopsFile = ./secrets.yaml;
|
||
secrets = {
|
||
remoteBuildKey = {};
|
||
};
|
||
};
|
||
|
||
services.xserver.videoDrivers = [ "nvidia" ];
|
||
|
||
# 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?
|
||
};
|
||
|
||
};
|
||
}
|