nixos/hosts/gunter/configuration.nix

111 lines
2.7 KiB
Nix
Raw Normal View History

2024-03-01 09:00:40 +00:00
{ config, lib, pkgs, ... }:
{
imports = [ ./hardware-configuration.nix ];
# Bootloader stuff
boot.kernelParams = [
2024-03-03 07:59:21 +00:00
"quiet"
"splash"
"rd.systemd.show_status=false"
2024-03-01 09:00:40 +00:00
];
2024-03-03 07:59:21 +00:00
boot.loader.systemd-boot = {
enable = true;
configurationLimit = 10;
};
2024-03-01 09:00:40 +00:00
boot.loader.efi = { canTouchEfiVariables = true; };
2024-03-02 22:25:58 +00:00
boot.extraModprobeConfig = ''
options nvidia NVreg_RegistryDwords="PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerLevel=0x3; PowerMizerDefault=0x3; PowerMizerDefaultAC=0x3"
'';
2024-03-01 09:00:40 +00:00
# Networking stuff
networking.hostName = "gunter"; # Define your hostname.
networking.networkmanager.enable = true;
# Set time stuff
time.timeZone = "Europe/Oslo";
# Enable opengl
2024-03-02 20:16:23 +00:00
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
vaapiVdpau
nvidia-vaapi-driver
];
};
# Nvidia stuff
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = false;
open = false;
nvidiaSettings = true;
2024-03-02 21:20:09 +00:00
package = config.boot.kernelPackages.nvidiaPackages.beta;
2024-03-02 20:16:23 +00:00
};
2024-03-01 09:00:40 +00:00
# Setup hyprland
2024-03-02 20:16:23 +00:00
# nixpkgs.overlays = [
# (self: super: {
# hyprland = super.hyprland.override {
# debug = true;
# };
# })
# ];
2024-03-01 09:00:40 +00:00
services.xserver.enable = true;
2024-03-02 20:16:23 +00:00
services.xserver.videoDrivers = [ "nvidia" ];
services.xserver.displayManager.gdm.wayland = true;
2024-03-02 22:25:58 +00:00
services.xserver.displayManager.lightdm.enable = false;
2024-03-01 09:00:40 +00:00
programs.hyprland = {
enable = true;
xwayland.enable = true;
portalPackage = pkgs.xdg-desktop-portal-hyprland;
};
# Setup common XDG env vars
environment.sessionVariables = rec {
XDG_CACHE_HOME = "$HOME/.cache";
XDG_CONFIG_HOME = "$HOME/.config";
XDG_DATA_HOME = "$HOME/.local/share";
XDG_STATE_HOME = "$HOME/.local/state";
XDG_BIN_HOME = "$HOME/.local/bin";
PATH = [ "${XDG_BIN_HOME}" ];
};
# Setup xdg portal
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = (with pkgs; [
xdg-desktop-portal-hyprland
xdg-desktop-portal-gtk
]);
};
# Enable flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nixpkgs.config.allowUnfree = true;
# Install system-wide packages
environment.systemPackages = with pkgs; [
curl
git
2024-03-02 20:16:23 +00:00
libnotify
usbutils
vim
wget
2024-03-01 09:00:40 +00:00
];
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
# and migrated your data accordingly.
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "23.11"; # Did you read the comment?
}