diff --git a/flake.nix b/flake.nix index d623df7..82581f7 100644 --- a/flake.nix +++ b/flake.nix @@ -105,16 +105,32 @@ } ]; }; - template = nixpkgs.lib.nixosSystem { + forgejo = nixpkgs.lib.nixosSystem { inherit system; modules = [ agenix.nixosModules.default - "${inputs.self}/systems/minimalVMConfig.nix" + "${inputs.nixpkgs}/nixos/modules/virtualisation/proxmox-lxc.nix" + "${inputs.self}/systems/minimalLXCConfig.nix" + "${inputs.self}/services" { - networking.hostName = "nixos"; + networking.hostName = "forgejo"; + services.vm_forgejo = { + enable = true; + pgsql_ip = pgsql_host; + }; } ]; }; +# template = nixpkgs.lib.nixosSystem { +# inherit system; +# modules = [ +# agenix.nixosModules.default +# "${inputs.self}/systems/minimalVMConfig.nix" +# { +# networking.hostName = "nixos"; +# } +# ]; +# }; jellyfin = nixpkgs.lib.nixosSystem { inherit system; modules = [ diff --git a/services/forgejo/default.nix b/services/forgejo/default.nix index 28c4add..c2bf08c 100644 --- a/services/forgejo/default.nix +++ b/services/forgejo/default.nix @@ -8,7 +8,7 @@ in { options.services.vm_forgejo = { enable = lib.mkEnableOption "Enable minimal config"; - db_ip = lib.mkOption { + pgsql_ip = lib.mkOption { type = lib.types.str; description = "forgejo database IP address"; }; @@ -26,7 +26,7 @@ in { database = { createDatabase = false; type = "postgres"; - host = "${cfg.db_ip}"; + host = "${cfg.pgsql_ip}"; name = "gitea"; user = "gitea"; passwordFile = "/run/secrets/forgejo/forgejo-dbpass";