2026-03-22 21:30:03 +05:00
|
|
|
|
# Edit this configuration file to define what should be installed on
|
|
|
|
|
|
# your system. Help is available in the configuration.nix(5) man page, on
|
|
|
|
|
|
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
|
|
|
|
|
|
2026-04-12 10:04:23 +05:00
|
|
|
|
{ self, ... }:
|
2026-03-22 21:30:03 +05:00
|
|
|
|
{
|
|
|
|
|
|
flake.nixosModules.laptop = { pkgs, ... }: {
|
|
|
|
|
|
|
|
|
|
|
|
# Import NixOS modules.
|
|
|
|
|
|
imports = [
|
2026-03-23 14:51:59 +05:00
|
|
|
|
self.nixosModules.laptopHardware
|
|
|
|
|
|
|
2026-04-15 19:15:43 +05:00
|
|
|
|
self.nixosModules.base
|
2026-03-22 21:30:03 +05:00
|
|
|
|
self.nixosModules.gamedev
|
|
|
|
|
|
self.nixosModules.gaming
|
2026-04-15 19:15:43 +05:00
|
|
|
|
|
|
|
|
|
|
self.nixosModules.fastfetch
|
2026-03-22 21:30:03 +05:00
|
|
|
|
self.nixosModules.home-manager
|
2026-04-15 19:15:43 +05:00
|
|
|
|
|
2026-04-25 23:34:21 +05:00
|
|
|
|
# self.nixosModules.cinnamon
|
|
|
|
|
|
self.nixosModules.niri
|
2026-03-28 21:43:28 +05:00
|
|
|
|
# self.nixosModules.plasma
|
2026-03-22 21:30:03 +05:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
# Use the systemd-boot EFI boot loader.
|
|
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
2026-04-25 23:34:21 +05:00
|
|
|
|
boot.loader.timeout = 1;
|
|
|
|
|
|
|
|
|
|
|
|
# Use the GRUB EFI boot loader.
|
|
|
|
|
|
# boot.loader = {
|
|
|
|
|
|
# grub = {
|
|
|
|
|
|
# enable = true;
|
|
|
|
|
|
# device = "nodev"; # "nodev" is used for UEFI
|
|
|
|
|
|
# efiSupport = true;
|
|
|
|
|
|
# useOSProber = true;
|
|
|
|
|
|
# };
|
|
|
|
|
|
# efi.canTouchEfiVariables = true;
|
|
|
|
|
|
# };
|
2026-03-22 21:30:03 +05:00
|
|
|
|
|
|
|
|
|
|
# Enable flakes.
|
|
|
|
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
|
|
|
|
|
|
|
|
# Enable store optimization on every rebuild.
|
|
|
|
|
|
nix.settings.auto-optimise-store = true;
|
|
|
|
|
|
|
|
|
|
|
|
# Enable automatic garbace collection.
|
|
|
|
|
|
nix.gc = {
|
|
|
|
|
|
automatic = true;
|
|
|
|
|
|
dates = "weekly";
|
|
|
|
|
|
options = "--delete-older-than 7d";
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
networking.hostName = "nixos"; # Define your hostname.
|
|
|
|
|
|
|
|
|
|
|
|
# Configure network connections interactively with nmcli or nmtui.
|
|
|
|
|
|
networking.networkmanager.enable = true;
|
|
|
|
|
|
|
|
|
|
|
|
# Set your time zone.
|
|
|
|
|
|
time.timeZone = "Asia/Almaty";
|
|
|
|
|
|
|
|
|
|
|
|
# Select internationalisation properties.
|
|
|
|
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
|
|
|
|
|
|
|
|
|
|
|
# Enable CUPS to print documents.
|
|
|
|
|
|
services.printing.enable = true;
|
|
|
|
|
|
|
|
|
|
|
|
# Enable bluetooth.
|
|
|
|
|
|
hardware.bluetooth.enable = true;
|
|
|
|
|
|
|
|
|
|
|
|
# Enable sound.
|
|
|
|
|
|
services.pipewire = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
pulse.enable = true;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
# Enable TLP.
|
|
|
|
|
|
services.tlp = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
settings = {
|
|
|
|
|
|
# Improve performance on battery.
|
|
|
|
|
|
CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_performance";
|
|
|
|
|
|
PLATFORM_PROFILE_ON_BAT = "performance";
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
2026-04-15 19:15:43 +05:00
|
|
|
|
users.users.${self.user} = {
|
2026-03-22 21:30:03 +05:00
|
|
|
|
isNormalUser = true;
|
|
|
|
|
|
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
|
|
|
|
|
packages = with pkgs; [
|
|
|
|
|
|
tree
|
|
|
|
|
|
];
|
|
|
|
|
|
};
|
2026-04-15 19:15:43 +05:00
|
|
|
|
|
|
|
|
|
|
# Allow unfree packages.
|
2026-03-22 21:30:03 +05:00
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
|
|
|
|
|
|
|
|
fileSystems = {
|
|
|
|
|
|
"/".options = [ "compress=zstd" ];
|
|
|
|
|
|
"/home".options = [ "compress=zstd" ];
|
|
|
|
|
|
"/nix".options = [ "compress=zstd" "noatime" ];
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
# Mount /dev/nvme0n1p5 data partition.
|
|
|
|
|
|
fileSystems."/mnt/data" = {
|
|
|
|
|
|
device = "/dev/disk/by-uuid/a7614c0a-f5ee-4eab-a431-853affce8a34";
|
|
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
|
options = [
|
|
|
|
|
|
"users"
|
|
|
|
|
|
"nofail"
|
|
|
|
|
|
"exec"
|
|
|
|
|
|
];
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
system.stateVersion = "25.11"; # Did you read the comment?
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|