From 1a9675b988ff93fd9324c66542f0e5a1afd9cd32 Mon Sep 17 00:00:00 2001 From: Shahab Dogar Date: Sat, 16 Nov 2024 15:24:58 +0500 Subject: [PATCH] fix: move over to new laptop + add minecraft --- .gitignore | 1 - home-manager/home.nix | 1 + nixos/configuration.nix | 23 ++++++++--------- nixos/hardware-configuration.nix | 44 ++++++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 13 deletions(-) create mode 100644 nixos/hardware-configuration.nix diff --git a/.gitignore b/.gitignore index 1093752..e69de29 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +0,0 @@ -nixos/hardware-configuration.nix diff --git a/home-manager/home.nix b/home-manager/home.nix index 635dd96..a27d99b 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -75,6 +75,7 @@ in zoxide xcp unzip + prismlauncher (nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) ]; diff --git a/nixos/configuration.nix b/nixos/configuration.nix index e9ee760..b607644 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -11,9 +11,8 @@ ]; # Bootloader. - boot.loader.grub.enable = true; - boot.loader.grub.device = "/dev/sda"; - boot.loader.grub.useOSProber = true; + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; networking.hostName = "rihla"; # Define your hostname. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. @@ -32,15 +31,15 @@ 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"; + LC_ADDRESS = "ur_PK"; + LC_IDENTIFICATION = "ur_PK"; + LC_MEASUREMENT = "ur_PK"; + LC_MONETARY = "ur_PK"; + LC_NAME = "ur_PK"; + LC_NUMERIC = "ur_PK"; + LC_PAPER = "ur_PK"; + LC_TELEPHONE = "ur_PK"; + LC_TIME = "ur_PK"; }; # Enable flakes diff --git a/nixos/hardware-configuration.nix b/nixos/hardware-configuration.nix new file mode 100644 index 0000000..f4e319e --- /dev/null +++ b/nixos/hardware-configuration.nix @@ -0,0 +1,44 @@ +# 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 = [ "xhci_pci" "ahci" "ohci_pci" "ehci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/732a25fa-7498-4e9a-8b5a-6a1dabc9edb4"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."luks-d46e7453-8b08-4865-9bfe-51230af5eef0".device = "/dev/disk/by-uuid/d46e7453-8b08-4865-9bfe-51230af5eef0"; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/9CC6-6F83"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/24c8f921-3929-4f70-a4d4-7a25256c33cc"; } + ]; + + # 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.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s16f0u2.useDHCP = lib.mkDefault true; + # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}