From fbc3741fcad6c4bad79e14f8be6c90f04bd2c1e4 Mon Sep 17 00:00:00 2001 From: John Lancaster <32917998+jsl12@users.noreply.github.com> Date: Thu, 3 Jul 2025 04:25:10 +0000 Subject: [PATCH] consolidated --- flake.nix | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/flake.nix b/flake.nix index 397c854..d349006 100644 --- a/flake.nix +++ b/flake.nix @@ -10,24 +10,21 @@ let inherit (self) outputs; nixosSystem = inputs.nixpkgs.lib.nixosSystem; - - # Base LXC module that can be reused - baseLxcModule = { pkgs, ... }: { - system.stateVersion = "24.11"; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - services.vscode-server.enable = true; - environment.systemPackages = with pkgs; [ - git - ]; - }; - + # Define the base modules list once baseLxcModules = [ (inputs.nixpkgs + "/nixos/modules/virtualisation/proxmox-lxc.nix") inputs.vscode-server.nixosModules.default - baseLxcModule + ({ pkgs, ... }: { + system.stateVersion = "24.11"; + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + services.vscode-server.enable = true; + environment.systemPackages = with pkgs; [ + git + ]; + }) ]; - + # Function to create LXC systems with custom modules mkLxcSystem = { system ? "x86_64-linux", extraModules ? [], extraPackages ? [] }: nixosSystem { inherit system; @@ -48,7 +45,6 @@ # Export nixosModules for use in other flakes nixosModules = { - lxc-base = baseLxcModule; # Alternative module with more options lxc-configurable = { config, lib, pkgs, ... }: with lib;