Compare commits
4 Commits
bccb96a0b3
...
fe19700514
| Author | SHA1 | Date | |
|---|---|---|---|
| fe19700514 | |||
| 25ea6ac502 | |||
| 01fde39946 | |||
| 84b32cea01 |
@@ -78,10 +78,11 @@
|
|||||||
oauth2.JWT_SECRET = lib.mkForce config.sops.secrets."forgejo/jwt_secret".path;
|
oauth2.JWT_SECRET = lib.mkForce config.sops.secrets."forgejo/jwt_secret".path;
|
||||||
server.LFS_JWT_SECRET = lib.mkForce config.sops.secrets."forgejo/lfs_jwt_secret".path;
|
server.LFS_JWT_SECRET = lib.mkForce config.sops.secrets."forgejo/lfs_jwt_secret".path;
|
||||||
};
|
};
|
||||||
# dump = {
|
dump = {
|
||||||
# enable = true;
|
enable = true;
|
||||||
# interval = "12h";
|
type = "tar";
|
||||||
# };
|
interval = "*-*-* 00/12:00:00";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
postgresql = {
|
postgresql = {
|
||||||
@@ -90,6 +91,14 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# https://forgejo.org/docs/latest/admin/command-line/#dump
|
||||||
|
systemd.services.forgejo-dump.serviceConfig.ExecStart = lib.mkForce ''
|
||||||
|
${lib.getExe config.services.forgejo.package} dump --verbose \
|
||||||
|
--type ${config.services.forgejo.dump.type} \
|
||||||
|
--database postgres \
|
||||||
|
--work-path ${config.services.forgejo.dump.backupDir}
|
||||||
|
'';
|
||||||
|
|
||||||
environment.systemPackages =
|
environment.systemPackages =
|
||||||
let
|
let
|
||||||
systemctl = lib.getExe' pkgs.systemd "systemctl";
|
systemctl = lib.getExe' pkgs.systemd "systemctl";
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ in
|
|||||||
# nixos.restic-envoy
|
# nixos.restic-envoy
|
||||||
({ config, pkgs, ... }: {
|
({ config, pkgs, ... }: {
|
||||||
networking.hostName = hostname;
|
networking.hostName = hostname;
|
||||||
|
time.timeZone = "America/Chicago";
|
||||||
|
|
||||||
# Removes password for sudo
|
# Removes password for sudo
|
||||||
security.sudo-rs.extraRules = lib.mkAfter [
|
security.sudo-rs.extraRules = lib.mkAfter [
|
||||||
@@ -55,6 +56,13 @@ in
|
|||||||
port = 443;
|
port = 443;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
loginText.extraServiceStatus = {
|
||||||
|
Docker = "docker";
|
||||||
|
"mTLS Renewal" = "mtls-renew.timer";
|
||||||
|
Forgejo = "forgejo.service";
|
||||||
|
"Forgejo Backup" = "forgejo-dump.timer";
|
||||||
|
};
|
||||||
|
|
||||||
step-ssh-host.hostname = hostname;
|
step-ssh-host.hostname = hostname;
|
||||||
|
|
||||||
# This provides the secrets at install time
|
# This provides the secrets at install time
|
||||||
|
|||||||
@@ -1,44 +1,56 @@
|
|||||||
{ inputs, ... }: {
|
{ inputs, ... }: {
|
||||||
flake.modules.nixos.login-text = { config, ... }: {
|
flake.modules.nixos.login-text = { config, lib, ... }:
|
||||||
programs.rust-motd = {
|
let
|
||||||
enable = true;
|
defaultServiceStatus = {
|
||||||
refreshInterval = "*:0/5";
|
SSH = "sshd.socket";
|
||||||
order = [
|
"SSH Cert Renewal" = "step-ssh-host-renew.timer";
|
||||||
"global"
|
};
|
||||||
"last_login"
|
in {
|
||||||
"service_status"
|
options.loginText.extraServiceStatus = lib.mkOption {
|
||||||
# "uptime"
|
type = lib.types.attrsOf lib.types.str;
|
||||||
"memory"
|
default = { };
|
||||||
"filesystems"
|
description = "Additional rust-motd service status entries keyed by display name.";
|
||||||
];
|
};
|
||||||
settings = {
|
|
||||||
global = {
|
|
||||||
time_format = "%Y-%m-%d %H:%M:%S %Z";
|
|
||||||
};
|
|
||||||
|
|
||||||
last_login = {
|
config = {
|
||||||
john = 3;
|
programs.rust-motd = {
|
||||||
root = 3;
|
enable = true;
|
||||||
};
|
refreshInterval = "*:0/5";
|
||||||
|
order = [
|
||||||
|
"global"
|
||||||
|
"last_login"
|
||||||
|
"service_status"
|
||||||
|
# "uptime"
|
||||||
|
"memory"
|
||||||
|
"filesystems"
|
||||||
|
];
|
||||||
|
settings = {
|
||||||
|
global = {
|
||||||
|
time_format = "%Y-%m-%d %H:%M:%S %Z";
|
||||||
|
};
|
||||||
|
|
||||||
service_status = {
|
last_login = {
|
||||||
Docker = "docker";
|
john = 3;
|
||||||
SSH = "sshd.socket";
|
root = 3;
|
||||||
"SSH Cert Renewal" = "step-ssh-host-renew.timer";
|
};
|
||||||
"mTLS Renewal" = "mtls-renew.timer";
|
|
||||||
};
|
|
||||||
|
|
||||||
# This calculation is wrong for LXCs
|
service_status = lib.mkMerge [
|
||||||
# uptime = {
|
defaultServiceStatus
|
||||||
# prefix = "Uptime";
|
config.loginText.extraServiceStatus
|
||||||
# };
|
];
|
||||||
|
|
||||||
memory = {
|
# This calculation is wrong for LXCs
|
||||||
swap_pos = "beside";
|
# uptime = {
|
||||||
};
|
# prefix = "Uptime";
|
||||||
|
# };
|
||||||
|
|
||||||
filesystems = {
|
memory = {
|
||||||
root = "/";
|
swap_pos = "beside";
|
||||||
|
};
|
||||||
|
|
||||||
|
filesystems = {
|
||||||
|
root = "/";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
};
|
};
|
||||||
home.shellAliases = {
|
home.shellAliases = {
|
||||||
ls = "${lib.getExe pkgs.eza} -lgos type --no-time --follow-symlinks";
|
ls = "${lib.getExe pkgs.eza} -algos type --follow-symlinks --all --all";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user