diff options
Diffstat (limited to 'hosts/vps')
-rw-r--r-- | hosts/vps/cfg.nix | 2 | ||||
-rw-r--r-- | hosts/vps/maloja.nix | 51 | ||||
-rw-r--r-- | hosts/vps/website.nix | 3 |
3 files changed, 53 insertions, 3 deletions
diff --git a/hosts/vps/cfg.nix b/hosts/vps/cfg.nix index 7fc5f86..3597c5c 100644 --- a/hosts/vps/cfg.nix +++ b/hosts/vps/cfg.nix @@ -14,6 +14,7 @@ ./git.nix ./hydrus.nix ./matrix.nix + ./maloja.nix ]; config = { @@ -71,7 +72,6 @@ networking.networkmanager.enable = lib.mkForce false; - nixpkgs.config.allowUnfree = true; environment.persistence."/nix/persist".directories = [ { diff --git a/hosts/vps/maloja.nix b/hosts/vps/maloja.nix new file mode 100644 index 0000000..3d4530d --- /dev/null +++ b/hosts/vps/maloja.nix @@ -0,0 +1,51 @@ +{ + pkgs, + config, + lib, + ... +}: { + config = { + users.groups.maloja = {}; + users.users.maloja = { + isSystemUser = true; + description = "maloja"; + group = "maloja"; + home = "/var/lib/maloja"; + }; + + security.lockKernelModules = lib.mkForce false; + virtualisation.oci-containers.containers.maloja = { + ports = ["42010:42010"]; + image = "krateng/maloja"; + volumes = [ + "/var/lib/maloja:/data" + ]; + environment = { + MALOJA_DATA_DIRECTORY = "/data"; + MALOJA_SKIP_SETUP = "True"; + MALOJA_NAME = "tzlil"; + MAlOJA_PROXY_IMAGES = "True"; + }; + }; + + # systemd.services.podman-maloja.serviceConfig.User = "maloja"; + # systemd.services.podman-maloja.serviceConfig.Group = "maloja"; + + networking.firewall.allowedTCPPorts = [42010]; + + environment.persistence."/nix/persist".directories = [ + { + directory = "/var/lib/maloja"; + user = "maloja"; + group = "maloja"; + } + ]; + + services.caddy = { + virtualHosts."fm.tzlil.net".extraConfig = '' + bind 0.0.0.0 + reverse_proxy :42010 + ''; + }; + }; +} diff --git a/hosts/vps/website.nix b/hosts/vps/website.nix index 2716aa5..5d1d48a 100644 --- a/hosts/vps/website.nix +++ b/hosts/vps/website.nix @@ -76,8 +76,7 @@ i currently work as a security researcher but in a few months i will be drafted to the army - i like music - https://last.fm/user/tzlils + i like music <a href="https://fm.tzlil.net">https://fm.tzlil.net</a> my interests: plan9 |