Files
nixos/configuration.nix

228 lines
4.9 KiB
Nix
Raw Normal View History

2025-10-30 18:26:18 +01:00
# 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,
lib,
...
}:
{
imports = [
./hardware-configuration.nix
2025-11-15 00:27:02 +01:00
./modules/flatpak.nix
2025-10-30 18:26:18 +01:00
./modules/gdm-monitors.nix
2025-11-15 00:27:02 +01:00
./modules/gnome.nix
./modules/packages.nix
2025-10-30 18:26:18 +01:00
./modules/programs.nix
2025-11-15 00:27:02 +01:00
./modules/services.nix
2025-10-30 18:26:18 +01:00
];
chaotic.mesa-git.enable = true;
2025-10-30 18:26:18 +01:00
boot = {
initrd.kernelModules = [ ];
initrd.verbose = false;
kernelModules = [ "nct6683" ];
blacklistedKernelModules = [ "k10temp" ];
kernelParams = [
"amdgpu.seamless=1"
"rd.udev.log_priority=3"
"vt.global_cursor_default=0"
];
kernelPackages = pkgs.linuxKernel.packages.linux_xanmod_latest;
extraModulePackages = with config.boot.kernelPackages; [
pkgs.linuxKernel.packages.linux_xanmod_latest.zenpower
];
loader = {
efi.canTouchEfiVariables = true;
systemd-boot = {
enable = true;
windows = {
"w" = {
title = "Windows";
2025-11-15 00:27:02 +01:00
efiDeviceHandle = "HD3b";
2025-10-30 18:26:18 +01:00
};
};
};
};
consoleLogLevel = 3;
plymouth.enable = true;
};
networking = {
hostName = "epiquev2";
networkmanager.enable = true;
};
# Set your time zone.
time.timeZone = "Europe/Prague";
# Select internationalisation properties.
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "cs_CZ.UTF-8";
LC_IDENTIFICATION = "cs_CZ.UTF-8";
LC_MEASUREMENT = "cs_CZ.UTF-8";
LC_MONETARY = "cs_CZ.UTF-8";
LC_NAME = "cs_CZ.UTF-8";
LC_NUMERIC = "cs_CZ.UTF-8";
LC_PAPER = "cs_CZ.UTF-8";
LC_TELEPHONE = "cs_CZ.UTF-8";
LC_TIME = "cs_CZ.UTF-8";
};
};
# Configure console keymap
console.keyMap = "cz-lat2";
xdg.portal.enable = true;
security.rtkit.enable = true;
virtualisation = {
docker = {
enable = true;
autoPrune.enable = true;
storageDriver = "btrfs";
enableOnBoot = true;
};
libvirtd = {
enable = true;
qemu = {
swtpm.enable = true;
};
extraConfig = ''
unix_sock_group = "qemu-libvirtd"
'';
2025-10-30 18:26:18 +01:00
};
};
# Define a user account. Don't forget to set a password with passwd.
users.users.jax = {
isNormalUser = true;
description = "Roman Lubij";
extraGroups = [
"networkmanager"
"wheel"
"docker"
"qemu-libvirtd"
2025-10-30 18:26:18 +01:00
];
shell = pkgs.zsh;
#packages = with pkgs; [ ];
};
# Allow unfree packages
nixpkgs = {
config = {
allowUnfree = true;
permittedInsecurePackages = [
"ventoy-gtk3-1.1.07"
];
};
2025-11-15 00:27:02 +01:00
overlays = [
(final: prev: {
nautilus = prev.nautilus.overrideAttrs (nprev: {
buildInputs =
nprev.buildInputs
++ (with pkgs.gst_all_1; [
gst-plugins-good
gst-plugins-bad
gst-plugins-ugly
gst-plugins-base
]);
});
})
];
2025-10-30 18:26:18 +01:00
};
environment = {
sessionVariables = {
NIXOS_OZONE_WL = "1";
LIBVIRT_DEFAULT_URI = "qemu:///system";
};
2025-11-15 00:27:02 +01:00
systemPackages = [
pkgs.libheif
pkgs.libheif.out
];
pathsToLink = [ "share/thumbnailers" ];
2025-10-30 18:26:18 +01:00
};
hardware = {
amdgpu = {
initrd.enable = true;
overdrive.enable = true;
};
2025-10-30 18:26:18 +01:00
bluetooth = {
enable = true;
package = pkgs.bluez.overrideAttrs (old: {
configureFlags = old.configureFlags ++ [
"--enable-sixaxis"
];
});
powerOnBoot = true;
input.General.ClassicBondedOnly = false;
settings = {
General = {
# FastConnectable = true;
Name = "epiquev2";
Experimental = true;
};
};
};
i2c.enable = true;
graphics = {
enable = true;
enable32Bit = true;
package = pkgs.mesa;
};
# amdgpu.opencl.enable = true; ROCM
};
# QT stuff
qt = {
style = "gtk2";
platformTheme = "qt5ct";
enable = true;
};
security.polkit.extraConfig = ''
polkit.addRule(function(action, subject) {
if (action.id == "org.libvirt.unix.manage" &&
subject.isInGroup("qemu-libvirtd")) {
return polkit.Result.YES;
}
});
'';
2025-10-30 18:26:18 +01:00
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
networking.firewall.enable = false;
nix.settings = {
auto-optimise-store = true;
experimental-features = [
"flakes"
"nix-command"
];
warn-dirty = false;
/*
substituters = [
"https://cache.nixos.org/"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59MDW/s82/h4RZcnxaz2bYcxoZb0qwYf5ED+w="
];
*/
2025-10-30 18:26:18 +01:00
};
system.stateVersion = "25.05";
}