···11+# Edit this configuration file to define what should be installed on
22+# your system. Help is available in the configuration.nix(5) man page
33+# and in the NixOS manual (accessible by running ‘nixos-help’).
44+55+{ config, pkgs, ... }:
66+77+{
88+ imports =
99+ [ # Include the results of the hardware scan.
1010+ ./hardware-configuration.nix
1111+ ];
1212+1313+ # Bootloader.
1414+ # boot.loader.systemd-boot.enable = true;
1515+ boot.loader.grub.enable = true;
1616+ boot.loader.grub.devices = [ "nodev" ];
1717+ boot.loader.grub.efiSupport = true;
1818+ # boot.loader.efi.canTouchEfiVariables = true;
1919+ boot.loader.efi.efiSysMountPoint = "/boot";
2020+ boot.loader.grub.efiInstallAsRemovable = true;
2121+ boot.loader.grub.extraEntries = ''
2222+2323+ menuentry "Windows" {
2424+ search --fs-uuid --no-floppy --set=root D6E4-28CA
2525+ chainloader (''${root})/EFI/Microsoft/Boot/bootmgfw.efi
2626+ }
2727+2828+ '';
2929+3030+ networking.hostName = "nixos"; # Define your hostname.
3131+ # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
3232+3333+ # Configure network proxy if necessary
3434+ # networking.proxy.default = "http://user:password@proxy:port/";
3535+ # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
3636+3737+ # Enable networking
3838+ networking.networkmanager.enable = true;
3939+4040+ # Set your time zone.
4141+ time.timeZone = "America/Toronto";
4242+4343+ # Select internationalisation properties.
4444+ i18n.defaultLocale = "en_CA.UTF-8";
4545+4646+ # Enable the X11 windowing system.
4747+ services.xserver.enable = true;
4848+4949+ # Enable the GNOME Desktop Environment.
5050+ services.xserver.displayManager.gdm.enable = true;
5151+ services.xserver.desktopManager.gnome.enable = true;
5252+5353+ # Configure keymap in X11
5454+ services.xserver = {
5555+ xkb.layout = "us";
5656+ xkb.variant = "";
5757+ };
5858+5959+ # Enable CUPS to print documents.
6060+ # services.printing.enable = true;
6161+6262+ # Enable sound with pipewire.
6363+ hardware.pulseaudio.enable = false;
6464+ security.rtkit.enable = true;
6565+ services.pipewire = {
6666+ enable = true;
6767+ alsa.enable = true;
6868+ alsa.support32Bit = true;
6969+ pulse.enable = true;
7070+ # If you want to use JACK applications, uncomment this
7171+ #jack.enable = true;
7272+7373+ # use the example session manager (no others are packaged yet so this is enabled by default,
7474+ # no need to redefine it in your config for now)
7575+ #media-session.enable = true;
7676+ };
7777+7878+ # Enable touchpad support (enabled default in most desktopManager).
7979+ # services.xserver.libinput.enable = true;
8080+8181+ # Define a user account. Don't forget to set a password with ‘passwd’.
8282+ users.users.mofin = {
8383+ isNormalUser = true;
8484+ description = "Cameron";
8585+ extraGroups = [ "networkmanager" "wheel" ];
8686+ packages = with pkgs; [
8787+ # thunderbird
8888+ ];
8989+ };
9090+9191+ # Enable automatic login for the user.
9292+ services.displayManager.autoLogin.enable = true;
9393+ services.displayManager.autoLogin.user = "mofin";
9494+9595+ # Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
9696+ systemd.services."getty@tty1".enable = false;
9797+ systemd.services."autovt@tty1".enable = false;
9898+9999+ # Install firefox.
100100+ programs.firefox.enable = true;
101101+102102+ # Allow unfree packages
103103+ nixpkgs.config.allowUnfree = true;
104104+105105+106106+ # List packages installed in system profile. To search, run:
107107+ # $ nix search wget
108108+ environment.systemPackages = with pkgs; [
109109+ vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
110110+ wget
111111+ vscode
112112+ git
113113+ networkmanager
114114+ git-credential-oauth
115115+ pass
116116+ haxe
117117+ neko
118118+ blackbox-terminal
119119+ nix-search-cli
120120+ spotify
121121+ lshw
122122+ ];
123123+124124+125125+ services.pcscd.enable = true;
126126+ programs.gnupg.agent = {
127127+ enable = true;
128128+ pinentryPackage = pkgs.pinentry-curses;
129129+ enableSSHSupport = true;
130130+ };
131131+132132+ # Graphics / GPU stuff
133133+ services.xserver.videoDrivers = ["nvidia"];
134134+135135+136136+ hardware.opengl = {
137137+ enable = true;
138138+ extraPackages = with pkgs; [ libva nvidia-vaapi-driver ];
139139+ driSupport = true;
140140+ };
141141+142142+ hardware.nvidia = {
143143+144144+ # Modesetting is required.
145145+ modesetting.enable = true;
146146+147147+ # Nvidia power management. Experimental, and can cause sleep/suspend to fail.
148148+ # Enable this if you have graphical corruption issues or application crashes after waking
149149+ # up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
150150+ # of just the bare essentials.
151151+ powerManagement.enable = true;
152152+153153+ # Fine-grained power management. Turns off GPU when not in use.
154154+ # Experimental and only works on modern Nvidia GPUs (Turing or newer).
155155+ powerManagement.finegrained = false;
156156+157157+ # Use the NVidia open source kernel module (not to be confused with the
158158+ # independent third-party "nouveau" open source driver).
159159+ # Support is limited to the Turing and later architectures. Full list of
160160+ # supported GPUs is at:
161161+ # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
162162+ # Only available from driver 515.43.04+
163163+ # Currently alpha-quality/buggy, so false is currently the recommended setting.
164164+ open = false;
165165+166166+ # Enable the Nvidia settings menu,
167167+ # accessible via `nvidia-settings`.
168168+ nvidiaSettings = true;
169169+170170+ # Optionally, you may need to select the appropriate driver version for your specific GPU.
171171+ package = config.boot.kernelPackages.nvidiaPackages.stable;
172172+ };
173173+174174+ time.hardwareClockInLocalTime = true;
175175+176176+177177+ console.font = "${pkgs.terminus_font}/share/consolefonts/ter-v32n.psf.gz";
178178+ console.earlySetup = true;
179179+180180+181181+ services.fstrim.enable = true;
182182+183183+ programs.steam = {
184184+ enable = true;
185185+ remotePlay.openFirewall = true;
186186+ dedicatedServer.openFirewall = true;
187187+ localNetworkGameTransfers.openFirewall = true;
188188+ };
189189+190190+ programs.git = {
191191+ enable = true;
192192+ package = pkgs.gitFull;
193193+ };
194194+195195+ # Some programs need SUID wrappers, can be configured further or are
196196+ # started in user sessions.
197197+ # programs.mtr.enable = true;
198198+ # programs.gnupg.agent = {
199199+ # enable = true;
200200+ # enableSSHSupport = true;
201201+ # };
202202+203203+ # List services that you want to enable:
204204+205205+ # Enable the OpenSSH daemon.
206206+ # services.openssh.enable = true;
207207+208208+ # Open ports in the firewall.
209209+ # networking.firewall.allowedTCPPorts = [ ... ];
210210+ # networking.firewall.allowedUDPPorts = [ ... ];
211211+ # Or disable the firewall altogether.
212212+ # networking.firewall.enable = false;
213213+214214+ # This value determines the NixOS release from which the default
215215+ # settings for stateful data, like file locations and database versions
216216+ # on your system were taken. It‘s perfectly fine and recommended to leave
217217+ # this value at the release version of the first install of this system.
218218+ # Before changing this value read the documentation for this option
219219+ # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
220220+ system.stateVersion = "24.05"; # Did you read the comment?
221221+222222+}
+39
hardware-configuration.nix
···11+# Do not modify this file! It was generated by ‘nixos-generate-config’
22+# and may be overwritten by future invocations. Please make changes
33+# to /etc/nixos/configuration.nix instead.
44+{ config, lib, pkgs, modulesPath, ... }:
55+66+{
77+ imports =
88+ [ (modulesPath + "/installer/scan/not-detected.nix")
99+ ];
1010+1111+ boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
1212+ boot.initrd.kernelModules = [ ];
1313+ boot.kernelModules = [ "kvm-amd" ];
1414+ boot.extraModulePackages = [ ];
1515+1616+ fileSystems."/" =
1717+ { device = "/dev/disk/by-uuid/3a30689d-9a7b-454a-9572-5e8df3b6a76c";
1818+ fsType = "ext4";
1919+ };
2020+2121+ fileSystems."/boot" =
2222+ { device = "/dev/disk/by-uuid/BB4C-094D";
2323+ fsType = "vfat";
2424+ options = [ "fmask=0022" "dmask=0022" ];
2525+ };
2626+2727+ swapDevices = [ ];
2828+2929+ # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
3030+ # (the default) this is the recommended approach. When using systemd-networkd it's
3131+ # still possible to use this option, but it's recommended to use it in conjunction
3232+ # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
3333+ networking.useDHCP = lib.mkDefault true;
3434+ # networking.interfaces.enp34s0.useDHCP = lib.mkDefault true;
3535+ # networking.interfaces.enp40s0.useDHCP = lib.mkDefault true;
3636+3737+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
3838+ hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
3939+}