2022-06-05 01:43:16 -03: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’).
|
2022-11-17 15:12:27 -03:00
|
|
|
|
{ config, pkgs, inputs, ... }: {
|
2022-12-14 01:05:27 -03:00
|
|
|
|
imports = [ ./gamemode.nix ./cachix.nix ./media-packages.nix ./boot.nix ];
|
2022-10-22 00:03:18 -03:00
|
|
|
|
packages.media-packages.enable = true;
|
|
|
|
|
|
2022-10-24 19:52:24 -03:00
|
|
|
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
|
|
|
|
|
2022-08-06 18:32:34 -03:00
|
|
|
|
boot.kernel.sysctl = {
|
|
|
|
|
"vm.max_map_count" = 1048576; # Needed by DayZ
|
|
|
|
|
};
|
|
|
|
|
|
2022-12-16 17:53:15 -03:00
|
|
|
|
zramSwap.enable = true;
|
|
|
|
|
|
2022-08-20 15:22:48 -03:00
|
|
|
|
programs.adb.enable = true;
|
2022-08-30 22:01:06 -03:00
|
|
|
|
services.udev.packages = [ pkgs.android-udev-rules ];
|
2022-08-20 15:22:48 -03:00
|
|
|
|
|
2022-06-05 01:43:16 -03:00
|
|
|
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|
|
|
|
# Configure network proxy if necessary
|
|
|
|
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
|
|
|
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
|
|
|
# Enable networking
|
|
|
|
|
networking.networkmanager.enable = true;
|
|
|
|
|
# Set your time zone.
|
|
|
|
|
time.timeZone = "America/Sao_Paulo";
|
|
|
|
|
# Select internationalisation properties.
|
|
|
|
|
i18n.defaultLocale = "pt_BR.utf8";
|
2022-11-07 11:24:40 -03:00
|
|
|
|
|
2022-06-05 01:43:16 -03:00
|
|
|
|
# Enable the GNOME Desktop Environment.
|
2022-06-12 23:47:05 -03:00
|
|
|
|
# services.xserver.displayManager.gdm.enable = true;
|
2022-06-13 09:45:20 -03:00
|
|
|
|
# services.xserver.desktopManager.gnome.enable = true;
|
2022-07-15 22:03:57 -03:00
|
|
|
|
# services.xserver.displayManager.autologin.user = "lelgenio";
|
2022-11-07 11:24:40 -03:00
|
|
|
|
|
2022-06-05 01:43:16 -03:00
|
|
|
|
# Configure keymap in X11
|
|
|
|
|
services.xserver = {
|
|
|
|
|
layout = "us";
|
|
|
|
|
xkbVariant = "colemak";
|
|
|
|
|
};
|
2022-07-15 22:03:57 -03:00
|
|
|
|
console.keyMap = "colemak";
|
2022-06-05 01:43:16 -03:00
|
|
|
|
# Enable CUPS to print documents.
|
2022-06-09 23:16:20 -03:00
|
|
|
|
# services.printing.enable = true;
|
|
|
|
|
services.flatpak.enable = true;
|
2022-06-05 01:43:16 -03:00
|
|
|
|
virtualisation.docker.enable = true;
|
2022-11-10 20:54:21 -03:00
|
|
|
|
programs.firejail.enable = true;
|
2022-10-18 21:45:20 -03:00
|
|
|
|
|
2022-08-07 15:12:25 -03:00
|
|
|
|
security.rtkit.enable = true;
|
2022-11-10 20:54:28 -03:00
|
|
|
|
services.openssh = {
|
|
|
|
|
enable = true;
|
|
|
|
|
kbdInteractiveAuthentication = false;
|
|
|
|
|
passwordAuthentication = false;
|
|
|
|
|
permitRootLogin = "no";
|
|
|
|
|
ports = [ 9022 ];
|
|
|
|
|
};
|
2022-08-07 15:12:25 -03:00
|
|
|
|
|
|
|
|
|
## Enable sound with pipewire.
|
2022-06-05 01:43:16 -03:00
|
|
|
|
sound.enable = true;
|
2022-11-07 11:24:40 -03:00
|
|
|
|
hardware.pulseaudio.enable = false;
|
2022-08-07 15:12:25 -03:00
|
|
|
|
services.pipewire = {
|
|
|
|
|
enable = true;
|
|
|
|
|
wireplumber.enable = true;
|
|
|
|
|
pulse.enable = true;
|
|
|
|
|
alsa.enable = true;
|
|
|
|
|
jack.enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
2022-11-12 21:15:20 -03:00
|
|
|
|
services.blueman.enable = true;
|
|
|
|
|
hardware.bluetooth = {
|
|
|
|
|
enable = true;
|
|
|
|
|
package = pkgs.bluezFull;
|
|
|
|
|
settings = {
|
|
|
|
|
General = {
|
|
|
|
|
DiscoverableTimeout = 0;
|
|
|
|
|
# Discoverable = true;
|
|
|
|
|
AlwaysPairable = true;
|
|
|
|
|
};
|
2022-12-01 23:13:00 -03:00
|
|
|
|
Policy = { AutoEnable = true; };
|
2022-11-12 21:15:20 -03:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2022-06-05 01:43:16 -03:00
|
|
|
|
# Enable touchpad support (enabled default in most desktopManager).
|
2022-06-09 23:16:20 -03:00
|
|
|
|
services.xserver.libinput.enable = true;
|
2022-10-18 21:45:20 -03:00
|
|
|
|
|
2022-06-05 01:43:16 -03:00
|
|
|
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
|
|
|
users.users.lelgenio = {
|
|
|
|
|
isNormalUser = true;
|
|
|
|
|
description = "Leonardo Eugênio";
|
2022-11-12 21:15:20 -03:00
|
|
|
|
extraGroups = [ "networkmanager" "wheel" "docker" "adbusers" "bluetooth" ];
|
2022-06-05 01:43:16 -03:00
|
|
|
|
shell = pkgs.fish;
|
|
|
|
|
};
|
2022-07-16 14:24:09 -03:00
|
|
|
|
# services.getty.autologinUser = "lelgenio";
|
2022-06-05 01:43:16 -03:00
|
|
|
|
programs.fish.enable = true;
|
2022-07-18 23:45:04 -03:00
|
|
|
|
# TODO: enable thunar plugins
|
|
|
|
|
# programs.thunar.enable = true;
|
|
|
|
|
# programs.thunar.plugins = with pkgs.xfce; [ thunar-archive-plugin thunar-volman ];
|
|
|
|
|
services.gvfs.enable = true; # Mount, trash, and other functionalities
|
|
|
|
|
services.tumbler.enable = true; # Thumbnail support for images
|
2022-06-05 01:43:16 -03:00
|
|
|
|
# Allow unfree packages
|
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
2022-10-18 20:58:23 -03:00
|
|
|
|
|
2022-06-05 01:43:16 -03:00
|
|
|
|
environment.systemPackages = with pkgs; [
|
2022-07-16 02:12:18 -03:00
|
|
|
|
pinentry-curses
|
2022-06-13 09:45:20 -03:00
|
|
|
|
pavucontrol
|
2022-10-18 21:45:20 -03:00
|
|
|
|
|
2022-06-12 23:47:05 -03:00
|
|
|
|
glib # gsettings
|
2022-09-26 22:12:56 -03:00
|
|
|
|
usbutils
|
2022-08-01 20:15:26 -03:00
|
|
|
|
# dracula-theme # gtk theme
|
2022-07-21 00:32:09 -03:00
|
|
|
|
gnome3.adwaita-icon-theme # default gnome cursors
|
2022-06-05 01:43:16 -03:00
|
|
|
|
];
|
2022-10-18 21:45:20 -03:00
|
|
|
|
|
2022-07-21 01:04:22 -03:00
|
|
|
|
services.geoclue2.enable = true;
|
2022-07-21 00:29:12 -03:00
|
|
|
|
# programs.qt5ct.enable = true;
|
2022-07-20 00:14:01 -03:00
|
|
|
|
programs.steam.enable = true;
|
2022-06-05 01:43:16 -03:00
|
|
|
|
# Some programs need SUID wrappers, can be configured further or are
|
|
|
|
|
# started in user sessions.
|
|
|
|
|
# programs.mtr.enable = true;
|
|
|
|
|
services.pcscd.enable = true;
|
|
|
|
|
programs.gnupg.agent = {
|
|
|
|
|
enable = true;
|
|
|
|
|
enableSSHSupport = true;
|
|
|
|
|
pinentryFlavor = "curses";
|
|
|
|
|
};
|
|
|
|
|
# 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.
|
2022-06-09 23:16:20 -03:00
|
|
|
|
networking.firewall.enable = false;
|
2022-07-20 19:48:29 -03:00
|
|
|
|
security.sudo.wheelNeedsPassword = false;
|
2022-11-17 15:12:27 -03:00
|
|
|
|
|
|
|
|
|
nix.registry.nixpkgs.flake = inputs.nixpkgs;
|
2022-06-05 01:43:16 -03:00
|
|
|
|
nix = {
|
2022-11-26 01:01:12 -03:00
|
|
|
|
gc = {
|
|
|
|
|
automatic = true;
|
2022-12-21 23:20:06 -03:00
|
|
|
|
dates = "weekly";
|
2022-12-02 01:22:32 -03:00
|
|
|
|
options = "--delete-older-than 7d";
|
2022-11-26 01:01:12 -03:00
|
|
|
|
};
|
2022-12-21 23:20:06 -03:00
|
|
|
|
optimise.automatic = true;
|
2022-08-20 17:46:03 -03:00
|
|
|
|
settings = {
|
2022-10-17 00:18:10 -03:00
|
|
|
|
auto-optimise-store = true;
|
2022-10-24 08:02:22 -03:00
|
|
|
|
substituters = [
|
2022-12-23 10:03:05 -03:00
|
|
|
|
# "http://nixcache.lelgenio.1337.cx:5000"
|
2022-10-24 08:02:22 -03:00
|
|
|
|
"https://hyprland.cachix.org"
|
|
|
|
|
"https://lelgenio.cachix.org"
|
|
|
|
|
"https://wegank.cachix.org"
|
|
|
|
|
];
|
2022-08-30 22:01:06 -03:00
|
|
|
|
trusted-public-keys = [
|
2022-12-23 10:03:05 -03:00
|
|
|
|
# "nixcache.lelgenio.1337.cx:zxCfx7S658llDgAUG0JVyNrlAdFVvPniSdDOkvfTPS8="
|
2022-08-30 22:01:06 -03:00
|
|
|
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
2022-10-12 18:10:07 -03:00
|
|
|
|
"lelgenio.cachix.org-1:W8tMlmDFLU/V+6DlChXjekxoHZpjgVHZpmusC4cueBc="
|
2022-10-24 08:02:22 -03:00
|
|
|
|
"wegank.cachix.org-1:xHignps7GtkPP/gYK5LvA/6UFyz98+sgaxBSy7qK0Vs="
|
2022-08-30 22:01:06 -03:00
|
|
|
|
];
|
2022-08-20 17:46:03 -03:00
|
|
|
|
};
|
2022-06-05 01:43:16 -03:00
|
|
|
|
package = pkgs.nixFlakes; # or versioned attributes like nixVersions.nix_2_8
|
|
|
|
|
extraOptions = ''
|
|
|
|
|
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
|
2022-10-18 21:04:39 -03:00
|
|
|
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
2022-06-05 01:43:16 -03:00
|
|
|
|
# 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).
|
|
|
|
|
system.stateVersion = "22.05"; # Did you read the comment?
|
2022-07-21 00:32:09 -03:00
|
|
|
|
}
|