Basic configuration.
This commit is contained in:
commit
2dca39131a
6 changed files with 732 additions and 0 deletions
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?
|
||||
}
|
39
hosts/default/hardware-configuration.nix
Normal file
39
hosts/default/hardware-configuration.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/0fbf752d-9234-42bd-9e04-8246de85e8d6";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/3156-31B6";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp3s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
79
hosts/default/home.nix
Normal file
79
hosts/default/home.nix
Normal file
|
@ -0,0 +1,79 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Some info
|
||||
home.username = "crony";
|
||||
home.homeDirectory = "/home/crony";
|
||||
|
||||
# PACKAGES
|
||||
home.packages = with pkgs; [
|
||||
librewolf
|
||||
thunderbird
|
||||
qbittorrent
|
||||
];
|
||||
|
||||
# Enable programs to get their themes
|
||||
programs.foot.enable = true;
|
||||
programs.mangohud = {
|
||||
enable = true;
|
||||
settings = {
|
||||
fps_limit = "0,30,60,120,144";
|
||||
gpu_stats = true;
|
||||
gpu_temp = true;
|
||||
gpu_core_clock = true;
|
||||
gpu_power = true;
|
||||
gpu_text = "GPU";
|
||||
gpu_load_change = true;
|
||||
|
||||
cpu_stats = true;
|
||||
cpu_temps = true;
|
||||
cpu_text = "CPU";
|
||||
cpu_mhz = true;
|
||||
cpu_load_change = true;
|
||||
|
||||
vram = true;
|
||||
ram = true;
|
||||
|
||||
fps = true;
|
||||
fps_sampling_period = "1000";
|
||||
fps_color_change = true;
|
||||
gpu_name = true;
|
||||
vulka_driver = true;
|
||||
round_corder = "10";
|
||||
offset_x = "10";
|
||||
offset_y = "10";
|
||||
|
||||
width = "250";
|
||||
};
|
||||
};
|
||||
|
||||
programs.neovim.enable = true;
|
||||
|
||||
# Enable theming chromium + use ungoogled chromium package
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
package = pkgs.ungoogled-chromium;
|
||||
};
|
||||
|
||||
# Enable git
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Crony Akatsuki";
|
||||
userEmail = "crony@cronyakatsuki.xyz";
|
||||
};
|
||||
|
||||
# Default environmental variables
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
# Fix gtkrc-2.0 collision
|
||||
home.file."/home/crony/.gtkrc-2.0".force = true;
|
||||
|
||||
# DO NOT CHANGE ALSO
|
||||
home.stateVersion = "24.11"; # Please read the comment before changing.
|
||||
}
|
||||
|
BIN
hosts/default/wallpaper.png
Normal file
BIN
hosts/default/wallpaper.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.4 MiB |
Loading…
Add table
Add a link
Reference in a new issue