config | get w1 working

This commit is contained in:
Don Harper 2024-10-09 22:42:07 -05:00
parent 8633aab463
commit 3a719d390f
5 changed files with 108 additions and 17 deletions

View file

@ -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";
};
};
};
}

View file

@ -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;
};

View file

@ -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;
};
};
};
}

39
hosts/w1/disko.nix Normal file
View file

@ -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 = "/";
};
}
];
};
};
};
};
}

View file

@ -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.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}