diff --git a/flake.nix b/flake.nix index b05c87a..f5d4a82 100644 --- a/flake.nix +++ b/flake.nix @@ -42,10 +42,15 @@ modules = [ ./hosts/vm/apprentix ] ++ baseModules; }; - jitsi = nixosSystem { - specialArgs = inputs; - modules = [ ./hosts/vm/jitsi ] ++ baseModules; - }; + cephiroth = nixosSystem { + specialArgs = inputs; + modules = [ ./hosts/physiques/cephiroth ]; + }; + + jitsi = nixosSystem { + specialArgs = inputs; + modules = [ ./hosts/vm/jitsi ]; + }; livre = nixosSystem { specialArgs = inputs; diff --git a/hosts/physiques/cephiroth/default.nix b/hosts/physiques/cephiroth/default.nix new file mode 100644 index 0000000..0dd572d --- /dev/null +++ b/hosts/physiques/cephiroth/default.nix @@ -0,0 +1,26 @@ +{ pkgs, ... }: + +{ + imports = [ + ./hardware-configuration.nix + ./networking.nix + + ../../../modules + ]; + + networking.hostId = "bbdd1133"; + networking.hostName = "cephiroth"; + + boot.loader.grub.enable = true; + boot.loader.grub.efiSupport = true; + boot.loader.grub.device = "nodev"; + + boot.loader.grub.mirroredBoots = [ + { + devices = [ "nodev" ]; + path = "/boot-fallback"; + } + ]; + + system.stateVersion = "24.05"; +} diff --git a/hosts/physiques/cephiroth/hardware-configuration.nix b/hosts/physiques/cephiroth/hardware-configuration.nix new file mode 100644 index 0000000..84c49b8 --- /dev/null +++ b/hosts/physiques/cephiroth/hardware-configuration.nix @@ -0,0 +1,57 @@ +# 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 = [ "xhci_pci" "ehci_pci" "uhci_hcd" "hpsa" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "head/root"; + fsType = "zfs"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/C900-92D1"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + fileSystems."/boot-fallback" = + { device = "/dev/disk/by-uuid/C931-84A4"; + 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.bond0.useDHCP = lib.mkDefault true; + # networking.interfaces.bond0.10.useDHCP = lib.mkDefault true; + # networking.interfaces.bond0.3.useDHCP = lib.mkDefault true; + # networking.interfaces.bonding_masters.useDHCP = lib.mkDefault true; + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.eno2.useDHCP = lib.mkDefault true; + # networking.interfaces.eno3.useDHCP = lib.mkDefault true; + # networking.interfaces.eno4.useDHCP = lib.mkDefault true; + # networking.interfaces.eno49.useDHCP = lib.mkDefault true; + # networking.interfaces.eno50.useDHCP = lib.mkDefault true; + # networking.interfaces.eno51.useDHCP = lib.mkDefault true; + # networking.interfaces.eno52.useDHCP = lib.mkDefault true; + # networking.interfaces.enp11s0f0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp11s0f1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/physiques/cephiroth/networking.nix b/hosts/physiques/cephiroth/networking.nix new file mode 100644 index 0000000..834b249 --- /dev/null +++ b/hosts/physiques/cephiroth/networking.nix @@ -0,0 +1,49 @@ +{ ... }: + +{ + networking = { + + dhcpcd.enable = false; + + vlans = { + vlan3 = { + id = 3; + interface = "bond0"; + }; + vlan10 = { + id = 10; + interface = "bond0"; + }; + }; + + bonds.bond0 = { + interfaces = [ "enp11s0f0" "enp11s0f1" ]; + mode = "802.3ad"; + }; + + interfaces = { + vlan3 = { + ipv4 = { + addresses = [ + { + address = "172.16.3.3"; + prefixLength = 24; + } + ]; + }; + }; + vlan10 = { + ipv4 = { + addresses = [ + { + address = "172.16.10.3"; + prefixLength = 24; + } + ]; + }; + }; + }; + defaultGateway = "172.16.3.99"; + nameservers = [ "172.16.10.128" ]; + }; +}