diff --git a/flake.nix b/flake.nix index 4a16d06..59caa6d 100644 --- a/flake.nix +++ b/flake.nix @@ -61,7 +61,13 @@ profile = "cli"; extraModules = [ ]; }; - }; + x1g13 = mkSystem { + host = "x1g13"; + system = "x86_64-linux"; + profile = "laptop"; + extraModules = [ ]; + }; + }; devShells = { x86_64-linux = { @@ -69,4 +75,4 @@ }; }; }; -} \ No newline at end of file +} diff --git a/hosts/x1g13/default.nix b/hosts/x1g13/default.nix new file mode 100644 index 0000000..73221ad --- /dev/null +++ b/hosts/x1g13/default.nix @@ -0,0 +1,14 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ inputs, ... }: + +{ + imports = + [ + inputs.nixos-hardware.nixosModules.lenovo-thinkpad-x1-9th-gen + ./../../modules/drivers/intel-drivers.nix + ./hardware-configuration.nix + ]; +} diff --git a/hosts/x1g13/hardware-configuration.nix b/hosts/x1g13/hardware-configuration.nix new file mode 100644 index 0000000..44222de --- /dev/null +++ b/hosts/x1g13/hardware-configuration.nix @@ -0,0 +1,38 @@ +# 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" "thunderbolt" "nvme" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/29b4b68d-c25e-48b1-beb3-30f63ac2f491"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/EA69-77EE"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + 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.wlp0s20f3.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}