diff --git a/hosts/SpaceCruiser/configuration.nix b/hosts/SpaceCruiser/configuration.nix new file mode 100644 index 00000000..c556fe2d --- /dev/null +++ b/hosts/SpaceCruiser/configuration.nix @@ -0,0 +1,48 @@ +{ config, pkgs, ... }: + +{ + imports = [ + # Hardware udev rules + ./hardware-configuration.nix + + # core dotfiles + graphical things + ../../home + ../../home/hx + ../../home/hx/gui.nix + ../../home/hx/cli.nix + ../../home/hx/i3 + + # Common + ../../common/intelcpu.nix + ../../common/fingerprint.nix + ../../common/laptop.nix + ../../common/intelgpu.nix + ../../common/docker.nix + ../../common/fonts.nix + ../../common/networkmanager.nix + ../../common/pipewire.nix + ../../common/networking-extra.nix + ../../common/security.nix + ../../common/nix-pkg-allow.nix + ../../common/fwupd.nix + ../../common/zsh.nix + ../../common/ssh-client.nix + ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + systemd.services.NetworkManager-wait-online.enable = false; # to avoid iface or vbox waiting for connection. + networking.hostName = "SpaceCruiser"; + networking.useDHCP = false; + networking.interfaces.enp5s0.useDHCP = true; + networking.interfaces.wlp6s0.useDHCP = false; + + i18n.defaultLocale = "en_GB.UTF-8"; + console = { keyMap = "no"; }; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + time.timeZone = "Europe/Oslo"; + home-manager.users.hx.home.stateVersion = "24.05"; + system.stateVersion = "24.05"; + } diff --git a/hosts/SpaceCruiser/hardware-configuration.nix b/hosts/SpaceCruiser/hardware-configuration.nix new file mode 100644 index 00000000..3f6984f2 --- /dev/null +++ b/hosts/SpaceCruiser/hardware-configuration.nix @@ -0,0 +1,30 @@ +# 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" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ "amdgpu" ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + boot.kernelParams = [ ]; + + fileSystems."/" = { + device = "/dev/disk/by-label/nixos"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-label/boot"; + fsType = "vfat"; + }; + + swapDevices = [{ device = "/dev/disk/by-label/swap"; }]; + # nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + nixpkgs.hostPlatform = "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}