From 5df71bf3d9c475b3c501830e8ac9d6981a76be07 Mon Sep 17 00:00:00 2001 From: Yadunand Prem Date: Wed, 24 Apr 2024 06:13:00 +0000 Subject: [PATCH] feat: add nvidia and cpu config --- falcon-nixos/configuration.nix | 20 ++++++++++++++++---- falcon-nixos/hardware-configuration.nix | 3 ++- falcon-nixos/home.nix | 5 +++++ 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/falcon-nixos/configuration.nix b/falcon-nixos/configuration.nix index 42dd429..9835e0c 100644 --- a/falcon-nixos/configuration.nix +++ b/falcon-nixos/configuration.nix @@ -17,10 +17,6 @@ shell = pkgs.zsh; isNormalUser = true; extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. - packages = with pkgs; [ - neovim - wget - ]; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJXOpmWsAnl2RtOuJJMRUx+iJTwf2RWJ1iS3FqXJFzFG" ]; }; security.sudo.wheelNeedsPassword = false; @@ -49,6 +45,22 @@ }; environment.variables.EDITOR = "nvim"; + nixpkgs.config.allowUnfree = true; + + hardware.opengl = { + enable = true; + }; + + hardware.nvidia = { + modesetting.enable = true; + powerManagement.enable = false; + powerManagement.finegrained = false; + open = false; + nvidiaSettings = false; + package = config.boot.kernelPackages.nvidiaPackages.stable; + }; + # Need this for nvidia-smi + services.xserver.videoDrivers = [ "nvidia" ]; system.stateVersion = "23.11"; # Did you read the comment? diff --git a/falcon-nixos/hardware-configuration.nix b/falcon-nixos/hardware-configuration.nix index ab4b411..d194797 100644 --- a/falcon-nixos/hardware-configuration.nix +++ b/falcon-nixos/hardware-configuration.nix @@ -10,7 +10,7 @@ boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; fileSystems."/" = @@ -33,6 +33,7 @@ # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; # networking.interfaces.enp6s18.useDHCP = lib.mkDefault true; + # networking.interfaces.tailscale0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; } diff --git a/falcon-nixos/home.nix b/falcon-nixos/home.nix index 0477a4f..365d430 100644 --- a/falcon-nixos/home.nix +++ b/falcon-nixos/home.nix @@ -31,6 +31,7 @@ }; }; + programs.tmux = { enable = true; newSession = true; @@ -42,6 +43,10 @@ pain-control ]; }; + programs.zsh.prezto.pmodules = [ "tmux" ]; + programs.zsh.prezto.tmux.autoStartRemote = true; + programs.fzf.tmux.enableShellIntegration = true; + home.stateVersion = "23.11"; }