diff --git a/hosts/fred/default.nix b/hosts/fred/default.nix index fe56d75..6f4d961 100644 --- a/hosts/fred/default.nix +++ b/hosts/fred/default.nix @@ -17,5 +17,16 @@ # ../server/unifi.nix ]; networking.hostName = "fred"; - boot.binfmt.emulatedSystems = ["aarch64-linux"]; + boot = { + binfmt.emulatedSystems = ["aarch64-linux"]; + loader = { + systemd-boot = { + enable = true; + }; + efi = { + canTouchEfiVariables = true; + efiSysMountPoint = "/boot"; + }; + }; + }; } diff --git a/hosts/server/default.nix b/hosts/server/default.nix index c87dd57..a27c719 100644 --- a/hosts/server/default.nix +++ b/hosts/server/default.nix @@ -69,15 +69,15 @@ in { boot = { kernelPackages = pkgs.linuxPackages_latest; kernelParams = ["consoleblank=60"]; - loader = { - systemd-boot = { - enable = true; - }; - efi = { - canTouchEfiVariables = true; - efiSysMountPoint = "/boot"; - }; - }; + #loader = { + #systemd-boot = { + #enable = true; + #}; + #efi = { + #canTouchEfiVariables = true; + #efiSysMountPoint = "/boot"; + #}; + #}; plymouth = { enable = true; }; diff --git a/hosts/w1/default.nix b/hosts/w1/default.nix index 4b3bcb8..9a5f950 100644 --- a/hosts/w1/default.nix +++ b/hosts/w1/default.nix @@ -16,4 +16,17 @@ # ../server/searxng.nix ]; networking.hostName = "w1"; + boot = { + initrd = { + availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ]; + kernelModules = [ "nvme" ]; + }; + loader = { + grub = { + enable = true; + device = "/dev/sda"; + efiSupport = false; + }; + }; + }; } diff --git a/hosts/w1/disko.nix b/hosts/w1/disko.nix new file mode 100644 index 0000000..9e9fc1a --- /dev/null +++ b/hosts/w1/disko.nix @@ -0,0 +1,39 @@ +{ + disko.devices = { + disk = { + vdb = { + device = "/dev/sda"; + type = "disk"; + content = { + type = "table"; + format = "gpt"; + partitions = [ + { + name = "ESP"; + start = "1M"; + end = "500M"; + bootable = true; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + } + { + name = "root"; + start = "500M"; + end = "100%"; + part-type = "primary"; + bootable = true; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + } + ]; + }; + }; + }; + }; +} diff --git a/hosts/w1/hardware-configuration.nix b/hosts/w1/hardware-configuration.nix index b1aacee..70a38b0 100644 --- a/hosts/w1/hardware-configuration.nix +++ b/hosts/w1/hardware-configuration.nix @@ -1,9 +1,37 @@ -{ modulesPath, ... }: -{ - imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; - boot.loader.grub.device = "/dev/sda"; - boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ]; - boot.initrd.kernelModules = [ "nvme" ]; - fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; }; +# 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 + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ "dm-snapshot" ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/sda1"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/sda15"; + 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.enp1s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; }