diff --git a/README.org b/README.org index 8b46e8d..75f13c7 100644 --- a/README.org +++ b/README.org @@ -79,5 +79,7 @@ Syncing disks. 4. Create the host nix configuration If the host is not present under system/hosts, create a new folder for the host. +Generate the hardware configuration file, you can use nixos-generate-config as a base: +> nixos-generate-config --dir <> --no-filesystems diff --git a/system/hosts/reykjavik/default.nix b/system/hosts/reykjavik/default.nix new file mode 100644 index 0000000..d7cd286 --- /dev/null +++ b/system/hosts/reykjavik/default.nix @@ -0,0 +1,28 @@ +{ config, pkgs, lib, ... }: + +{ + imports = [ + ./hardware.nix + ]; + + # - Basic -------------------------------------- + + networking.hostName = "reykjavik"; + + samfelag.modules.user = { + name = "marc"; + }; + + # - Bootloader --------------------------------- + + boot.loader.grub.enable = true; + boot.loader.grub.device = "/dev/nvme0n1"; + boot.loader.grub.useOSProber = true; + + # - Services ----------------------------------- + + samfelag.profiles.desktop.enable = true; + + system.stateVersion = "22.05"; + +} diff --git a/system/hosts/reykjavik/hardware.nix b/system/hosts/reykjavik/hardware.nix new file mode 100644 index 0000000..b93f561 --- /dev/null +++ b/system/hosts/reykjavik/hardware.nix @@ -0,0 +1,41 @@ +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + + boot = { + initrd = { + availableKernelModules = [ "xhci_pci" "thunderbolt" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ]; + kernelModules = [ ]; + }; + kernelModules = [ "kvm-intel" ]; + extraModulePackages = [ ]; + }; + + fileSystems = { + "/" = { + device = "/dev/disk/by-label/nixos"; + fsType = "ext4"; + }; + + "/boot" = { + device = "/dev/disk/by-label/BOOT"; + fsType = "vfat"; + }; + }; + + swapDevices = [ + { device = "/dev/disk/by-label/swap"; } + ]; + + networking = { + useDHCP = lib.mkDefault true; + interfaces = { + enp92s0.useDHCP = lib.mkDefault true; + wlp0s20f3.useDHCP = lib.mkDefault true; + }; + }; + + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/system/hosts/reykjavik/readme.org b/system/hosts/reykjavik/readme.org new file mode 100644 index 0000000..0cf6a67 --- /dev/null +++ b/system/hosts/reykjavik/readme.org @@ -0,0 +1,2 @@ +* Reykjavik +Portàtil Lenovo Legion 5 15ITH6H