127 lines
2.5 KiB
Nix
127 lines
2.5 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}: {
|
|
imports = [./hardware-configuration.nix];
|
|
|
|
boot.bootspec.enable = true;
|
|
boot.loader.systemd-boot.enable = lib.mkForce false;
|
|
boot.lanzaboote = {
|
|
enable = true;
|
|
pkiBundle = "/etc/secureboot";
|
|
};
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
boot.kernelPackages = pkgs.linuxPackages_6_6;
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
system.stateVersion = "23.11"; # Did you read the comment?
|
|
networking = {
|
|
hostName = "framework";
|
|
search = ["1.1.1.1" "1.0.0.1" "8.8.8.8"];
|
|
networkmanager.enable = true;
|
|
};
|
|
|
|
time.timeZone = "Europe/Berlin";
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
|
|
|
hardware.opengl = {
|
|
enable = true;
|
|
driSupport = true;
|
|
driSupport32Bit = true;
|
|
extraPackages = [pkgs.vaapiVdpau];
|
|
};
|
|
|
|
security.pam.services.swaylock = {};
|
|
|
|
services = {
|
|
illum.enable = true;
|
|
fwupd.enable = true;
|
|
fprintd.enable = false; # currently broken
|
|
pcscd.enable = true;
|
|
tlp = {
|
|
enable = true;
|
|
settings = {
|
|
# AC
|
|
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
|
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
|
CPU_MIN_PERF_ON_AC = 0;
|
|
CPU_MAX_PERF_ON_AC = 100;
|
|
|
|
# BAT
|
|
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
|
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
|
CPU_MIN_PERF_ON_BAT = 0;
|
|
CPU_MAX_PERF_ON_BAT = 50;
|
|
};
|
|
};
|
|
|
|
openssh = {
|
|
enable = true;
|
|
settings = {
|
|
PermitRootLogin = "yes";
|
|
};
|
|
};
|
|
|
|
xserver = {
|
|
enable = true;
|
|
xkb.layout = "us";
|
|
videoDrivers = ["amdgpu"];
|
|
|
|
libinput.enable = true;
|
|
|
|
desktopManager = {
|
|
xterm.enable = false;
|
|
gnome.enable = false;
|
|
plasma5.enable = false;
|
|
};
|
|
|
|
displayManager = {
|
|
gdm = {
|
|
enable = true;
|
|
wayland = true;
|
|
};
|
|
};
|
|
};
|
|
|
|
logind = {
|
|
lidSwitch = "suspend";
|
|
lidSwitchDocked = "ignore";
|
|
lidSwitchExternalPower = "ignore";
|
|
extraConfig = "HoldoffTimeoutSec=300s";
|
|
};
|
|
};
|
|
|
|
services.pipewire = {
|
|
enable = true;
|
|
alsa.enable = true;
|
|
alsa.support32Bit = true;
|
|
pulse.enable = true;
|
|
};
|
|
|
|
users.users.patrick = {
|
|
isNormalUser = true;
|
|
extraGroups = ["wheel"];
|
|
};
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.users.patrick = ./home.nix;
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
vim
|
|
wget
|
|
curl
|
|
htop
|
|
podman
|
|
pinentry
|
|
qemu
|
|
OVMF
|
|
];
|
|
|
|
programs = {
|
|
hyprland.enable = true;
|
|
gnupg.agent.enable = true;
|
|
};
|
|
}
|