From 8b77c44e3e4f406e3ebfacbdb9d12c01cf5f8a4a Mon Sep 17 00:00:00 2001 From: Nathan Date: Tue, 19 Nov 2024 23:24:32 -0600 Subject: [PATCH] add remote container --- .../containers/nixos-remote/default.nix | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 system-config/services/containers/nixos-remote/default.nix diff --git a/system-config/services/containers/nixos-remote/default.nix b/system-config/services/containers/nixos-remote/default.nix new file mode 100644 index 0000000..fa34414 --- /dev/null +++ b/system-config/services/containers/nixos-remote/default.nix @@ -0,0 +1,32 @@ +{ config, lib, pkgs, ... }: { + + options.sysconfig.opts.virtualization.nixos-remote.enable = lib.options.mkOption { + type = lib.types.bool; + default = false; + }; + + config = lib.mkIf config.sysconfig.opts.virtualization.nixos-remote.enable { + + containers.nixos-remote = { + + ephemeral = true; + autoStart = false; + privateNetwork = true; + hostAddress = "192.168.100.10"; + localAddress = "192.168.100.17"; + + extraFlags = [ + "-U" + ]; + + config = { config, lib, pkgs, ... }: { + + users.users.nixos = { + isNormalUser = true; + extraGroups = [ "wheel" ]; + initialPassword = "7567"; + }; + }; + }; + }; +}