Compare commits

...

2 Commits

Author SHA1 Message Date
Rachel Lambda Samuelsson 1fe3095197 basic work on cafe 2024-01-03 17:29:14 +01:00
Rachel Lambda Samuelsson 403cd67696 whalebird 2024-01-03 17:29:14 +01:00
5 changed files with 67 additions and 4 deletions

28
cafe/gitea.nix 100644
View File

@ -0,0 +1,28 @@
{ config, pkgs, ... }:
{
services.gitea = {
enable = true;
appName = "My awesome Gitea server"; # Give the site a name
database = {
type = "sqlite3";
};
settings.server = {
DOMAIN = "localhost";
ROOT_URL = "http://localhost/";
HTTP_PORT = 3001;
};
};
# [CONTAINER]
boot.isContainer = true;
# [NETWORK]
networking.hostName = "gitea";
networking.useDHCP = false;
networking.firewall.enable = true;
networking.firewall.allowedTCPPorts = [ 3001 ];
networking.firewall.allowedUDPPorts = [ ];
system.stateVersion = "23.11";
}

32
cafe/host.nix 100644
View File

@ -0,0 +1,32 @@
{ pkgs, ... }:
let gitea = {
host = "10.10.0.1";
local = "10.10.0.2";
};
in
{
# [CONTAINERS]
containers.gitea = {
autoStart = true;
ephemeral = true;
privateNetwork = true;
hostAddress = gitea.host;
localAddress = gitea.local;
config = ./gitea.nix;
};
# [NGINX]
services.nginx = {
enable = true;
recommendedProxySettings = true;
virtualHosts = {
"localhost" = {
locations."/".proxyPass = "http://${gitea.local}:3001";
};
};
};
# [NETWORK]
# networking.firewall.allowedTCPPorts = [ 80 ];
# networking.firewall.allowedUDPPorts = [ ];
}

View File

@ -35,10 +35,9 @@
};
}
);
in
{
in rec {
nixosConfigurations.lambda = nixpkgs.lib.nixosSystem rec {
nixosConfigurations.lambda = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
nix-config-module
@ -49,7 +48,7 @@
];
};
nixosConfigurations.computational = nixpkgs.lib.nixosSystem rec {
nixosConfigurations.computational = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
nix-config-module

View File

@ -82,6 +82,7 @@ in
prismlauncher
vimv
rzk
whalebird
];
stateVersion = "23.11";
};

View File

@ -47,6 +47,9 @@
};
nixpkgs.config.allowUnfree = true;
nixpkgs.config.permittedInsecurePackages = [
"electron-21.4.4" # needed for whalebird
];
# [DESKTOP / XORG / WAYLAND]
services.xserver = {