{ config, pkgs, lib, ... }:

{
	
	imports =
		
		[ 
			./modules/modules.nix
		];

	# Bootloader.
	boot.loader.systemd-boot.enable = true;
	boot.loader.efi.canTouchEfiVariables = true;
	boot.kernelPackages =  pkgs.linuxPackages_latest;

	services.fwupd.enable = true;

	nix.settings.experimental-features = [ "nix-command" "flakes" ];

	networking.hostName = "nixos"; # Define your hostname.
	# networking.wireless.enable = true;  # Enables wireless support via wpa_supplicant.

	# Enable networking
	networking.networkmanager.enable = true;

	# Set your time zone.
	time.timeZone = "America/Los_Angeles";

	# Select internationalisation properties.
	i18n.defaultLocale = "en_US.UTF-8";

	# Enable the X11 windowing system.
	services.xserver.enable = true;

	
	# Enable the GNOME Desktop Environment.
	services.displayManager.gdm.enable = true;
	services.desktopManager.gnome.enable = true;


	# Configure keymap in X11
	services.xserver.xkb = {
		layout = "us";
		variant = "";
	};

	# Enable CUPS to print documents.
	services.printing.enable = true;

	# Enable sound with pipewire.
	services.pulseaudio.enable = false;
	security.rtkit.enable = true;
	services.pipewire = {
		enable = true;
		alsa.enable = true;
		alsa.support32Bit = true;
		pulse.enable = true;
	};

	users.users = {
		free = {
			isNormalUser = true;
			description = "free";
			extraGroups = [ "networkmanager" "wheel"];
		};
	};

	# Allow Flatpak
	services.flatpak.enable = true;

	# Allow unfree packages
	nixpkgs.config.allowUnfree = true;

	# List packages installed in system profile. To search, run:
	# $ nix search wget
	environment.systemPackages = with pkgs; [
		git
		wget
		librewolf
		fish
		htop
		gnomeExtensions.dash-to-dock
		gnomeExtensions.vitals
		gnomeExtensions.pop-shell
		gnomeExtensions.just-perfection
		gnomeExtensions.appindicator
		gnomeExtensions.date-menu-formatter
		gnome-tweaks
		papirus-icon-theme
		ranger
		neofetch
		gedit
		openssl
		pwgen
		aspell
		aspellDicts.en
		lm_sensors
		hunspell
		hunspellDicts.en_US
		gparted
		pv
		unzip
		parted
		screen
		zenity
		libargon2
		gnome-terminal
		dig
		ungoogled-chromium
		tor-browser
		element-desktop 
		libreoffice-fresh
		firefox
		brave


	];

	services.tor = {
		enable = true;
		client.enable = true;
		torsocks.enable = true;
	};
	
	services.privoxy.enableTor = true;

	services.mullvad-vpn = {
		enable = true;
		package = pkgs.mullvad-vpn;
	};

	programs.bash.promptInit = "fish";
	programs.fish = {
		enable = true;
		promptInit = "neofetch";
	};

	services.openssh = {
		enable = true;
		settings = {
			PasswordAuthentication = false;
			KbdInteractiveAuthentication = false;
			PermitRootLogin = "yes";
		};
	};


	networking.firewall.enable = true;


	####### AUTO COLLECT GARABAGE #######
	nix.gc = {
		automatic = true;
		dates = "weekly";
		options = "--delete-older-than 7d";
	};

	system.stateVersion = "24.05";

}
