nixos/configuration.nix

212 lines
6.2 KiB
Nix
Raw Normal View History

2024-06-05 22:52:59 +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).
2024-12-15 15:02:21 +00:00
{ config, pkgs, lib, ... }:
2024-06-05 22:52:59 +01:00
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./packages.nix
2024-06-05 23:04:40 +01:00
./mnt.nix
./docker.nix
./hyprland.nix
2024-08-29 12:09:20 +01:00
./networking.nix
2024-10-19 19:10:00 +01:00
#./i3.nix
2024-06-05 22:52:59 +01:00
];
2024-12-15 15:02:21 +00:00
2024-06-05 22:52:59 +01:00
# Bootloader.
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/nvme0n1";
boot.loader.grub.useOSProber = true;
boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelPackages = pkgs.linuxPackages_latest;
2024-12-15 15:02:21 +00:00
boot.kernelParams = [
"cgroup_enable=cpuset,cpu,cpuacct,blkio,devices,freezer,net_cls,perf_event,net_prio,hugetlb,pids"
];
2024-10-18 19:30:57 +01:00
boot.supportedFilesystems = [ "ntfs" ];
2024-07-20 15:06:21 +01:00
# boot.supportedFilesystems = [ "zfs" ];
# boot.zfs.forceImportRoot = false;
# networking.hostId = "a44f5fde";
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
2024-06-05 22:52:59 +01:00
# Enable networking
networking.networkmanager.enable = true;
2024-07-20 15:06:21 +01:00
nixpkgs.config.allowBroken = true;
2024-06-05 22:52:59 +01:00
# Set your time zone.
time.timeZone = "Europe/London";
# Select internationalisation properties.
i18n.defaultLocale = "en_GB.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_GB.UTF-8";
LC_IDENTIFICATION = "en_GB.UTF-8";
LC_MEASUREMENT = "en_GB.UTF-8";
LC_MONETARY = "en_GB.UTF-8";
LC_NAME = "en_GB.UTF-8";
LC_NUMERIC = "en_GB.UTF-8";
LC_PAPER = "en_GB.UTF-8";
LC_TELEPHONE = "en_GB.UTF-8";
LC_TIME = "en_GB.UTF-8";
};
2024-12-15 15:02:21 +00:00
services = {
# Enable X11 and configure Wayland support
2025-01-04 22:26:45 +00:00
# Desktop Managers Configuration
xserver.desktopManager.gnome.enable = true;
desktopManager = {
plasma6.enable = true; # Use plasma5 for KDE6 as well
};
2024-12-15 15:02:21 +00:00
xserver = {
enable = true;
xkb.layout = "gb";
xkb.variant = "";
videoDrivers = ["amdgpu"];
# Enable GDM as the display manager
displayManager.gdm.enable = true;
2024-10-19 19:10:00 +01:00
2024-12-15 15:02:21 +00:00
# Window Managers Configuration
windowManager = {
i3 = {
enable = true;
package = pkgs.i3-gaps; # Optional: use i3-gaps for gaps support
extraPackages = with pkgs; [
i3lock
rofi
lxappearance
];
};
# Note: No need to enable Hyprland here, as it's done in hyprland.nix
2024-10-19 19:10:00 +01:00
};
};
};
2024-12-15 15:02:21 +00:00
# XDG Portals Configuration for Wayland
xdg.portal = {
2025-01-04 02:24:04 +00:00
enable = true;
#extraPortals = [
# pkgs.xdg-desktop-portal
#];
2024-12-15 15:02:21 +00:00
};
2024-06-05 22:52:59 +01:00
# Configure console keymap
console.keyMap = "uk";
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
2025-01-04 22:26:45 +00:00
services.pulseaudio.enable = false;
2025-01-04 02:24:04 +00:00
#sound.enable = true;
2024-06-05 22:52:59 +01:00
services.flatpak.enable = true;
services.blueman.enable = true;
security.rtkit.enable = true;
services.gvfs.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
2024-10-18 19:30:57 +01:00
#alsa.support32Bit = true;
2024-06-05 22:52:59 +01:00
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
2024-08-29 12:09:20 +01:00
2024-06-05 22:52:59 +01:00
# Define a user account. Don't forget to set a password with passwd.
users.users.micqdf = {
isNormalUser = true;
description = "micqdf";
extraGroups = [ "networkmanager" "wheel" "docker"];
};
2024-10-19 19:10:00 +01:00
# environment.systemPackages = [
# pkgs.home-manager
# ];
2024-06-05 22:52:59 +01:00
# Install programs config
2024-08-29 12:09:20 +01:00
programs.java.enable = true;
2024-06-05 22:52:59 +01:00
programs.sway.enable = true;
2024-08-29 12:09:20 +01:00
2024-06-05 22:52:59 +01:00
programs.fish.enable = true;
users.defaultUserShell = pkgs.fish;
2024-08-29 12:09:20 +01:00
2024-06-05 22:52:59 +01:00
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
2024-12-15 15:02:21 +00:00
#nixpkgs.overlays = [
# (import ./godot4-overlay.nix)
#];
2024-08-29 12:09:20 +01:00
2024-06-05 22:52:59 +01:00
#hardware.opengl.driSupport = true; # This is already enabled by default
hardware.bluetooth.enable = true; # enables support for Bluetooth
hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot
2024-10-18 19:30:57 +01:00
hardware.bluetooth.settings = {
General = {
Enable = "Source,Sink,Media,Socket";
};
};
2024-08-31 22:50:23 +01:00
#cosmic
2024-10-18 19:30:57 +01:00
#hardware.system76.enableAll = true;
2024-08-31 22:50:23 +01:00
#services.desktopManager.cosmic.enable = true;
#services.displayManager.cosmic-greeter.enable = true;
2024-06-05 22:52:59 +01:00
2025-01-04 22:26:45 +00:00
hardware.graphics = {
2024-06-05 22:52:59 +01:00
enable = true;
2025-01-04 22:26:45 +00:00
#driSupport = true;
#driSupport32Bit = true;
2024-07-20 15:06:21 +01:00
extraPackages = with pkgs; [
vulkan-loader
vulkan-validation-layers
vulkan-extension-layer
];
2024-06-05 22:52:59 +01:00
};
2024-08-29 12:09:20 +01:00
programs.steam.enable = true;
2024-06-05 22:52:59 +01:00
programs.steam.gamescopeSession.enable = true;
programs.gamemode.enable = true;
2024-12-15 15:02:21 +00:00
programs.ssh.askPassword = lib.mkForce "/nix/store/qjl45ra2yaqn88h6s9f7b79zpja9dy8b-seahorse-43.0/libexec/seahorse/ssh-askpass";
2024-06-05 22:52:59 +01:00
2024-07-20 15:06:21 +01:00
# # List services that you want to enable:
# environment.sessionVariables = {
# STEAM_EXTRA_COMPAT_TOOLS_PATHS = "/home/micqdf/.steam/root/compatibilitytools.d";
# hyprshot = "/home/micqdf/flakes/hyprshot/Hyprshot";
# };
#
security.polkit.enable = true;
2024-06-05 22:52:59 +01:00
# Enable the OpenSSH daemon.
services.openssh.enable = true;
services.tumbler.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# 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).
2024-12-15 15:02:21 +00:00
system.stateVersion = "24.11"; # Did you read the comment?
2024-06-05 22:52:59 +01:00
system.autoUpgrade.enable = true;
2024-08-29 12:09:20 +01:00
system.autoUpgrade.allowReboot = false;
2024-06-05 22:52:59 +01:00
}