From de67011773f73706ea27402d5cf657b76daa870e Mon Sep 17 00:00:00 2001 From: Nettika Date: Mon, 10 Jun 2024 00:51:58 -0700 Subject: [PATCH] Initial commit --- configuration.nix | 77 ++++++++++++++++++++++++++++++++++++++ hardware-configuration.nix | 39 +++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 configuration.nix create mode 100644 hardware-configuration.nix diff --git a/configuration.nix b/configuration.nix new file mode 100644 index 0000000..f291172 --- /dev/null +++ b/configuration.nix @@ -0,0 +1,77 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + + ./hardware-configuration.nix + ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking = { + hostName = "marauder"; + networkmanager.enable = true; + }; + + time.timeZone = "America/Los_Angeles"; + + i18n.defaultLocale = "en_US.UTF-8"; + + users.users = { + nettika = { + isNormalUser = true; + extraGroups = [ "wheel" "networkmanager" ]; + }; + }; + + nixpkgs.config.allowUnfree = true; + + environment.systemPackages = with pkgs; [ + nano + git + lshw + firefox + vscode + ]; + + hardware.opengl = { + enable = true; + driSupport32Bit = true; + }; + + #hardware.nvidia = { + # modesetting.enable = true; + # prime = { + # sync.enable = true; + # nvidiaBusId = "PCI:01:00:0"; + # amdgpuBusId = "PCI:05:00:0"; + # }; + #}; + + services.xserver = { + enable = true; + #videoDrivers = ["nvidia" "amdgpu"]; + desktopManager = { + cinnamon.enable = true; + xterm.enable = false; + }; + }; + + services.displayManager.defaultSession = "cinnamon"; + + programs.steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + }; + + programs.nano = { + nanorc = '' + set autoindent + set linenumbers + ''; + }; + + system.stateVersion = "24.05"; +} diff --git a/hardware-configuration.nix b/hardware-configuration.nix new file mode 100644 index 0000000..d0d0233 --- /dev/null +++ b/hardware-configuration.nix @@ -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" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/648c6539-892c-40d7-8b07-23fe760df02a"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/1D62-C30E"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp2s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}