diff --git a/flake.nix b/flake.nix index df59522..42eca1c 100644 --- a/flake.nix +++ b/flake.nix @@ -28,14 +28,16 @@ in { # slim3 - system hostname - nixosConfigurations.${hostname} = nixpkgs.lib.nixosSystem { - specialArgs = { - inherit inputs system stateVersion hostname user; - }; + nixosConfigurations = { + ${hostname} = nixpkgs.lib.nixosSystem { + specialArgs = { + inherit inputs system stateVersion hostname user; + }; - modules = [ - ./nixos/configuration.nix - ]; + modules = [ + ./hosts/${hostname}/configuration.nix + ]; + }; }; homeConfigurations.${user} = home-manager.lib.homeManagerConfiguration { diff --git a/hosts/slim3/configuration.nix b/hosts/slim3/configuration.nix new file mode 100644 index 0000000..4c34ada --- /dev/null +++ b/hosts/slim3/configuration.nix @@ -0,0 +1,15 @@ +{ stateVersion, hostname, ... }: + +{ + imports = + [ + ./hardware-configuration.nix + ../../nixos/packages.nix + ../../nixos/modules + ]; + + networking.hostName = hostname; + + system.stateVersion = stateVersion; +} + diff --git a/hosts/slim3/hardware-configuration.nix b/hosts/slim3/hardware-configuration.nix new file mode 100644 index 0000000..567a1b2 --- /dev/null +++ b/hosts/slim3/hardware-configuration.nix @@ -0,0 +1,39 @@ +# 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" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/69019f25-749c-4480-bbfc-72eef4c49313"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/12CE-A600"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + 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.enp4s0f4u2.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}