add hetzner and disko config
Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
22
systems/hetzner-bridge/configuration.nix
Normal file
22
systems/hetzner-bridge/configuration.nix
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../disko/hetzner.nix
|
||||
./networking.nix
|
||||
];
|
||||
disko.devices.disk.main.device = "scsi-0QEMU_QEMU_HARDDISK_55513992";
|
||||
|
||||
boot = {
|
||||
useSystemdBoot = true;
|
||||
};
|
||||
|
||||
hardware.enableAllFirmware = true;
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
}
|
8
systems/hetzner-bridge/default.nix
Normal file
8
systems/hetzner-bridge/default.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
users = [ "alice" ];
|
||||
modules = [
|
||||
# inputs.attic.nixosModules.atticd
|
||||
inputs.disko.nixosModules.disko
|
||||
];
|
||||
}
|
39
systems/hetzner-bridge/hardware-configuration.nix
Normal file
39
systems/hetzner-bridge/hardware-configuration.nix
Normal file
@ -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 + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot = {
|
||||
availableKernelModules = [
|
||||
"ahci"
|
||||
"xhci_pci"
|
||||
"virtio_pci"
|
||||
"virtio_scsi"
|
||||
"sd_mod"
|
||||
"sr_mod"
|
||||
];
|
||||
initrd.kernelModules = [ ];
|
||||
kernelModules = [ ];
|
||||
extraModulePackages = [ ];
|
||||
};
|
||||
|
||||
# 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";
|
||||
}
|
14
systems/hetzner-bridge/networking.nix
Normal file
14
systems/hetzner-bridge/networking.nix
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
systemd.network.enable = true;
|
||||
systemd.network.networks."10-wan" = {
|
||||
matchConfig.Name = "enp1s0"; # either ens3 or enp1s0 depending on system, check 'ip addr'
|
||||
networkConfig.DHCP = "ipv4";
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user