From fadd0c41d4abaa310f0ab106c53cd850b296db34 Mon Sep 17 00:00:00 2001 From: Tine Date: Sun, 1 Sep 2024 11:26:09 +0200 Subject: [PATCH] feat: hey it works, ish --- .gitignore | 2 +- proxmox.tjo.cloud/configuration.nix | 14 -------------- proxmox.tjo.cloud/flake.nix | 1 + proxmox.tjo.cloud/qcow2.nix | 18 ++++++++++++++++++ 4 files changed, 20 insertions(+), 15 deletions(-) create mode 100644 proxmox.tjo.cloud/qcow2.nix diff --git a/.gitignore b/.gitignore index 3f83c66..f55a5dd 100644 --- a/.gitignore +++ b/.gitignore @@ -39,4 +39,4 @@ terraform.rc admin.*config # Nix -**/result/* +**/result diff --git a/proxmox.tjo.cloud/configuration.nix b/proxmox.tjo.cloud/configuration.nix index 8beb391..e1155ef 100644 --- a/proxmox.tjo.cloud/configuration.nix +++ b/proxmox.tjo.cloud/configuration.nix @@ -1,5 +1,4 @@ { - config, lib, pkgs, modulesPath, @@ -26,21 +25,8 @@ boot.growPartition = true; boot.kernelParams = [ "console=ttyS0" ]; boot.loader.systemd-boot.enable = true; - #boot.loader.grub.device = "nodev"; - #boot.loader.grub.efiSupport = true; - #boot.loader.grub.efiInstallAsRemovable = true; boot.loader.timeout = 0; - system.build.qcow2 = import "${toString modulesPath}/../lib/make-disk-image.nix" { - inherit lib config pkgs; - name = "nixos"; - diskSize = "auto"; - format = "qcow2-compressed"; - partitionTableType = "efi"; - copyChannel = true; - configFile = pkgs.writeText "configuration.nix" (pkgs.lib.readFile ./configuration.nix); - }; - services.qemuGuest.enable = true; services.cloud-init = { diff --git a/proxmox.tjo.cloud/flake.nix b/proxmox.tjo.cloud/flake.nix index 5c35f01..438e980 100644 --- a/proxmox.tjo.cloud/flake.nix +++ b/proxmox.tjo.cloud/flake.nix @@ -10,6 +10,7 @@ build-qcow2 = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ + ./qcow2.nix ./configuration.nix ]; }; diff --git a/proxmox.tjo.cloud/qcow2.nix b/proxmox.tjo.cloud/qcow2.nix new file mode 100644 index 0000000..82c528e --- /dev/null +++ b/proxmox.tjo.cloud/qcow2.nix @@ -0,0 +1,18 @@ +{ + lib, + config, + pkgs, + modulesPath, + ... +}: +{ + system.build.qcow2 = import "${toString modulesPath}/../lib/make-disk-image.nix" { + inherit lib config pkgs; + name = "nixos"; + diskSize = "auto"; + format = "qcow2-compressed"; + partitionTableType = "efi"; + copyChannel = true; + configFile = pkgs.writeText "configuration.nix" (pkgs.lib.readFile ./configuration.nix); + }; +}