summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.lock21
-rw-r--r--flake.nix5
-rw-r--r--systems/afrodite/boot.nix10
-rw-r--r--systems/afrodite/hardware.nix58
-rw-r--r--systems/afrodite/services.nix1
5 files changed, 87 insertions, 8 deletions
diff --git a/flake.lock b/flake.lock
index 5560854..9a852a6 100644
--- a/flake.lock
+++ b/flake.lock
@@ -21,6 +21,26 @@
"url": "https://codeberg.org/leoflo/dbmain-nix"
}
},
+ "disko": {
+ "inputs": {
+ "nixpkgs": [
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1773506317,
+ "narHash": "sha256-qWKbLUJpavIpvOdX1fhHYm0WGerytFHRoh9lVck6Bh0=",
+ "owner": "nix-community",
+ "repo": "disko",
+ "rev": "878ec37d6a8f52c6c801d0e2a2ad554c75b9353c",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "repo": "disko",
+ "type": "github"
+ }
+ },
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -98,6 +118,7 @@
"root": {
"inputs": {
"dbmain-nix": "dbmain-nix",
+ "disko": "disko",
"home-manager": "home-manager",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs",
diff --git a/flake.nix b/flake.nix
index 18b3670..8129bc1 100644
--- a/flake.nix
+++ b/flake.nix
@@ -8,6 +8,11 @@
inputs.nixpkgs.follows = "nixpkgs";
};
+ disko = {
+ url = "github:nix-community/disko";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+
xfce4-hiddenapps-plugin = {
url = "git+https://codeberg.org/leoflo/xfce4-hiddenapps-plugin?ref=refs/tags/v0.0.1";
inputs.nixpkgs.follows = "nixpkgs";
diff --git a/systems/afrodite/boot.nix b/systems/afrodite/boot.nix
index fccaeac..2a3f3d9 100644
--- a/systems/afrodite/boot.nix
+++ b/systems/afrodite/boot.nix
@@ -1,17 +1,15 @@
{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" ];
+ availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
kernelModules = [ ];
};
- loader = {
- systemd-boot.enable = true;
- efi.canTouchEfiVariables = true;
+ loader.grub = {
+ efiSupport = true;
+ efiInstallAsRemovable = true;
};
extraModulePackages = [ ];
diff --git a/systems/afrodite/hardware.nix b/systems/afrodite/hardware.nix
index 51ddcd0..edc6126 100644
--- a/systems/afrodite/hardware.nix
+++ b/systems/afrodite/hardware.nix
@@ -1,7 +1,63 @@
-{config, lib, modulesPath, ...}: {
+{lib, modulesPath, ...}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
+ (modulesPath + "/profiles/qemu-guest.nix")
];
+ disko.devices = {
+ disk.disk1 = {
+ device = lib.mkDefault "/dev/sda";
+ type = "disk";
+
+ content = {
+ type = "gpt";
+ partitions = {
+ boot = {
+ name = "boot";
+ size = "1M";
+ type = "EF02";
+ };
+
+ esp = {
+ name = "ESP";
+ size = "500M";
+ type = "EF00";
+ content = {
+ type = "filesystem";
+ format = "vfat";
+ mountpoint = "/boot";
+ };
+ };
+
+ root = {
+ name = "root";
+ size = "100%";
+ content = {
+ type = "lvm_pv";
+ vg = "pool";
+ };
+ };
+ };
+ };
+ };
+
+ lvm_vg = {
+ pool = {
+ type = "lvm_vg";
+ lvs = {
+ root = {
+ size = "100%FREE";
+ content = {
+ type = "filesystem";
+ format = "ext4";
+ mountpoint = "/";
+ mountOptions = [ "defaults" ];
+ };
+ };
+ };
+ };
+ };
+ };
+
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}
diff --git a/systems/afrodite/services.nix b/systems/afrodite/services.nix
index f7f8644..6b25e0d 100644
--- a/systems/afrodite/services.nix
+++ b/systems/afrodite/services.nix
@@ -5,5 +5,4 @@
# Custom modules
openssh.enable = true;
- caddy.enable = true;
}