containers/amethyst: init
This commit is contained in:
parent
12681f2087
commit
e2832de968
6 changed files with 151 additions and 3 deletions
38
containers/amethyst/flake.nix
Normal file
38
containers/amethyst/flake.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
};
|
||||
outputs = { nixpkgs, ... }: {
|
||||
nixosConfigurations.container = nixpkgs.lib.nixosSystem {
|
||||
modules = [ ./configuration.nix ];
|
||||
};
|
||||
nixosModule = { ... }: {
|
||||
networking.nat = {
|
||||
enable = true;
|
||||
enableIPv6 = true;
|
||||
internalInterfaces = [ "ve-+" ];
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [ "d /persist/containers/amethyst 755 root users" ];
|
||||
containers.amethyst = {
|
||||
autoStart = true;
|
||||
privateNetwork = true;
|
||||
hostAddress = "10.30.1.1";
|
||||
localAddress = "10.30.1.2";
|
||||
hostAddress6 = "fd0d:1::1:1";
|
||||
localAddress6 = "fd0d:1::1:2";
|
||||
# privateUsers = "pick";
|
||||
nixpkgs = nixpkgs;
|
||||
ephemeral = true;
|
||||
config = { imports = [ ./configuration.nix ]; };
|
||||
|
||||
bindMounts."persist" = {
|
||||
hostPath = "/persist/containers/amethyst";
|
||||
mountPoint = "/persist";
|
||||
isReadOnly = false;
|
||||
};
|
||||
# flake = "path:" + ./.;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue