consolidated
This commit is contained in:
16
flake.nix
16
flake.nix
@@ -11,21 +11,18 @@
|
||||
inherit (self) outputs;
|
||||
nixosSystem = inputs.nixpkgs.lib.nixosSystem;
|
||||
|
||||
# Base LXC module that can be reused
|
||||
baseLxcModule = { pkgs, ... }: {
|
||||
# Define the base modules list once
|
||||
baseLxcModules = [
|
||||
(inputs.nixpkgs + "/nixos/modules/virtualisation/proxmox-lxc.nix")
|
||||
inputs.vscode-server.nixosModules.default
|
||||
({ 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
|
||||
})
|
||||
];
|
||||
|
||||
# Function to create LXC systems with custom modules
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user