Files
nixos/common/default.nix

179 lines
3.1 KiB
Nix
Raw Normal View History

2025-10-30 18:26:18 +01:00
{
config,
pkgs,
lib,
...
}:
{
imports = [
2026-02-17 20:02:25 +01:00
./modules
2025-10-30 18:26:18 +01:00
./hardware-configuration.nix
];
2026-02-19 00:14:43 +01:00
documentation.nixos.enable = false;
2025-10-30 18:26:18 +01:00
boot = {
loader = {
efi.canTouchEfiVariables = true;
systemd-boot = {
enable = true;
};
};
2026-03-12 00:15:38 +01:00
2025-10-30 18:26:18 +01:00
consoleLogLevel = 3;
plymouth.enable = true;
};
networking = {
2026-02-23 20:42:09 +01:00
networkmanager = {
enable = true;
plugins = with pkgs; [
networkmanager-openconnect
];
};
2026-02-27 21:48:04 +01:00
2025-12-26 10:38:31 +01:00
firewall.enable = false;
2025-10-30 18:26:18 +01:00
};
time.timeZone = "Europe/Prague";
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";
};
};
console.keyMap = "cz-lat2";
xdg.portal.enable = true;
2025-12-26 10:38:31 +01:00
security = {
rtkit.enable = true;
sudo.extraConfig = ''
Defaults insults
'';
2026-03-12 00:15:38 +01:00
2025-12-26 10:38:31 +01:00
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
virtualisation = {
docker = {
enable = true;
2025-12-21 11:08:40 +01:00
autoPrune.enable = false;
2025-10-30 18:26:18 +01:00
storageDriver = "btrfs";
enableOnBoot = true;
};
2026-03-12 00:15:38 +01:00
2025-10-30 18:26:18 +01:00
libvirtd = {
enable = true;
extraConfig = ''
unix_sock_group = "qemu-libvirtd"
'';
2026-02-19 18:38:18 +01:00
onBoot = "ignore";
2025-10-30 18:26:18 +01:00
};
2026-03-12 00:15:38 +01:00
2025-12-08 20:19:51 +01:00
spiceUSBRedirection.enable = true;
2025-10-30 18:26:18 +01:00
};
users.users.jax = {
isNormalUser = true;
description = "Roman Lubij";
extraGroups = [
"networkmanager"
"wheel"
"docker"
"qemu-libvirtd"
2025-12-08 20:19:51 +01:00
"camera"
"video"
"render"
"input"
2026-03-05 16:16:23 +01:00
"dialout"
2025-10-30 18:26:18 +01:00
];
2026-03-12 00:15:38 +01:00
2025-10-30 18:26:18 +01:00
shell = pkgs.zsh;
#packages = with pkgs; [ ];
};
environment = {
sessionVariables = {
NIXOS_OZONE_WL = "1";
LIBVIRT_DEFAULT_URI = "qemu:///system";
};
2026-03-12 00:15:38 +01:00
2025-11-15 00:27:02 +01:00
systemPackages = [
pkgs.libheif
pkgs.libheif.out
];
2026-03-12 00:15:38 +01:00
2025-11-15 00:27:02 +01:00
pathsToLink = [ "share/thumbnailers" ];
2025-10-30 18:26:18 +01:00
};
hardware = {
bluetooth = {
enable = true;
package = pkgs.bluez.overrideAttrs (old: {
configureFlags = old.configureFlags ++ [
"--enable-sixaxis"
];
});
2026-02-17 20:02:25 +01:00
2025-10-30 18:26:18 +01:00
powerOnBoot = true;
input.General.ClassicBondedOnly = false;
settings = {
General = {
Experimental = true;
};
};
};
2026-02-17 20:02:25 +01:00
2025-10-30 18:26:18 +01:00
i2c.enable = true;
graphics = {
enable = true;
enable32Bit = true;
package = pkgs.mesa;
};
2026-02-17 20:02:25 +01:00
2025-12-26 02:35:27 +01:00
logitech.wireless = {
enable = true;
enableGraphical = true;
};
2025-10-30 18:26:18 +01:00
};
qt = {
platformTheme = "qt5ct";
2025-12-08 20:19:51 +01:00
style = "adwaita-dark";
2025-10-30 18:26:18 +01:00
enable = true;
};
nix.settings = {
auto-optimise-store = true;
experimental-features = [
"flakes"
"nix-command"
];
2026-03-12 00:15:38 +01:00
2025-10-30 18:26:18 +01:00
warn-dirty = false;
};
system.stateVersion = "25.05";
}