37 lines
917 B
Nix
37 lines
917 B
Nix
{ inputs, ... }:
|
|
let
|
|
name = "test-nix";
|
|
username = "john";
|
|
in
|
|
{
|
|
flake.modules.nixos."${name}" = { pkgs, lib, ...}: {
|
|
networking.hostName = "${name}";
|
|
services.openssh = {
|
|
enable = true;
|
|
# require public key authentication for better security
|
|
settings.PasswordAuthentication = false;
|
|
settings.KbdInteractiveAuthentication = false;
|
|
};
|
|
|
|
virtualisation.docker = {
|
|
enable = true;
|
|
};
|
|
home-manager.users."${username}" = {
|
|
docker.enable = true;
|
|
};
|
|
users.users.john = {
|
|
extraGroups = [ "docker" ];
|
|
};
|
|
};
|
|
|
|
# Generic bootstrapping lxc, use a specific host file for more
|
|
flake.nixosConfigurations."${name}" = inputs.nixpkgs.lib.nixosSystem {
|
|
modules = [
|
|
inputs.self.modules.nixos.lxc
|
|
inputs.home-manager.nixosModules.home-manager
|
|
inputs.self.modules.nixos."${name}"
|
|
inputs.self.modules.nixos.john
|
|
];
|
|
};
|
|
}
|