add apollo

This commit is contained in:
nyxerinys 2026-10-01 00:37:12 -05:00
parent d215a57a8e
commit 28b7f5550a
6 changed files with 125 additions and 23 deletions

55
hosts/apollo/boot.nix Normal file
View file

@ -0,0 +1,55 @@
{ pkgs, lib, inputs, ... }:
{
boot.initrd = {
supportedFilesystems = [ "ext4" "zfs" ];
systemd.enable = true;
luks.fido2Support = false;
luks.devices."zfs-keys" = {
device = "/dev/disk/by-id/nvme-CT1000P2SSD8_2138E5D5DA5A-part2";
crypttabExtraOpts = [ "fido2-device=auto" ];
};
fileSystems."/keys" = {
device = "/dev/mapper/zfs-keys";
fsType = "ext4";
neededForBoot = true;
};
systemd.services."zfs-import-nix-root" = {
wants = [ "keys.mount" ];
after = [ "keys.mount" ];
};
};
boot.zfs.forceImportRoot = false;
fileSystems."/" = {
device = "nix-root/root";
fsType = "zfs";
};
fileSystems."/var/log" = {
device = "nix-root/syslog";
fsType = "zfs";
};
fileSystems."/nix" = {
device = "nix-root/nix";
fsType = "zfs";
};
fileSystems."/home/nyxerinys" = {
device = "nix-main/nyxerinys";
fsType = "zfs";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/A5CB-B201";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [ { device = "/dev/disk/by-id/nvme-CT1000P2SSD8_2138E5D5DA5A-part3"; } ];
}

12
hosts/apollo/default.nix Normal file
View file

@ -0,0 +1,12 @@
{ pkgs, lib, inputs, ... }:
{
imports = [
./boot.nix
./hardware.nix
];
networking.hostName = "apollo";
networking.hostId = "40ced703";
networking.networkmanager.insertNameservers = [ "10.5.0.1" "1.1.1.1" ];
}

34
hosts/apollo/hardware.nix Normal file
View file

@ -0,0 +1,34 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#
# Most users should NEVER change this value after the initial install, for any reason,
# even if you've upgraded your system to a new NixOS release.
#
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
# to actually do that.
#
# This value being lower than the current NixOS release does NOT mean your system is
# out of date, out of support, or vulnerable.
#
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
# and migrated your data accordingly.
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "26.05"; # Did you read the comment?
}

View file

@ -91,6 +91,6 @@
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "25.11"; # Did you read the comment?
system.stateVersion = lib.mkDefault "25.11"; # Did you read the comment?
}