From f45f8973d44ff344a552f586a38d9a6c3dfb4ba4 Mon Sep 17 00:00:00 2001 From: Lzebulon Date: Mon, 26 Jan 2026 20:02:39 +0100 Subject: [PATCH] cette fois ce sera la bonne ? --- flake.nix | 5 ++ hosts/physiques/cephiroth/default.nix | 49 ++++++++++++++ .../cephiroth/hardware-configuration.nix | 66 +++++++++++++++++++ 3 files changed, 120 insertions(+) create mode 100644 hosts/physiques/cephiroth/default.nix create mode 100644 hosts/physiques/cephiroth/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index d841f39..820c1c9 100644 --- a/flake.nix +++ b/flake.nix @@ -44,6 +44,11 @@ specialArgs = inputs; modules = [ ./hosts/vm/apprentix ] ++ baseModules; }; + + cephiroth = nixosSystem { + specialArgs = inputs; + modules = [ ./hosts/physiques/cephiroth ] ++ baseModules; + }; jitsi = nixosSystem { specialArgs = inputs; diff --git a/hosts/physiques/cephiroth/default.nix b/hosts/physiques/cephiroth/default.nix new file mode 100644 index 0000000..e660681 --- /dev/null +++ b/hosts/physiques/cephiroth/default.nix @@ -0,0 +1,49 @@ +{ pkgs, ... }: + +{ + imports = [ + ./hardware-configuration.nix + ]; + + networking.hostId = "121cdcb4"; + 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"; + } + ]; + + + crans = { + enable = true; + + networking = { + id = 3; + adm = { + enable = true; + interface = "bond0"; + }; + srvNat = { + enable = true; + interface = "bond0"; + }; + }; + resticClient.enable = false; + }; + + + networking = { + bonds.bond0 = { + interfaces = [ "enp11s0f0" "enp11s0f1" ]; + driverOptions.mode = "802.3ad"; + }; + }; + + 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..c04f8b9 --- /dev/null +++ b/hosts/physiques/cephiroth/hardware-configuration.nix @@ -0,0 +1,66 @@ +# 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 = [ + "ehci_pci" + "ata_piix" + "uhci_hcd" + "hpsa" + "usbhid" + "usb_storage" + "sd_mod" + "sr_mod" + ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/backups" = { + device = "backups"; + fsType = "zfs"; + }; + + fileSystems."/" = { + device = "head"; + fsType = "zfs"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/8E4A-8E9F"; + 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.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.enp4s0f0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp4s0f1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}