mirror of
https://github.com/srid/nixos-config.git
synced 2025-12-26 15:04:59 +08:00
102 lines
3.1 KiB
Nix
102 lines
3.1 KiB
Nix
{ config, pkgs, lib, modulesPath, ... }:
|
||
|
||
{
|
||
imports =
|
||
[
|
||
(modulesPath + "/installer/scan/not-detected.nix")
|
||
];
|
||
|
||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||
boot.initrd.kernelModules = [ ];
|
||
boot.kernelModules = [ "kvm-intel" ];
|
||
boot.extraModulePackages = [ ];
|
||
|
||
fileSystems."/" =
|
||
{
|
||
device = "/dev/disk/by-uuid/4200ca92-3b3c-4a41-98d5-92bbc0a5597e";
|
||
fsType = "ext4";
|
||
};
|
||
fileSystems."/boot" =
|
||
{
|
||
device = "/dev/disk/by-uuid/7C8B-3F49";
|
||
fsType = "vfat";
|
||
};
|
||
swapDevices =
|
||
[{ device = "/dev/disk/by-uuid/b03a08aa-1c9c-4674-b03b-ec59003306f5"; }];
|
||
|
||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||
# high-resolution display
|
||
hardware.video.hidpi.enable = lib.mkDefault true;
|
||
|
||
|
||
# Use the systemd-boot EFI boot loader.
|
||
boot.loader.systemd-boot.enable = true;
|
||
boot.loader.efi.canTouchEfiVariables = true;
|
||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||
|
||
nixpkgs.config.allowUnfree = true;
|
||
nix = {
|
||
package = pkgs.nixFlakes;
|
||
extraOptions = ''
|
||
experimental-features = nix-command flakes
|
||
'';
|
||
};
|
||
|
||
networking.hostName = "p71"; # Define your hostname.
|
||
networking.networkmanager.enable = true;
|
||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||
|
||
# Set your time zone.
|
||
time.timeZone = "America/New_York";
|
||
|
||
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
||
# Per-interface useDHCP will be mandatory in the future, so this generated config
|
||
# replicates the default behaviour.
|
||
networking.useDHCP = false;
|
||
networking.interfaces.enp0s31f6.useDHCP = true;
|
||
networking.interfaces.wlp4s0.useDHCP = true;
|
||
|
||
# Enable the X11 windowing system.
|
||
services.xserver = {
|
||
enable = true;
|
||
videoDrivers = [ "nvidia" "intel" ];
|
||
};
|
||
|
||
# Enable the GNOME 3 Desktop Environment.
|
||
services.xserver.displayManager.gdm.enable = true;
|
||
services.xserver.desktopManager.gnome3.enable = true;
|
||
services.openssh.enable = true;
|
||
services.ipfs.enable = true;
|
||
|
||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||
users.users.srid = {
|
||
isNormalUser = true;
|
||
extraGroups = [ "wheel" "networkmanager" ]; # Enable ‘sudo’ for the user.
|
||
};
|
||
|
||
# List packages installed in system profile. To search, run:
|
||
# $ nix search wget
|
||
environment.systemPackages = with pkgs; [
|
||
gnome3.gnome-tweaks
|
||
brave
|
||
vscode
|
||
obsidian
|
||
];
|
||
|
||
|
||
# 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 = "20.09"; # Did you read the comment?
|
||
|
||
}
|
||
|