commit 6b5ce95f0a0406059a4cce9c9634ddbc9c37651b Author: David Lick Date: Tue Aug 8 22:32:39 2023 -0400 Base configuration diff --git a/configuration.nix b/configuration.nix new file mode 100644 index 0000000..f01847d --- /dev/null +++ b/configuration.nix @@ -0,0 +1,96 @@ +{ config, pkgs, ... }: + +{ + imports = + [ + ./hardware-configuration.nix + ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + boot.initrd.secrets = { + "/crypto_keyfile.bin" = null; + }; + + boot.initrd.luks.devices."luks-3d0f669d-7bb4-49e4-abe2-03872cc1d507".keyFile = "/crypto_keyfile.bin"; + networking.hostName = "desktop"; + networking.networkmanager.enable = true; + + time.timeZone = "America/New_York"; + + i18n.defaultLocale = "en_US.UTF-8"; + i18n.extraLocaleSettings = { + LC_ADDRESS = "en_US.UTF-8"; + LC_IDENTIFICATION = "en_US.UTF-8"; + LC_MEASUREMENT = "en_US.UTF-8"; + LC_MONETARY = "en_US.UTF-8"; + LC_NAME = "en_US.UTF-8"; + LC_NUMERIC = "en_US.UTF-8"; + LC_PAPER = "en_US.UTF-8"; + LC_TELEPHONE = "en_US.UTF-8"; + LC_TIME = "en_US.UTF-8"; + }; + + services.xserver.enable = true; + services.xserver.displayManager.gdm.enable = true; + services.xserver.desktopManager.gnome.enable = true; + + services.xserver = { + layout = "us"; + xkbVariant = ""; + }; + + services.printing.enable = true; + + sound.enable = true; + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + + users.users.david = { + isNormalUser = true; + description = "David"; + extraGroups = [ "networkmanager" "wheel" ]; + packages = with pkgs; [ + firefox + thunderbird + sparrow + freecad + ]; + }; + + nixpkgs.config.allowUnfree = true; + + environment.systemPackages = with pkgs; [ + vim + wget + git + gnome.gnome-tweaks + gnomeExtensions.appindicator + ]; + + environment.udev.packages = with pkgs; [ + gnome.gnome-settings-daemon + ]; + + environment.gnome.excludePackages = (with pkgs; [ + gnome-tour + ]) ++ (with pkgs.gnome; [ + cheese + gnome-music + epiphany + geary + tali + iagno + hitori + atomix + ]); + + system.stateVersion = "23.05"; +} diff --git a/hardware-configuration.nix b/hardware-configuration.nix new file mode 100644 index 0000000..e0dbc7f --- /dev/null +++ b/hardware-configuration.nix @@ -0,0 +1,47 @@ +# 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" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/f6edfa5b-399b-45d2-bc71-8f91ce6b78cf"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."luks-345b2b05-ff46-438a-bc0e-033afd29b7d5".device = "/dev/disk/by-uuid/345b2b05-ff46-438a-bc0e-033afd29b7d5"; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/1DDD-79E1"; + fsType = "vfat"; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/1ecc48d0-d935-4170-9708-784f5745cbea"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."luks-3d0f669d-7bb4-49e4-abe2-03872cc1d507".device = "/dev/disk/by-uuid/3d0f669d-7bb4-49e4-abe2-03872cc1d507"; + + 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.enp6s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}