Compare commits
2 Commits
c7d050e3ad
...
1fe3095197
Author | SHA1 | Date |
---|---|---|
Rachel Lambda Samuelsson | 1fe3095197 | |
Rachel Lambda Samuelsson | 403cd67696 |
|
@ -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";
|
||||
}
|
|
@ -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 = [ ];
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -82,6 +82,7 @@ in
|
|||
prismlauncher
|
||||
vimv
|
||||
rzk
|
||||
whalebird
|
||||
];
|
||||
stateVersion = "23.11";
|
||||
};
|
||||
|
|
|
@ -47,6 +47,9 @@
|
|||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
"electron-21.4.4" # needed for whalebird
|
||||
];
|
||||
|
||||
# [DESKTOP / XORG / WAYLAND]
|
||||
services.xserver = {
|
||||
|
|
Loading…
Reference in New Issue