nixos-configs/hyprland/default.nix
2024-06-09 19:08:00 +02:00

183 lines
3.9 KiB
Nix

{ pkgs, config, lib, inputs, ... }: {
imports = [
inputs.stylix.nixosModules.stylix
../modules/nixos/lanzaboote.nix
inputs.nixos-hardware.nixosModules.dell-xps-13-9310
inputs.home-manager.nixosModules.home-manager
];
time.timeZone = "Europe/Amsterdam";
i18n.defaultLocale = "en_US.UTF-8";
sound.enable = true;
programs = {
hyprland = {
enable = true;
package = inputs.hyprland.packages."${pkgs.system}".hyprland;
};
dconf.enable = true;
file-roller.enable = true;
};
services = {
xserver = {
displayManager.gdm = {
enable = true;
wayland = true;
};
enable = true;
excludePackages = [ pkgs.xterm ];
};
printing.enable = true;
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
dbus = {
enable = true;
packages = [ pkgs.gnome3.gnome-keyring pkgs.gcr ];
};
gnome = {
gnome-keyring.enable = true;
sushi.enable = true;
};
};
users = {
users.pim = {
isNormalUser = true;
extraGroups = [ "wheel" "input" "wireshark" "dialout" ];
};
};
environment = {
variables.NIXOS_OZONE_WL = "1";
systemPackages = with pkgs; [
wget
curl
git
btop
ripgrep
vim
tree
dig
jq
file
sbctl
];
etc."greetd/environments".text = "hyprland";
};
system.stateVersion = "24.05";
security = {
rtkit.enable = true;
sudo.extraConfig = ''
Defaults timestamp_timeout=30
'';
};
nix = {
package = pkgs.nixFlakes;
settings.trusted-users = [ "root" "pim" ];
extraOptions = ''
experimental-features = nix-command flakes
'';
};
nixpkgs.hostPlatform = "x86_64-linux";
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "libfprint-2-tod1-goodix" ];
boot = {
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
initrd = {
kernelModules = [ ];
};
kernel.sysctl = {
"net.core.default_qdisc" = "fq";
"net.ipv4.tcp_congestion_control" = "bbr";
};
};
hardware = {
cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
pulseaudio.enable = false;
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [ vaapiVdpau libvdpau-va-gl ];
};
};
pim.lanzaboote.enable = true;
networking.hostName = "xps-9315";
swapDevices = [{ device = "/dev/disk/by-uuid/96a43c35-0174-4e92-81f0-168a5f601f0b"; }];
fileSystems = {
"/" =
{
device = "/dev/disk/by-uuid/31638735-5cc4-4013-8037-17e30edcbb0a";
fsType = "ext4";
};
"/boot" =
{
device = "/dev/disk/by-uuid/560E-F8A2";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
};
boot.initrd.luks.devices."luks-8ffd3129-4908-4209-98c4-4eb68a35c494".device = "/dev/disk/by-uuid/8ffd3129-4908-4209-98c4-4eb68a35c494";
boot.initrd.availableKernelModules = [ "sd_mod" "xhci_pci" "thunderbolt" "vmd" "nvme" "usb_storage" ];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit inputs; };
users.pim = {
imports = [ ./home.nix ];
};
};
stylix = {
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.yaml";
image = "${inputs.hyprland}/assets/wall2.png";
cursor = {
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Ice";
};
fonts = {
monospace = {
package = pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; };
name = "JetBrainsMono Nerd Font Mono";
};
sansSerif = {
package = pkgs.dejavu_fonts;
name = "DejaVu Sans";
};
serif = {
package = pkgs.dejavu_fonts;
name = "DejaVu Serif";
};
};
};
}