2024-03-01 08:44:34 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
2024-05-23 21:26:02 +00:00
|
|
|
imports = [
|
|
|
|
./hardware-configuration.nix
|
|
|
|
../common
|
|
|
|
];
|
2024-03-01 08:44:34 +00:00
|
|
|
|
|
|
|
# Bootloader stuff
|
|
|
|
boot.kernelParams = [
|
|
|
|
"quiet"
|
|
|
|
"splash"
|
|
|
|
"rd.systemd.show_status=false"
|
2024-04-21 09:46:33 +00:00
|
|
|
"acpi_backlight=native"
|
|
|
|
"video=efifb:nobgrt"
|
|
|
|
"loglevel=3"
|
|
|
|
"rd.udev.log_level=3"
|
2024-03-01 08:44:34 +00:00
|
|
|
];
|
2024-04-21 09:46:33 +00:00
|
|
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
|
|
|
|
2024-05-07 02:45:27 +00:00
|
|
|
boot.loader.systemd-boot = {
|
|
|
|
enable = true;
|
|
|
|
configurationLimit = 3;
|
|
|
|
};
|
2024-03-01 08:44:34 +00:00
|
|
|
boot.loader.efi = { canTouchEfiVariables = true; };
|
|
|
|
|
2024-04-21 09:46:33 +00:00
|
|
|
boot.initrd.systemd.enable = true;
|
|
|
|
boot.plymouth = {
|
|
|
|
enable = true;
|
|
|
|
themePackages = with pkgs; [
|
|
|
|
catppuccin-plymouth
|
|
|
|
];
|
|
|
|
theme = "catppuccin-macchiato";
|
|
|
|
extraConfig = ''
|
|
|
|
UseFirmwareBackground=false
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2024-03-01 08:44:34 +00:00
|
|
|
# Networking stuff
|
|
|
|
networking.hostName = "magicman"; # Define your hostname.
|
|
|
|
networking.networkmanager.enable = true;
|
2024-04-18 17:29:08 +00:00
|
|
|
networking.nftables.enable = true;
|
|
|
|
networking.firewall = {
|
|
|
|
enable = true;
|
|
|
|
};
|
2024-03-01 08:44:34 +00:00
|
|
|
|
|
|
|
# Set time stuff
|
|
|
|
time.timeZone = "Europe/Oslo";
|
|
|
|
|
|
|
|
# Enable opengl
|
|
|
|
hardware.opengl = {
|
|
|
|
enable = true;
|
|
|
|
extraPackages = with pkgs; [
|
2024-04-21 09:46:33 +00:00
|
|
|
intel-media-driver
|
|
|
|
vaapiVdpau
|
|
|
|
libvdpau-va-gl
|
2024-03-01 08:44:34 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
# Setup hyprland
|
|
|
|
services.xserver.enable = true;
|
2024-04-18 18:24:29 +00:00
|
|
|
services.xserver.displayManager = {
|
|
|
|
gdm.wayland = true;
|
|
|
|
lightdm.enable = false;
|
|
|
|
};
|
|
|
|
programs.hyprland = {
|
|
|
|
enable = true;
|
|
|
|
xwayland.enable = true;
|
|
|
|
portalPackage = pkgs.xdg-desktop-portal-hyprland;
|
|
|
|
};
|
2024-03-01 08:44:34 +00:00
|
|
|
|
2024-04-21 09:46:33 +00:00
|
|
|
# TRIM
|
|
|
|
services.fstrim.enable = true;
|
|
|
|
|
|
|
|
# TLP
|
|
|
|
services.tlp.enable = true;
|
|
|
|
|
|
|
|
# Brillo
|
|
|
|
hardware.brillo.enable = true;
|
|
|
|
|
2024-03-01 08:44:34 +00:00
|
|
|
# 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; [
|
2024-04-18 18:24:29 +00:00
|
|
|
# xdg-desktop-portal-hyprland
|
2024-03-01 08:44:34 +00:00
|
|
|
xdg-desktop-portal-gtk
|
|
|
|
]);
|
|
|
|
};
|
|
|
|
|
2024-04-21 09:46:33 +00:00
|
|
|
programs.steam.enable = true;
|
|
|
|
|
2024-03-01 08:44:34 +00:00
|
|
|
# Enable flakes
|
|
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
2024-04-18 17:29:08 +00:00
|
|
|
nix.settings.trusted-users = [ "root" "torjus" ];
|
2024-03-01 08:44:34 +00:00
|
|
|
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
# Install system-wide packages
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
vim
|
|
|
|
wget
|
|
|
|
curl
|
|
|
|
git
|
|
|
|
];
|
|
|
|
|
|
|
|
# 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?
|
|
|
|
}
|