dotfiles/root-conf/nixos/nixLap/configuration.nix
2026-08-15 16:03:36 +02:00

131 lines
3.0 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, pkgs-unstable, ... }:
let
optionalPkgs = import ../optional-packages.nix { inherit pkgs; };
in
{
imports =
[
../shared-conf.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.availableKernelModules = [
"aesni_intel"
"cryptd"
];
powerManagement.enable = true;
services.power-profiles-daemon.enable = true;
# Suspend first then hibernate when closing the lid
services.logind.settings.Login.lidSwitch = "suspend-then-hibernate";
# Hibernate on power button pressed
services.logind.settings.Login.powerKey = "hibernate";
services.logind.settings.Login.powerKeyLongPress = "poweroff";
# Hibernation
boot.resumeDevice = "/dev/disk/by-label/swap";
# resume offset from: filefrag -v /swapfile # under 0. physical offset
boot.kernelParams = ["mem_sleep_default=freeze" "resume_offset=0" ];
networking.firewall = {
enable = true;
logRefusedPackets = true;
allowedTCPPortRanges = [
# KDE Connect
{ from = 1714; to = 1764; }
{ from = 8080; to = 8090; }
];
allowedUDPPortRanges = [
{ from = 4000; to = 4007; }
{ from = 8080; to = 8090; }
{ from = 1714; to = 1764; } # KDE Connect
];
};
# Define time delay for hibernation
systemd.sleep.settings.Sleep = {
HibernateDelaySec = "30m";
SuspendState = "mem";
};
# Start the driver at boot
systemd.services.fprintd = {
wantedBy = [ "multi-user.target" ];
serviceConfig.Type = "simple";
};
# Install the driver
services.fprintd.enable = true;
hardware.graphics = {
enable = true;
enable32Bit = true;
};
# for 32 Bit
programs.steam.enable = true;
virtualisation.containers.enable = true;
services.flatpak.enable = true;
virtualisation = {
podman = {
enable = true;
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
};
};
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the KDE Plasma Desktop Environment.
# https://wiki.nixos.org/wiki/KDE#Unlock_KDE_Wallet_with_LUKS_password
# Enabeling this akes reaching graphical target slow
boot.initrd.systemd.enable = false;
services.displayManager = {
plasma-login-manager = {
enable = true;
};
};
services.desktopManager.plasma6.enable = true;
# Configure keymap in X11
services.xserver.xkb = {
layout = "de";
variant = "";
};
# Configure console keymap
console.keyMap = "de";
users.groups.wireshark = {};
programs.kdeconnect.enable = true;
environment.systemPackages = with pkgs; [
# KDE
kdePackages.bluedevil
kdePackages.krdc
kdePackages.plasma-keyboard
# Net
pkgs-unstable.gns3-gui
docker-compose
# Utils
imagemagick
] ++ optionalPkgs;
system.stateVersion = "25.05";
}