-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
178 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
# 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’). | ||
{ inputs | ||
, outputs | ||
, lib | ||
, config | ||
, pkgs | ||
, ... | ||
}: { | ||
# You can import other NixOS modules here | ||
imports = [ | ||
# If you want to use modules your own flake exports (from modules/nixos): | ||
outputs.nixosModules.ssh | ||
outputs.nixosModules.zsh | ||
outputs.nixosModules.boot | ||
outputs.nixosModules.fonts | ||
outputs.nixosModules.sound | ||
outputs.nixosModules.nixpkgs | ||
outputs.nixosModules.users.sakhib | ||
outputs.nixosModules.desktop.gnome | ||
|
||
# Or modules from other flakes (such as nixos-hardware): | ||
# inputs.hardware.nixosModules.common-cpu-amd | ||
# inputs.hardware.nixosModules.common-ssd | ||
|
||
# You can also split up your configuration and import pieces of it here: | ||
# ./users.nix | ||
|
||
# Import your generated (nixos-generate-config) hardware configuration | ||
./hardware-configuration.nix | ||
|
||
# Home Manager NixOS Module | ||
inputs.home-manager.nixosModules.home-manager | ||
]; | ||
|
||
networking.hostName = "Portland"; # Define your hostname. | ||
# 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; | ||
|
||
# Enable bluetooth | ||
hardware.bluetooth = { | ||
enable = true; | ||
powerOnBoot = true; | ||
}; | ||
|
||
# Set your time zone. | ||
time.timeZone = "Asia/Tashkent"; | ||
|
||
# Select internationalisation properties. | ||
i18n.defaultLocale = "en_US.UTF-8"; | ||
|
||
# NVIDIA driver support | ||
services.xserver.videoDrivers = [ "nvidia" ]; | ||
|
||
# Enable CUPS to print documents. | ||
services.printing.enable = true; | ||
|
||
# Enable touchpad support (enabled default in most desktopManager). | ||
# services.xserver.libinput.enable = true; | ||
|
||
# Don't ask for password | ||
security.sudo.wheelNeedsPassword = false; | ||
|
||
# Enabling virtualization | ||
virtualisation.docker = { | ||
enable = true; | ||
enableOnBoot = true; | ||
}; | ||
|
||
# GPU for docker containers | ||
hardware.nvidia-container-toolkit.enable = true; | ||
|
||
# Some programs need SUID wrappers, can be configured further or are | ||
# started in user sessions. | ||
# programs.mtr.enable = true; | ||
programs.gnupg.agent = { | ||
enable = true; | ||
enableSSHSupport = true; | ||
}; | ||
|
||
# Open ports in the firewall. | ||
# networking.firewall.allowedTCPPorts = [ ... ]; | ||
# networking.firewall.allowedUDPPorts = [ ... ]; | ||
# Or disable the firewall altogether. | ||
networking.firewall.enable = false; | ||
|
||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion | ||
system.stateVersion = "24.05"; # Did you read the comment? | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# 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" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; | ||
boot.initrd.kernelModules = [ ]; | ||
boot.kernelModules = [ "kvm-amd" ]; | ||
boot.extraModulePackages = [ ]; | ||
|
||
boot.loader.grub.gfxmodeEfi = "3440x1440"; | ||
|
||
fileSystems."/" = | ||
{ | ||
device = "/dev/disk/by-uuid/375535ef-c926-4f7a-8896-e20646f74bf6"; | ||
fsType = "ext4"; | ||
}; | ||
|
||
fileSystems."/boot" = | ||
{ | ||
device = "/dev/disk/by-uuid/1BC4-4AD8"; | ||
fsType = "vfat"; | ||
options = [ "fmask=0077" "dmask=0077" ]; | ||
}; | ||
|
||
swapDevices = | ||
[{ device = "/dev/disk/by-uuid/b9732315-1d47-4d5f-9cd7-d7d4c3e7af63"; }]; | ||
|
||
|
||
# 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.eno1.useDHCP = lib.mkDefault true; | ||
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true; | ||
|
||
# List packages system hardware configuration | ||
hardware = { | ||
# CPU (AMD) | ||
cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; | ||
|
||
# GPU (Nvidia) | ||
nvidia = { | ||
# Required | ||
modesetting.enable = true; | ||
|
||
# Enable GPU power management, useful for laptops | ||
powerManagement.enable = true; | ||
|
||
# Turn off GPU when not used | ||
powerManagement.finegrained = false; | ||
|
||
# Open Source drivers | ||
open = false; | ||
|
||
# Settings application | ||
nvidiaSettings = true; | ||
|
||
# The shipping package | ||
package = config.boot.kernelPackages.nvidiaPackages.stable; | ||
}; | ||
}; | ||
|
||
# Select host type for the system | ||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; | ||
} |