This commit is contained in:
m3tam3re 2024-09-26 14:45:59 +02:00
parent 78a720e1a3
commit e7ec54ef4f
5 changed files with 67 additions and 8 deletions

View File

@ -30,7 +30,7 @@ in {
];
input = {
kb_layout = "de,us";
kb_layout = "us";
kb_variant = "";
kb_model = "";
kb_rules = "";

View File

@ -40,7 +40,9 @@
};
};
nix = {
nix = let
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
in {
settings = {
experimental-features = "nix-command flakes";
trusted-users = [
@ -53,10 +55,8 @@
options = "--delete-older-than 30d";
};
optimise.automatic = true;
registry =
(lib.mapAttrs (_: flake: {inherit flake;}))
((lib.filterAttrs (_: lib.isType "flake")) inputs);
nixPath = ["/etc/nix/path"];
registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs;
nixPath = ["/etc/nix/path"] ++ lib.mapAttrsToList (flakeName: _: "${flakeName}=flake:${flakeName}") flakeInputs;
};
users.defaultUserShell = pkgs.fish;
}

View File

@ -21,7 +21,7 @@
# Enable networking
networking.networkmanager.enable = true;
networking.networkmanager.unmanaged = ["interface-name:ve-*"];
# Set your time zone.
time.timeZone = "Europe/Berlin";
@ -86,8 +86,10 @@
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
networking.nat.enable = true;
networking.nat.internalInterfaces = ["ve-+"];
networking.nat.externalInterface = "enp1s0";
# networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave

View File

@ -1,6 +1,7 @@
{
imports = [
./echo.nix
./httpd.nix
./nginx.nix
];
}

View File

@ -0,0 +1,56 @@
{
containers.httpd = {
autoStart = true;
ephemeral = true;
privateNetwork = true;
hostAddress = "192.168.100.10";
localAddress = "192.168.100.11";
forwardPorts = [
{
containerPort = 80;
hostPort = 80;
}
];
config = {...}: {
services.httpd = {
enable = true;
adminAddr = "foo@example.org";
};
networking.firewall.allowedTCPPorts = [80];
system.stateVersion = "24.05";
};
bindMounts = {
"/root/data" = {
hostPath = "/home/m3tam3re/data/";
isReadOnly = false;
};
};
};
containers.httpd2 = {
autoStart = true;
ephemeral = true;
privateNetwork = true;
hostAddress = "192.168.100.10";
localAddress = "192.168.100.12";
forwardPorts = [
{
containerPort = 80;
hostPort = 8080;
}
];
config = {...}: {
services.httpd = {
enable = true;
adminAddr = "foo@example.org";
};
networking.firewall.allowedTCPPorts = [80];
system.stateVersion = "24.05";
};
bindMounts = {
"/root/data" = {
hostPath = "/home/m3tam3re/data/";
isReadOnly = false;
};
};
};
}