Compare commits
22 commits
4344704394
...
c7e6b0bee3
Author | SHA1 | Date | |
---|---|---|---|
c7e6b0bee3 | |||
4500b28c27 | |||
f68302d648 | |||
9a17b8fabd | |||
dbb566e7d2 | |||
f9128fc0ac | |||
a4ab0eacfc | |||
42bdb74d79 | |||
aafff2fb8f | |||
931b038ae9 | |||
3b08527233 | |||
43e59ebc54 | |||
98ecc58ee7 | |||
e878c2f907 | |||
54d41bb917 | |||
3485b4f0ed | |||
7c27e1e5af | |||
af1c623580 | |||
38315aea4c | |||
e318c3267b | |||
8c93f6d974 | |||
e9a0e60eb0 |
|
@ -123,7 +123,6 @@
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/monolith.nix
|
./hosts/monolith.nix
|
||||||
./system/monolith-gitlab-runner.nix
|
./system/monolith-gitlab-runner.nix
|
||||||
./system/monolith-forgejo-runner.nix
|
|
||||||
./system/nix-serve.nix
|
./system/nix-serve.nix
|
||||||
./system/steam.nix
|
./system/steam.nix
|
||||||
] ++ common_modules;
|
] ++ common_modules;
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
./writefreely.nix
|
./writefreely.nix
|
||||||
./renawiki.nix
|
./renawiki.nix
|
||||||
./email.nix
|
./email.nix
|
||||||
./forgejo.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# # Enable networking
|
# # Enable networking
|
||||||
|
|
|
@ -9,21 +9,13 @@
|
||||||
mailserver = {
|
mailserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
fqdn = "mail.lelgenio.xyz";
|
fqdn = "mail.lelgenio.xyz";
|
||||||
domains = [
|
domains = [ "lelgenio.xyz" ];
|
||||||
"lelgenio.xyz"
|
|
||||||
"git.lelgenio.xyz"
|
|
||||||
];
|
|
||||||
certificateScheme = "acme-nginx";
|
certificateScheme = "acme-nginx";
|
||||||
# Create passwords with
|
|
||||||
# nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt'
|
|
||||||
loginAccounts = {
|
loginAccounts = {
|
||||||
"lelgenio@lelgenio.xyz" = {
|
"lelgenio@lelgenio.xyz" = {
|
||||||
hashedPassword = "$2y$05$z5s7QCXcs5uTFsfyYpwNJeWzb3RmzgWxNgcPCr0zjSytkLFF/qZmS";
|
hashedPassword = "$2y$05$z5s7QCXcs5uTFsfyYpwNJeWzb3RmzgWxNgcPCr0zjSytkLFF/qZmS";
|
||||||
aliases = [ "postmaster@lelgenio.xyz" ];
|
aliases = [ "postmaster@lelgenio.xyz" ];
|
||||||
};
|
};
|
||||||
"noreply@git.lelgenio.xyz" = {
|
|
||||||
hashedPassword = "$2b$05$TmR1R7ZwXfec7yrOfeBL7u3ZtyXf0up5dEO6uMWSvb/O7LPEm.j0.";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,56 +0,0 @@
|
||||||
{ lib, pkgs, config, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.services.forgejo;
|
|
||||||
srv = cfg.settings.server;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
services.nginx = {
|
|
||||||
virtualHosts.${cfg.settings.server.DOMAIN} = {
|
|
||||||
forceSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
extraConfig = ''
|
|
||||||
client_max_body_size 512M;
|
|
||||||
'';
|
|
||||||
locations."/".proxyPass = "http://localhost:${toString srv.HTTP_PORT}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.openssh = {
|
|
||||||
authorizedKeysFiles = [
|
|
||||||
"${config.services.forgejo.stateDir}/.ssh/authorized_keys"
|
|
||||||
];
|
|
||||||
# Recommended by forgejo: https://forgejo.org/docs/latest/admin/recommendations/#git-over-ssh
|
|
||||||
settings.AcceptEnv = "GIT_PROTOCOL";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.forgejo = {
|
|
||||||
enable = true;
|
|
||||||
database.type = "postgres";
|
|
||||||
lfs.enable = true;
|
|
||||||
settings = {
|
|
||||||
service.DISABLE_REGISTRATION = true;
|
|
||||||
actions = {
|
|
||||||
ENABLED = true;
|
|
||||||
DEFAULT_ACTIONS_URL = "github";
|
|
||||||
};
|
|
||||||
server = {
|
|
||||||
DOMAIN = "git.lelgenio.xyz";
|
|
||||||
HTTP_PORT = 3000;
|
|
||||||
ROOT_URL = "https://${srv.DOMAIN}/";
|
|
||||||
};
|
|
||||||
mailer = {
|
|
||||||
ENABLED = true;
|
|
||||||
SMTP_ADDR = "mail.lelgenio.xyz";
|
|
||||||
FROM = "noreply@git.lelgenio.xyz";
|
|
||||||
USER = "noreply@git.lelgenio.xyz";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
mailerPasswordFile = config.age.secrets.phantom-forgejo-mailer-password.path;
|
|
||||||
};
|
|
||||||
|
|
||||||
age.secrets.phantom-forgejo-mailer-password = {
|
|
||||||
file = ../../secrets/phantom-forgejo-mailer-password.age;
|
|
||||||
mode = "400";
|
|
||||||
owner = "forgejo";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -6,6 +6,5 @@
|
||||||
smtp.fromAddress = "lelgenio@disroot.org";
|
smtp.fromAddress = "lelgenio@disroot.org";
|
||||||
streamingProcesses = 2;
|
streamingProcesses = 2;
|
||||||
extraConfig.SINGLE_USER_MODE = "true";
|
extraConfig.SINGLE_USER_MODE = "true";
|
||||||
mediaAutoRemove.olderThanDays = 10;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ports = [ 9022 22 ];
|
ports = [ 9022 ];
|
||||||
settings = {
|
settings = {
|
||||||
PasswordAuthentication = false;
|
PasswordAuthentication = false;
|
||||||
KbdInteractiveAuthentication = false;
|
KbdInteractiveAuthentication = false;
|
||||||
|
|
|
@ -13,8 +13,7 @@ let
|
||||||
"1.1.1.1"
|
"1.1.1.1"
|
||||||
"2606:4700:4700::1111"
|
"2606:4700:4700::1111"
|
||||||
];
|
];
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
networking.nameservers = mkDefault nameservers;
|
networking.nameservers = mkDefault nameservers;
|
||||||
services.resolved = mkDefault { fallbackDns = nameservers; };
|
services.resolved = mkDefault { fallbackDns = nameservers; };
|
||||||
networking.dhcpcd.extraConfig = "noipv4ll";
|
networking.dhcpcd.extraConfig = "noipv4ll";
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
executable = true;
|
executable = true;
|
||||||
text = ''
|
text = ''
|
||||||
systemctl --user import-environment
|
systemctl --user import-environment
|
||||||
dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway SWAYSOCK
|
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
|
||||||
# systemctl --user stop pipewire wireplumber xdg-desktop-portal xdg-desktop-portal-wlr
|
# systemctl --user stop pipewire wireplumber xdg-desktop-portal xdg-desktop-portal-wlr
|
||||||
# systemctl --user start pipewire wireplumber xdg-desktop-portal xdg-desktop-portal-wlr
|
# systemctl --user start pipewire wireplumber xdg-desktop-portal xdg-desktop-portal-wlr
|
||||||
'';
|
'';
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -5,11 +5,9 @@ in
|
||||||
"rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ];
|
"rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ];
|
||||||
"monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ];
|
"monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ];
|
||||||
"gitlab-runner-thoreb-telemetria-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ];
|
"gitlab-runner-thoreb-telemetria-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ];
|
||||||
"monolith-forgejo-runner-token.age".publicKeys = [ main_ssh_public_key ];
|
|
||||||
"lelgenio-cachix.age".publicKeys = [ main_ssh_public_key ];
|
"lelgenio-cachix.age".publicKeys = [ main_ssh_public_key ];
|
||||||
"monolith-nix-serve-privkey.age".publicKeys = [ main_ssh_public_key ];
|
"monolith-nix-serve-privkey.age".publicKeys = [ main_ssh_public_key ];
|
||||||
"phantom-nextcloud.age".publicKeys = [ main_ssh_public_key ];
|
"phantom-nextcloud.age".publicKeys = [ main_ssh_public_key ];
|
||||||
"phantom-writefreely.age".publicKeys = [ main_ssh_public_key ];
|
"phantom-writefreely.age".publicKeys = [ main_ssh_public_key ];
|
||||||
"phantom-renawiki.age".publicKeys = [ main_ssh_public_key ];
|
"phantom-renawiki.age".publicKeys = [ main_ssh_public_key ];
|
||||||
"phantom-forgejo-mailer-password.age".publicKeys = [ main_ssh_public_key ];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
nix fmt
|
|
||||||
|
|
||||||
git diff
|
|
||||||
|
|
||||||
nixos-rebuild switch --flake .#phantom \
|
|
||||||
--update-input nixpkgs \
|
|
||||||
--no-write-lock-file \
|
|
||||||
--build-host phantom \
|
|
||||||
--target-host phantom \
|
|
||||||
"$@"
|
|
|
@ -59,7 +59,7 @@
|
||||||
|
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = false;
|
enable = true;
|
||||||
ports = [ 9022 ];
|
ports = [ 9022 ];
|
||||||
settings = {
|
settings = {
|
||||||
PermitRootLogin = "no";
|
PermitRootLogin = "no";
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
{ pkgs, config, ... }: {
|
|
||||||
services.gitea-actions-runner = {
|
|
||||||
package = pkgs.forgejo-actions-runner;
|
|
||||||
instances.default = {
|
|
||||||
enable = true;
|
|
||||||
name = "monolith";
|
|
||||||
url = "https://git.lelgenio.xyz";
|
|
||||||
tokenFile = config.age.secrets.monolith-forgejo-runner-token.path;
|
|
||||||
labels = [
|
|
||||||
# provide a debian base with nodejs for actions
|
|
||||||
"debian-latest:docker://node:18-bullseye"
|
|
||||||
# fake the ubuntu name, because node provides no ubuntu builds
|
|
||||||
"ubuntu-latest:docker://node:18-bullseye"
|
|
||||||
# provide native execution on the host
|
|
||||||
#"native:host"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -6,13 +6,9 @@
|
||||||
../secrets/monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age;
|
../secrets/monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age;
|
||||||
secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.file =
|
secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.file =
|
||||||
../secrets/gitlab-runner-thoreb-telemetria-registrationConfigFile.age;
|
../secrets/gitlab-runner-thoreb-telemetria-registrationConfigFile.age;
|
||||||
secrets.monolith-forgejo-runner-token.file =
|
|
||||||
../secrets/monolith-forgejo-runner-token.age;
|
|
||||||
secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.file =
|
secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.file =
|
||||||
../secrets/rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age;
|
../secrets/rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age;
|
||||||
secrets.monolith-nix-serve-privkey.file =
|
secrets.monolith-nix-serve-privkey.file =
|
||||||
../secrets/monolith-nix-serve-privkey.age;
|
../secrets/monolith-nix-serve-privkey.age;
|
||||||
secrets.phantom-forgejo-mailer-password.file =
|
|
||||||
../secrets/phantom-forgejo-mailer-password.age;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue