summaryrefslogtreecommitdiff
path: root/odino
diff options
context:
space:
mode:
authorLeonardo <noreply@leoflo.me>2026-02-24 19:00:21 +0100
committerLeonardo <noreply@leoflo.me>2026-02-24 19:01:25 +0100
commit9a1a29cf68f62cc3ef1774424d7565e9ab7a3d80 (patch)
tree5634e56a6f1db6f318e894ecd6716fe49335ea33 /odino
parent4c5f2aa497fd015d4c4ff11a598e5203f80b60a9 (diff)
downloadnixos-9a1a29cf68f62cc3ef1774424d7565e9ab7a3d80.tar.gz
nixos-9a1a29cf68f62cc3ef1774424d7565e9ab7a3d80.zip
versione di hardware per odino
Diffstat (limited to 'odino')
-rw-r--r--odino/nixos/boot.nix8
-rw-r--r--odino/nixos/hardware-configuration.nix40
-rw-r--r--odino/nixos/hardware.nix23
-rw-r--r--odino/nixos/networking.nix3
4 files changed, 73 insertions, 1 deletions
diff --git a/odino/nixos/boot.nix b/odino/nixos/boot.nix
index 6b00a5a..52b2d3e 100644
--- a/odino/nixos/boot.nix
+++ b/odino/nixos/boot.nix
@@ -1,11 +1,19 @@
{pkgs, ...}: {
boot = {
kernelPackages = pkgs.linuxPackages_6_18; # NOTE: soltanto versioni LTS per il server
+ kernelModules = [ "kvm-intel" ];
kernelParams = [ "boot.shell_on_fail" ];
+ initrd = {
+ availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
+ kernelModules = [ ];
+ };
+
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
+
+ extraModulePackages = [ ];
};
}
diff --git a/odino/nixos/hardware-configuration.nix b/odino/nixos/hardware-configuration.nix
new file mode 100644
index 0000000..39fd4ba
--- /dev/null
+++ b/odino/nixos/hardware-configuration.nix
@@ -0,0 +1,40 @@
+# 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" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ "kvm-intel" ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" =
+ { device = "/dev/disk/by-uuid/31eed536-5936-4814-bb60-73fcc4fabdc5";
+ fsType = "ext4";
+ };
+
+ fileSystems."/boot" =
+ { device = "/dev/disk/by-uuid/1DD7-85F5";
+ fsType = "vfat";
+ options = [ "fmask=0077" "dmask=0077" ];
+ };
+
+ swapDevices =
+ [ { device = "/dev/disk/by-uuid/8478cb29-8a67-4842-b9ed-16a226506cb7"; }
+ ];
+
+ # 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.eno1.useDHCP = lib.mkDefault true;
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}
diff --git a/odino/nixos/hardware.nix b/odino/nixos/hardware.nix
index e69de29..7049ed2 100644
--- a/odino/nixos/hardware.nix
+++ b/odino/nixos/hardware.nix
@@ -0,0 +1,23 @@
+{config, lib, pkgs, modulesPath, ...}: {
+ imports = [
+ (modulesPath + "/installer/scan/not-detected.nix")
+ ];
+
+ fileSystems."/" = {
+ device = "/dev/disk/by-uuid/31eed536-5936-4814-bb60-73fcc4fabdc5";
+ fsType = "ext4";
+ };
+
+ fileSystems."/boot" = {
+ device = "/dev/disk/by-uuid/1DD7-85F5";
+ fsType = "vfat";
+ options = [ "fmask=0077" "dmask=0077" ];
+ };
+
+ swapDevices = [
+ { device = "/dev/disk/by-uuid/8478cb29-8a67-4842-b9ed-16a226506cb7"; }
+ ];
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}
diff --git a/odino/nixos/networking.nix b/odino/nixos/networking.nix
index a69d4fb..ca9cf74 100644
--- a/odino/nixos/networking.nix
+++ b/odino/nixos/networking.nix
@@ -1,6 +1,7 @@
-{...}: {
+{lib, ...}: {
networking = {
hostName = "odino";
+ useDHCP = lib.mkDefault true;
nameservers = [ "208.67.222.222" "208.67.220.220" ];