add lxc template generator
This commit is contained in:
parent
6e89a09685
commit
ae7c8f2a6d
5 changed files with 68 additions and 40 deletions
|
@ -1,4 +1,5 @@
|
|||
{ lib, ... }: {
|
||||
|
||||
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
||||
# Per-interface useDHCP will be mandatory in the future, so this generated config
|
||||
# replicates the default behaviour.
|
||||
|
|
17
nixos/lxc-template.nix
Normal file
17
nixos/lxc-template.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ config, pkgs, lib, ... }: {
|
||||
# Can't import common completely due to infinite recursion
|
||||
imports = [ ./common/users ./common/generic-lxc.nix ];
|
||||
|
||||
# Enable SSH
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
passwordAuthentication = false;
|
||||
permitRootLogin = "yes";
|
||||
};
|
||||
|
||||
time.timeZone = lib.mkDefault "Europe/Amsterdam";
|
||||
|
||||
networking.interfaces.eth0.useDHCP = true;
|
||||
|
||||
system.stateVersion = "22.11";
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
{ nixpkgs, home-manager, hyprland, mailserver, ... }:
|
||||
let
|
||||
inherit (nixpkgs) lib;
|
||||
inherit (builtins) filter mapAttrs attrValues concatLists;
|
||||
inherit (builtins) filter attrValues concatLists;
|
||||
|
||||
# Helper function to resolve what should be imported depending on the type of config (lxc, vm, bare metal)
|
||||
resolve_imports =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue