214 lines
6.4 KiB
Nix
214 lines
6.4 KiB
Nix
# 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`).
|
|
|
|
{ config, lib, pkgs, inputs, ... }:
|
|
|
|
{
|
|
# Use the systemd-boot EFI boot loader.
|
|
boot.loader.systemd-boot.enable = true;
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
boot.kernelPackages = pkgs.linuxPackages_zen;
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
nix.settings.auto-optimise-store = true;
|
|
nix.gc.automatic = true;
|
|
nix.gc.options = "--delete-older-than 30d";
|
|
|
|
services.fstrim.enable = true;
|
|
|
|
hardware.graphics.enable32Bit = true; # For 32 bit applications
|
|
hardware.bluetooth.enable = true;
|
|
hardware.steam-hardware.enable = true;
|
|
|
|
# Enable common container config files in /etc/containers
|
|
virtualisation.containers.enable = true;
|
|
virtualisation = {
|
|
podman = {
|
|
enable = true;
|
|
# Create a `docker` alias for podman, to use it as a drop-in replacement
|
|
# dockerCompat = true;
|
|
# Required for containers under podman-compose to be able to talk to each other.
|
|
defaultNetwork.settings.dns_enabled = true;
|
|
};
|
|
};
|
|
|
|
# networking.hostName = "nixos"; # Define your hostname.
|
|
# Pick only one of the below networking options.
|
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|
networking.networkmanager = {
|
|
# Easiest to use and most distros use this by default.
|
|
enable = true;
|
|
wifi.powersave = false;
|
|
};
|
|
|
|
# services.resolved.enable = true;
|
|
services.mullvad-vpn = {
|
|
enable = true;
|
|
package = pkgs.mullvad-vpn;
|
|
};
|
|
|
|
# Set your time zone.
|
|
time.timeZone = "Europe/London";
|
|
|
|
# Configure network proxy if necessary
|
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
|
|
fonts.enableDefaultPackages = true;
|
|
fonts.packages = with pkgs; [
|
|
noto-fonts
|
|
noto-fonts-cjk-sans
|
|
noto-fonts-cjk-serif
|
|
];
|
|
|
|
# Select internationalisation properties.
|
|
i18n = {
|
|
defaultLocale = "en_GB.UTF-8";
|
|
supportedLocales = [
|
|
"en_GB.UTF-8/UTF-8"
|
|
"en_US.UTF-8/UTF-8"
|
|
"ja_JP.UTF-8/UTF-8"
|
|
];
|
|
inputMethod = {
|
|
enable = true;
|
|
type = "fcitx5";
|
|
fcitx5 = {
|
|
waylandFrontend = true;
|
|
addons = with pkgs; [ fcitx5-mozc ];
|
|
};
|
|
};
|
|
};
|
|
|
|
|
|
console = {
|
|
# font = "Lat2-Terminus16";
|
|
keyMap = "uk";
|
|
# useXkbConfig = true; # use xkb.options in tty.
|
|
};
|
|
|
|
# Enable the X11 windowing system.
|
|
# services.xserver.enable = true;
|
|
|
|
# Configure keymap in X11
|
|
# services.xserver.xkb.layout = "us";
|
|
# services.xserver.xkb.options = "eurosign:e,caps:escape";
|
|
|
|
# Enable CUPS to print documents.
|
|
# services.printing.enable = true;
|
|
|
|
# Enable sound.
|
|
# hardware.pulseaudio.enable = true;
|
|
# OR
|
|
services.pipewire = {
|
|
enable = true;
|
|
pulse.enable = true;
|
|
};
|
|
|
|
services.power-profiles-daemon.enable = false;
|
|
services.tlp = {
|
|
enable = true;
|
|
settings = {
|
|
RESTORE_DEVICE_STATE_ON_STARTUP = 1;
|
|
USB_AUTOSUSPEND = 0;
|
|
PLATFORM_PROFILE_ON_AC = "performance";
|
|
PLATFORM_PROFILE_ON_BAT = "low-power";
|
|
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
|
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
|
CPU_BOOST_ON_AC = 1;
|
|
CPU_BOOST_ON_BAT = 0;
|
|
};
|
|
};
|
|
|
|
# Enable touchpad support (enabled default in most desktopManager).
|
|
services.libinput.enable = true;
|
|
|
|
services.xserver.enable = true; # optional
|
|
services.displayManager.sddm.enable = true;
|
|
services.displayManager.sddm.wayland.enable = true;
|
|
services.desktopManager.plasma6.enable = true;
|
|
|
|
services.fwupd.enable = true;
|
|
services.geoclue2.enable = true;
|
|
|
|
services.flatpak.enable = true;
|
|
|
|
programs.steam = {
|
|
enable = true;
|
|
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
|
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
|
#gamescopeSession.enable = true;
|
|
};
|
|
programs.gamemode.enable = true;
|
|
|
|
programs.cdemu.enable = true;
|
|
|
|
# List packages installed in system profile. To search, run:
|
|
# $ nix search wget
|
|
environment.systemPackages = with pkgs;
|
|
[
|
|
vim
|
|
curl
|
|
wget
|
|
inetutils
|
|
nuspell
|
|
hunspellDicts.en-gb-ise
|
|
gcc
|
|
libva-utils
|
|
kdePackages.sddm-kcm
|
|
smartmontools
|
|
kdePackages.plasma-disks
|
|
kdePackages.partitionmanager
|
|
kdePackages.filelight
|
|
kdePackages.ffmpegthumbs
|
|
kdePackages.kcalc
|
|
rar
|
|
nixpkgs-fmt
|
|
];
|
|
|
|
# Some programs need SUID wrappers, can be configured further or are
|
|
# started in user sessions.
|
|
# programs.mtr.enable = true;
|
|
# programs.gnupg.agent = {
|
|
# enable = true;
|
|
# enableSSHSupport = true;
|
|
# };
|
|
|
|
# List services that you want to enable:
|
|
|
|
# Enable the OpenSSH daemon.
|
|
# services.openssh.enable = true;
|
|
|
|
# Open ports in the firewall.
|
|
networking.firewall.allowedTCPPorts = [ ];
|
|
networking.firewall.allowedUDPPorts = [ ];
|
|
# Or disable the firewall altogether.
|
|
# networking.firewall.enable = false;
|
|
|
|
# Copy the NixOS configuration file and link it from the resulting system
|
|
# (/run/current-system/configuration.nix). This is useful in case you
|
|
# accidentally delete configuration.nix.
|
|
# system.copySystemConfiguration = true;
|
|
|
|
# This option defines the first version of NixOS you have installed on this particular machine,
|
|
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
|
#
|
|
# Most users should NEVER change this value after the initial install, for any reason,
|
|
# even if you've upgraded your system to a new NixOS release.
|
|
#
|
|
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
|
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
|
# to actually do that.
|
|
#
|
|
# This value being lower than the current NixOS release does NOT mean your system is
|
|
# out of date, out of support, or vulnerable.
|
|
#
|
|
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
|
# and migrated your data accordingly.
|
|
#
|
|
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
|
system.stateVersion = "24.05"; # Did you read the comment?
|
|
|
|
}
|