From 5dc41e2866c6fbaca5649cae45d814dd97e88550 Mon Sep 17 00:00:00 2001 From: beatzaplenty Date: Wed, 15 Jul 2026 07:30:32 +1000 Subject: [PATCH] added disko configuration to remove disk formatting from auto installer --- flake.lock | 6 ++-- flake.nix | 1 + hosts/nix-minimal/configuration.nix | 4 ++- modules/disko/proxmox.nix | 44 +++++++++++++++++++++++++++++ 4 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 modules/disko/proxmox.nix diff --git a/flake.lock b/flake.lock index a801810..7fb6355 100644 --- a/flake.lock +++ b/flake.lock @@ -147,11 +147,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1783703440, - "narHash": "sha256-O3/YajjWo001VUIgD8BwaRdSNLUFe7nZ1qV5TwhRBcw=", + "lastModified": 1784011430, + "narHash": "sha256-lDebytrYdd47IBLwvNOD+6AGeoqZ78CIKlp70hzW280=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8f0500b9660505dc3cb647775fe9a978a74b5283", + "rev": "8eeec934ae0dbeca3d7868c059568a65c08b2fc3", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index d477632..4649828 100644 --- a/flake.nix +++ b/flake.nix @@ -116,6 +116,7 @@ docker = nixpkgs.lib.nixosSystem { nix-minimal = nixpkgs.lib.nixosSystem { inherit system; modules = [ + inputs.disko.nixosModules.disko ./hosts/nix-minimal/configuration.nix ./modules/hardware-configuration/vm/proxmox.nix diff --git a/hosts/nix-minimal/configuration.nix b/hosts/nix-minimal/configuration.nix index e2e62c8..8f0aac3 100644 --- a/hosts/nix-minimal/configuration.nix +++ b/hosts/nix-minimal/configuration.nix @@ -2,14 +2,16 @@ # your system. Help is available in the configuration.nix(5) man page, on # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). -{ config, lib, pkgs, inputs, ... }: +{ config, lib, pkgs, ... }: { imports = [ # Include the results of the hardware scan. + # inputs.disko.nixosModules.disko ../../modules/common/configuration.nix ../../modules/nix-cache/client.nix ../../modules/remote-builder-client.nix + ../../modules/disko/proxmox.nix ]; networking.hostName = "nix-minimal"; # Define your hostname. diff --git a/modules/disko/proxmox.nix b/modules/disko/proxmox.nix new file mode 100644 index 0000000..649ec9a --- /dev/null +++ b/modules/disko/proxmox.nix @@ -0,0 +1,44 @@ +{ ... }: + +{ + disko.devices = { + disk.main = { + type = "disk"; + device = "/dev/sda"; + + content = { + type = "gpt"; + + partitions = { + root = { + priority = 1; + size = "-8G"; + + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + extraArgs = [ + "-L" + "nixos" + ]; + }; + }; + + swap = { + priority = 2; + size = "100%"; + + content = { + type = "swap"; + extraArgs = [ + "-L" + "swap" + ]; + }; + }; + }; + }; + }; + }; +} \ No newline at end of file