mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
made gitea container and moved minecraft container
This commit is contained in:
parent
8bc2064663
commit
a66d31eb6b
4 changed files with 86 additions and 4 deletions
6
systems/gerg-desktop/containers/default.nix
Normal file
6
systems/gerg-desktop/containers/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
inputs: {
|
||||||
|
imports = [
|
||||||
|
(import ./minecraft.nix inputs)
|
||||||
|
(import ./website.nix inputs)
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -32,9 +32,6 @@ _: {...}: {
|
||||||
systemd.services.setmacaddr = {
|
systemd.services.setmacaddr = {
|
||||||
script = ''
|
script = ''
|
||||||
/run/current-system/sw/bin/ip link set dev eth0 address 00:00:00:00:00:10
|
/run/current-system/sw/bin/ip link set dev eth0 address 00:00:00:00:00:10
|
||||||
/run/current-system/sw/bin/systemctl stop dhcpcd.service
|
|
||||||
/run/current-system/sw/bin/ip addr flush eth0
|
|
||||||
/run/current-system/sw/bin/systemctl start dhcpcd.service
|
|
||||||
'';
|
'';
|
||||||
wantedBy = ["basic.target"];
|
wantedBy = ["basic.target"];
|
||||||
after = ["dhcpcd.service"];
|
after = ["dhcpcd.service"];
|
||||||
79
systems/gerg-desktop/containers/website.nix
Normal file
79
systems/gerg-desktop/containers/website.nix
Normal file
|
|
@ -0,0 +1,79 @@
|
||||||
|
_: {...}: {
|
||||||
|
containers."website" = {
|
||||||
|
autoStart = true;
|
||||||
|
privateNetwork = true;
|
||||||
|
hostBridge = "bridge0";
|
||||||
|
localAddress = "192.168.1.11/24";
|
||||||
|
localAddress6 = "2605:59c8:252e:500:200:ff:fe00:11/64";
|
||||||
|
config = {
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
giteaPort = 3000;
|
||||||
|
in {
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
environment.systemPackages = [pkgs.neovim];
|
||||||
|
networking = {
|
||||||
|
defaultGateway = "192.168.1.1";
|
||||||
|
nameservers = ["1.1.1.1" "1.0.0.1"];
|
||||||
|
firewall = {
|
||||||
|
#allowedUDPPorts = [giteaPort 80 443];
|
||||||
|
allowedTCPPorts = [giteaPort 80 443 22];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.services.setmacaddr = {
|
||||||
|
script = ''
|
||||||
|
/run/current-system/sw/bin/ip link set dev eth0 address 00:00:00:00:00:11
|
||||||
|
'';
|
||||||
|
wantedBy = ["basic.target"];
|
||||||
|
after = ["dhcpcd.service"];
|
||||||
|
};
|
||||||
|
system.stateVersion = "unstable";
|
||||||
|
services = {
|
||||||
|
gitea = {
|
||||||
|
enable = true;
|
||||||
|
appName = "WEEEWOOOO";
|
||||||
|
domain = "git.gerg-l.com";
|
||||||
|
rootUrl = "https://git.gerg-l.com/";
|
||||||
|
httpPort = giteaPort;
|
||||||
|
settings = {
|
||||||
|
server = {
|
||||||
|
LANDING_PAGE = "/explore/repos";
|
||||||
|
};
|
||||||
|
UI = {
|
||||||
|
DEFAULT_THEME = "arc-green";
|
||||||
|
};
|
||||||
|
service = {
|
||||||
|
DISABLE_REGISTRATION = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
nginx = {
|
||||||
|
enable = true;
|
||||||
|
virtualHosts = {
|
||||||
|
"git.gerg-l.com" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://localhost:${toString giteaPort}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
openssh = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
PermitRootLogin = "no";
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
KbdInteractiveAuthentication = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
security.acme = {
|
||||||
|
acceptTerms = true;
|
||||||
|
defaults.email = "gregleyda@proton.me";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -12,7 +12,7 @@ inputs: {
|
||||||
(import ./spicetify.nix inputs)
|
(import ./spicetify.nix inputs)
|
||||||
#(import ./mining.nix inputs)
|
#(import ./mining.nix inputs)
|
||||||
(import ./zfs inputs)
|
(import ./zfs inputs)
|
||||||
(import ./minecraft.nix inputs)
|
(import ./containers inputs)
|
||||||
];
|
];
|
||||||
|
|
||||||
system.stateVersion = "unstable";
|
system.stateVersion = "unstable";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue