NIX_System_Configurations/common/configuration.nix

122 lines
3.4 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.

{ config, pkgs, lib, ... }:
{
imports =
[ # Include the results of the hardware scan.
./modules/packages.nix
];
# Bootloader.
boot.loader = {
timeout = 1;
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
boot.plymouth.enable = true;
# start kernel in quiet output mode
boot.kernelParams = ["amdgpu.sg_display=0"];
# clean temp dir on every boot
boot.tmp.cleanOnBoot = true;
# newest kernel
#boot.kernelPackages = pkgs.linuxPackages_latest;
# set mainline kernel version
#boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_5;
# set specific kernel version
boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.linux_6_6.override {
argsOverride = rec {
src = pkgs.fetchurl {
url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz";
sha256 = "sha256-c9T2rY3WrCpB7VLCkoiYt8PyUZ7V29sRkgIJo2mZt34=";
};
version = "6.6.2";
modDirVersion = "6.6.2";
};
});
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "Europe/Vienna";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "de_AT.UTF-8";
LC_IDENTIFICATION = "de_AT.UTF-8";
LC_MEASUREMENT = "de_AT.UTF-8";
LC_MONETARY = "de_AT.UTF-8";
LC_NAME = "de_AT.UTF-8";
LC_NUMERIC = "de_AT.UTF-8";
LC_PAPER = "de_AT.UTF-8";
LC_TELEPHONE = "de_AT.UTF-8";
LC_TIME = "de_AT.UTF-8";
};
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
# Configure keymap in X11
services.xserver = {
layout = "at";
xkbVariant = "";
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
# Define a user account. Don't forget to set a password with passwd.
users.users.lukas = {
isNormalUser = true;
description = "Lukas Heiligenbrunner";
extraGroups = [ "networkmanager" "wheel" ];
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
users.defaultUserShell = pkgs.zsh;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# automatically delete older generations and keep last 5
nix.settings.auto-optimise-store = true;
nix.gc.automatic = true;
nix.gc.dates = "daily";
nix.gc.options = "--delete-older-than 3d";
system.activationScripts.text =
''
# keep only last 5 generations
#nix-env --delete-generations +5 -p /nix/var/nix/profiles/system
'';
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment?
}