Update configuration.nix
This commit is contained in:
parent
194a8acf09
commit
115df5a8ef
@ -1,6 +1,7 @@
|
|||||||
{ config, pkgs, inputs, ... }:
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
# Imports
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
@ -17,11 +18,8 @@
|
|||||||
rtl8192eu
|
rtl8192eu
|
||||||
];
|
];
|
||||||
|
|
||||||
# Use latest and greates kernel
|
|
||||||
# boot.kernelPackages = pkgs.linuxPackages_latest;
|
|
||||||
|
|
||||||
# Set the hostname
|
# Set the hostname
|
||||||
networking.hostName = "nixos"; # Define your hostname.
|
networking.hostName = "nixos";
|
||||||
|
|
||||||
# Enable flakes
|
# Enable flakes
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
@ -51,14 +49,22 @@
|
|||||||
|
|
||||||
# Enable networking
|
# Enable networking
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "Europe/Zagreb";
|
||||||
|
|
||||||
|
# Set iwd as wifi backend
|
||||||
networking.wireless.iwd.enable = true;
|
networking.wireless.iwd.enable = true;
|
||||||
networking.networkmanager.wifi.backend = "iwd";
|
networking.networkmanager.wifi.backend = "iwd";
|
||||||
networking.networkmanager.wifi.powersave = false;
|
networking.networkmanager.wifi.powersave = false;
|
||||||
|
|
||||||
|
### --- Enabling DNS Over HTTPS --- ###
|
||||||
|
|
||||||
|
# make network manager not set a default dns
|
||||||
networking.networkmanager.dns = "none";
|
networking.networkmanager.dns = "none";
|
||||||
|
|
||||||
# local nameservers
|
# set dns to local nameservers
|
||||||
networking.nameservers = [ "127.0.0.1" "::1" ];
|
networking.nameservers = [ "127.0.0.1" "::1" ];
|
||||||
|
|
||||||
|
|
||||||
# Dnscrypt for dns over https
|
# Dnscrypt for dns over https
|
||||||
services.dnscrypt-proxy2 = {
|
services.dnscrypt-proxy2 = {
|
||||||
@ -74,14 +80,11 @@
|
|||||||
cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md";
|
cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md";
|
||||||
minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
|
minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
|
||||||
};
|
};
|
||||||
|
# use mullvad dns server
|
||||||
server_names = [ "mullvad-base-doh" ];
|
server_names = [ "mullvad-base-doh" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "Europe/Zagreb";
|
|
||||||
|
|
||||||
# Select internationalisation properties.
|
# Select internationalisation properties.
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
@ -100,6 +103,16 @@
|
|||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
|
|
||||||
|
# Configure keymap in X11
|
||||||
|
services.xserver.xkb = {
|
||||||
|
layout = "us";
|
||||||
|
variant = "";
|
||||||
|
options = "caps:escape";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable touchpad support
|
||||||
|
services.xserver.libinput.enable = true;
|
||||||
|
|
||||||
# Enable the KDE Plasma Desktop Environment.
|
# Enable the KDE Plasma Desktop Environment.
|
||||||
services.xserver.displayManager.sddm = {
|
services.xserver.displayManager.sddm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -118,13 +131,6 @@
|
|||||||
oxygen
|
oxygen
|
||||||
];
|
];
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
services.xserver.xkb = {
|
|
||||||
layout = "us";
|
|
||||||
variant = "";
|
|
||||||
options = "caps:escape";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
# Enable CUPS to print documents.
|
||||||
services.printing.enable = false;
|
services.printing.enable = false;
|
||||||
|
|
||||||
@ -140,17 +146,8 @@
|
|||||||
alsa.enable = true;
|
alsa.enable = true;
|
||||||
alsa.support32Bit = true;
|
alsa.support32Bit = true;
|
||||||
pulse.enable = true;
|
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;
|
|
||||||
|
|
||||||
# Enable OpenGL
|
# Enable OpenGL
|
||||||
hardware.opengl = {
|
hardware.opengl = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -158,6 +155,7 @@
|
|||||||
driSupport32Bit = true;
|
driSupport32Bit = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Nvidia settings
|
||||||
hardware.nvidia = {
|
hardware.nvidia = {
|
||||||
|
|
||||||
# Modesetting is required.
|
# Modesetting is required.
|
||||||
@ -165,30 +163,22 @@
|
|||||||
|
|
||||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||||
powerManagement.enable = true;
|
powerManagement.enable = true;
|
||||||
# Fine-grained power management. Turns off GPU when not in use.
|
|
||||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
# Nvidia fine grainder power management, super experimental.
|
||||||
powerManagement.finegrained = false;
|
powerManagement.finegrained = false;
|
||||||
|
|
||||||
# Use the NVidia open source kernel module (not to be confused with the
|
|
||||||
# independent third-party "nouveau" open source driver).
|
|
||||||
# Support is limited to the Turing and later architectures. Full list of
|
|
||||||
# supported GPUs is at:
|
|
||||||
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
|
||||||
# Only available from driver 515.43.04+
|
|
||||||
# Currently alpha-quality/buggy, so false is currently the recommended setting.
|
|
||||||
open = false;
|
open = false;
|
||||||
|
|
||||||
# Enable the Nvidia settings menu,
|
# Enable the Nvidia settings menu,
|
||||||
# accessible via `nvidia-settings`.
|
|
||||||
nvidiaSettings = true;
|
nvidiaSettings = true;
|
||||||
|
|
||||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Nvidia prime settings
|
||||||
hardware.nvidia.prime = {
|
hardware.nvidia.prime = {
|
||||||
reverseSync.enable = true;
|
reverseSync.enable = true;
|
||||||
# Make sure to use the correct Bus ID values for your system!
|
|
||||||
intelBusId = "PCI:5:0:0";
|
intelBusId = "PCI:5:0:0";
|
||||||
nvidiaBusId = "PCI:1:0:0";
|
nvidiaBusId = "PCI:1:0:0";
|
||||||
};
|
};
|
||||||
@ -205,12 +195,11 @@
|
|||||||
# Steam settings
|
# Steam settings
|
||||||
programs.steam = {
|
programs.steam = {
|
||||||
enable = true;
|
enable = true;
|
||||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
remotePlay.openFirewall = true;
|
||||||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
dedicatedServer.openFirewall = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
# List packages installed in system profile.
|
||||||
# $ nix search wget
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
neovim
|
neovim
|
||||||
usbutils
|
usbutils
|
||||||
@ -233,6 +222,7 @@
|
|||||||
(catppuccin-papirus-folders.override { flavor = "frappe"; accent = "pink"; })
|
(catppuccin-papirus-folders.override { flavor = "frappe"; accent = "pink"; })
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Wireguard settings
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
# if packets are still dropped, they will show up in dmesg
|
# if packets are still dropped, they will show up in dmesg
|
||||||
logReversePathDrops = true;
|
logReversePathDrops = true;
|
||||||
@ -265,10 +255,11 @@
|
|||||||
|
|
||||||
# Setting up zsh
|
# Setting up zsh
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
# For the completion plugin
|
# For the completion plugin
|
||||||
environment.pathsToLink = [ "/share/zsh" ];
|
environment.pathsToLink = [ "/share/zsh" ];
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
# Defining my user
|
||||||
users.users.crony = {
|
users.users.crony = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Crony";
|
description = "Crony";
|
||||||
@ -283,6 +274,7 @@
|
|||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Enable home manager for my user
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
extraSpecialArgs = {inherit inputs;};
|
extraSpecialArgs = {inherit inputs;};
|
||||||
@ -291,7 +283,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Allow for appimages
|
# Allow appimages to run manually
|
||||||
boot.binfmt.registrations.appimage = {
|
boot.binfmt.registrations.appimage = {
|
||||||
wrapInterpreterInShell = false;
|
wrapInterpreterInShell = false;
|
||||||
interpreter = "${pkgs.appimage-run}/bin/appimage-run";
|
interpreter = "${pkgs.appimage-run}/bin/appimage-run";
|
||||||
@ -301,32 +293,7 @@
|
|||||||
magicOrExtension = ''\x7fELF....AI\x02'';
|
magicOrExtension = ''\x7fELF....AI\x02'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# DO NOT CHANGE
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
system.stateVersion = "23.11";
|
||||||
# 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;
|
|
||||||
|
|
||||||
# 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. It‘s 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).
|
|
||||||
system.stateVersion = "23.11"; # Did you read the comment?
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user