63 lines
1.3 KiB
Nix
63 lines
1.3 KiB
Nix
{ 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 = [ ];
|
|
|
|
# VM test user
|
|
users.users.test.isSystemUser = true ;
|
|
users.users.test.initialPassword = "test";
|
|
users.users.test.group = "test";
|
|
users.groups.test = {};
|
|
|
|
console = {
|
|
useXkbConfig = true;
|
|
};
|
|
|
|
services.xserver = {
|
|
xkb = {
|
|
layout = "fox,sus";
|
|
options = "ctrl:nocaps";
|
|
extraLayouts.sus = {
|
|
description = "Swedish US";
|
|
languages = [ "se" ];
|
|
symbolsFile = ../shared/sus.xkb;
|
|
};
|
|
extraLayouts.fox = {
|
|
description = "Layout suitable to be used by a fox";
|
|
languages = [ "se" ];
|
|
symbolsFile = ../shared/fox.xkb;
|
|
};
|
|
};
|
|
};
|
|
|
|
system.stateVersion = "23.11";
|
|
|
|
}
|