From c7c261332e9d6a07ec06d7faa9e7751bf465bafc Mon Sep 17 00:00:00 2001 From: Jakub Dorfman Date: Mon, 20 Apr 2026 01:41:49 +0200 Subject: [PATCH] merge --- caddy.nix | 22 +++++++-------- containers/hello.nix | 54 ++++++++++++++++++------------------ flake.nix | 66 ++++++++++++++++++++++---------------------- 3 files changed, 71 insertions(+), 71 deletions(-) mode change 100644 => 100755 caddy.nix mode change 100644 => 100755 containers/hello.nix diff --git a/caddy.nix b/caddy.nix old mode 100644 new mode 100755 index d0b438f..c4eafed --- a/caddy.nix +++ b/caddy.nix @@ -1,12 +1,12 @@ -{ ... }: -{ - services.caddy = { - enable = true; - email = "admin@srazka.com"; # Replace with your actual email - - # The new hello container - virtualHosts."hello.srazka.com".extraConfig = '' - reverse_proxy 192.168.100.11:80 - ''; - }; +{ ... }: +{ + services.caddy = { + enable = true; + email = "admin@srazka.com"; # Replace with your actual email + + # The new hello container + virtualHosts."hello.srazka.com".extraConfig = '' + reverse_proxy 192.168.100.11:80 + ''; + }; } \ No newline at end of file diff --git a/containers/hello.nix b/containers/hello.nix old mode 100644 new mode 100755 index 730440e..fbebe96 --- a/containers/hello.nix +++ b/containers/hello.nix @@ -1,27 +1,27 @@ -{ config, pkgs, ... }: - -{ - containers.hello = { - autoStart = true; - privateNetwork = true; - hostAddress = "192.168.100.10"; - localAddress = "192.168.100.11"; - - config = { config, pkgs, ... }: { - system.stateVersion = "25.11"; - - networking.firewall.allowedTCPPorts = [ 80 ]; - - services.nginx = { - enable = true; - virtualHosts."localhost" = { - # Return a 200 OK directly from nginx - locations."/".return = "200 'Hello world!'"; - locations."/".extraConfig = '' - default_type text/plain; - ''; - }; - }; - }; - }; -} +{ config, pkgs, ... }: + +{ + containers.hello = { + autoStart = true; + privateNetwork = true; + hostAddress = "192.168.100.10"; + localAddress = "192.168.100.11"; + + config = { config, pkgs, ... }: { + system.stateVersion = "25.11"; + + networking.firewall.allowedTCPPorts = [ 80 ]; + + services.nginx = { + enable = true; + virtualHosts."localhost" = { + # Return a 200 OK directly from nginx + locations."/".return = "200 'Hello world!'"; + locations."/".extraConfig = '' + default_type text/plain; + ''; + }; + }; + }; + }; +} diff --git a/flake.nix b/flake.nix index 91f815a..ff4abac 100644 --- a/flake.nix +++ b/flake.nix @@ -1,33 +1,33 @@ -{ - description = "vpsAdminOS container"; - - inputs = { - vpsadminos.url = "github:vpsfreecz/vpsadminos"; - - nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; - }; - - outputs = - inputs@{ - nixpkgs, - vpsadminos, - ... - }: - let - system = "x86_64-linux"; - in - { - nixosConfigurations.vps = nixpkgs.lib.nixosSystem { - inherit system; - modules = [ - vpsadminos.nixosModules.container_25_11 - ./configuration.nix - ./caddy.nix - ./containers/hello.nix - ]; - specialArgs = { - inherit inputs; - }; - }; - }; -} +{ + description = "vpsAdminOS container"; + + inputs = { + vpsadminos.url = "github:vpsfreecz/vpsadminos"; + + nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; + }; + + outputs = + inputs@{ + nixpkgs, + vpsadminos, + ... + }: + let + system = "x86_64-linux"; + in + { + nixosConfigurations.vps = nixpkgs.lib.nixosSystem { + inherit system; + modules = [ + vpsadminos.nixosModules.container_25_11 + ./configuration.nix + ./caddy.nix + ./containers/hello.nix + ]; + specialArgs = { + inherit inputs; + }; + }; + }; +}