88 lines
2.1 KiB
Nix
88 lines
2.1 KiB
Nix
{ inputs, config, lib, pkgs, ... }:
|
|
|
|
let
|
|
unstable = import inputs.nixpkgs-unstable {
|
|
system = config.nixpkgs.system;
|
|
};
|
|
in
|
|
{
|
|
imports =
|
|
[
|
|
./hardware-configuration.nix
|
|
../modules/nasp.nix
|
|
];
|
|
nasp = {
|
|
enable = true;
|
|
gSeries = {
|
|
enable = true;
|
|
serial = 18;
|
|
};
|
|
registry.enable = false;
|
|
nginx.enableCodeServer = false;
|
|
nvidia.enable = false;
|
|
};
|
|
boot.loader.systemd-boot.enable = lib.mkForce false;
|
|
boot.loader.efi.canTouchEfiVariables = lib.mkForce false;
|
|
boot.loader.grub.enable = true;
|
|
boot.loader.grub.device = "/dev/vda";
|
|
# networking
|
|
networking.hostName = lib.mkForce "g18-next";
|
|
networking.hostId = "11f1fad0";
|
|
systemd.network.networks."10-veth0" = {
|
|
matchConfig.Name = "enp1s0";
|
|
networkConfig = {
|
|
DHCP = "no";
|
|
IPv6AcceptRA = true;
|
|
};
|
|
address = [ "192.168.122.118/24" ];
|
|
routes = [
|
|
{
|
|
routeConfig = {
|
|
Gateway = "192.168.122.1";
|
|
GatewayOnLink = true;
|
|
Metric = 90;
|
|
};
|
|
}
|
|
];
|
|
};
|
|
networking.firewall.extraCommands = ''
|
|
iptables -A INPUT -s 192.168.122.1 -j ACCEPT
|
|
'';
|
|
# service: gitea
|
|
services.gitea = {
|
|
enable = true;
|
|
package = unstable.gitea;
|
|
stateDir = "/data0/lib/gitea";
|
|
database.type = "sqlite3";
|
|
settings = {
|
|
server = {
|
|
SSH_DOMAIN = "nasp.fit";
|
|
DOMAIN = "git.nasp.fit";
|
|
HTTP_PORT = 3000;
|
|
ROOT_URL = "https://git.nasp.fit/";
|
|
DISABLE_SSH = false;
|
|
SSH_PORT = 22;
|
|
OFFLINE_MODE = false;
|
|
START_SSH_SERVER = true;
|
|
BUILTIN_SSH_SERVER_USER = "git";
|
|
};
|
|
"repository.pull-request" = {
|
|
DEFAULT_MERGE_STYLE = "squash";
|
|
};
|
|
"repository.signing" = {
|
|
DEFAULT_TRUST_MODEL = "committer";
|
|
};
|
|
proxy = {
|
|
PROXY_ENABLED = true;
|
|
PROXY_URL = "http://192.168.255.1:20171";
|
|
PROXY_HOSTS = "github.com";
|
|
};
|
|
};
|
|
};
|
|
systemd.sockets.gitea.listenStreams = [ "22" ];
|
|
systemd.services.gitea.requires = [ "gitea.socket" ];
|
|
|
|
|
|
system.stateVersion = "24.05";
|
|
}
|