Basic configuration.
This commit is contained in:
commit
2dca39131a
6 changed files with 732 additions and 0 deletions
hosts/default
186
hosts/default/configuration.nix
Normal file
186
hosts/default/configuration.nix
Normal file
|
@ -0,0 +1,186 @@
|
|||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Get nicer hostname
|
||||
networking.hostName = "nixos"; # Define your hostname.
|
||||
|
||||
# Enable flakes
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
# Setup gpu
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
# Allow for nvidia
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.nvidia.open = true; # Set to false for proprietary drivers
|
||||
hardware.nvidia.modesetting.enable = true;
|
||||
hardware.nvidia.powerManagement.enable = true;
|
||||
hardware.nvidia.nvidiaSettings = true;
|
||||
hardware.nvidia.prime = {
|
||||
offload = {
|
||||
enableOffloadCmd = true;
|
||||
enable = true;
|
||||
};
|
||||
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
amdgpuBusId = "PCI:5:0:0";
|
||||
};
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Zagreb";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "hr_HR.UTF-8";
|
||||
LC_IDENTIFICATION = "hr_HR.UTF-8";
|
||||
LC_MEASUREMENT = "hr_HR.UTF-8";
|
||||
LC_MONETARY = "hr_HR.UTF-8";
|
||||
LC_NAME = "hr_HR.UTF-8";
|
||||
LC_NUMERIC = "hr_HR.UTF-8";
|
||||
LC_PAPER = "hr_HR.UTF-8";
|
||||
LC_TELEPHONE = "hr_HR.UTF-8";
|
||||
LC_TIME = "hr_HR.UTF-8";
|
||||
};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable the KDE Plasma Desktop Environment.
|
||||
services.displayManager.sddm.enable = true;
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
environment.plasma6.excludePackages = with pkgs.kdePackages; [
|
||||
plasma-browser-integration
|
||||
konsole
|
||||
oxygen
|
||||
];
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
options = "caps:escape";
|
||||
};
|
||||
|
||||
# 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;
|
||||
};
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.crony = {
|
||||
isNormalUser = true;
|
||||
description = "Crony";
|
||||
extraGroups = [ "networkmanager" "wheel" "video" "input" "audio" "libvirtd" ];
|
||||
};
|
||||
|
||||
# Setup home manager
|
||||
home-manager = {
|
||||
extraSpecialArgs = {inherit inputs; };
|
||||
backupFileExtension = "backup";
|
||||
users = {
|
||||
crony = import ./home.nix;
|
||||
};
|
||||
};
|
||||
|
||||
# Disable hibernation, sleep and other friends
|
||||
systemd.targets = {
|
||||
sleep = {
|
||||
enable = false;
|
||||
unitConfig.DefaultDependencies = "no";
|
||||
};
|
||||
suspend = {
|
||||
enable = false;
|
||||
unitConfig.DefaultDependencies = "no";
|
||||
};
|
||||
hibernate = {
|
||||
enable = false;
|
||||
unitConfig.DefaultDependencies = "no";
|
||||
};
|
||||
"hybrid-sleep" = {
|
||||
enable = false;
|
||||
unitConfig.DefaultDependencies = "no";
|
||||
};
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
mangohud
|
||||
];
|
||||
|
||||
# Getting gaming setup
|
||||
programs.steam.enable = true;
|
||||
programs.steam.gamescopeSession.enable = true;
|
||||
programs.gamemode.enable = true;
|
||||
|
||||
# Enable sytling using stylix
|
||||
stylix.enable = true;
|
||||
stylix.autoEnable=true;
|
||||
stylix.image = ./wallpaper.png;
|
||||
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.yaml";
|
||||
|
||||
# Change Cursor
|
||||
stylix.cursor.package = pkgs.bibata-cursors;
|
||||
stylix.cursor.name = "Bibata-Modern-Ice";
|
||||
|
||||
# Change u those fonts
|
||||
stylix.fonts = {
|
||||
serif = {
|
||||
package = pkgs.dejavu_fonts;
|
||||
name = "DejaVu Serif";
|
||||
};
|
||||
|
||||
sansSerif = {
|
||||
package = pkgs.dejavu_fonts;
|
||||
name = "DejaVu Sans";
|
||||
};
|
||||
|
||||
monospace = {
|
||||
package = pkgs.nerd-fonts.caskaydia-cove;
|
||||
name = "CaskaydiaCove Nerd Font";
|
||||
};
|
||||
|
||||
emoji = {
|
||||
package = pkgs.noto-fonts-emoji;
|
||||
name = "Noto Color Emoji";
|
||||
};
|
||||
};
|
||||
|
||||
# Change terminal font size
|
||||
stylix.fonts.sizes.terminal = 15;
|
||||
|
||||
# Change chrome settings
|
||||
stylix.targets.chromium.enable = true;
|
||||
|
||||
# Enable zram swap device
|
||||
zramSwap.enable = true;
|
||||
|
||||
# DO NOT CHANGE
|
||||
system.stateVersion = "24.11"; # Did you read the comment?
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue