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;
|
||||
server.LFS_JWT_SECRET = lib.mkForce config.sops.secrets."forgejo/lfs_jwt_secret".path;
|
||||
};
|
||||
# dump = {
|
||||
# enable = true;
|
||||
# interval = "12h";
|
||||
# };
|
||||
dump = {
|
||||
enable = true;
|
||||
type = "tar";
|
||||
interval = "*-*-* 00/12:00:00";
|
||||
};
|
||||
};
|
||||
|
||||
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 =
|
||||
let
|
||||
systemctl = lib.getExe' pkgs.systemd "systemctl";
|
||||
|
||||
@@ -19,6 +19,7 @@ in
|
||||
# nixos.restic-envoy
|
||||
({ config, pkgs, ... }: {
|
||||
networking.hostName = hostname;
|
||||
time.timeZone = "America/Chicago";
|
||||
|
||||
# Removes password for sudo
|
||||
security.sudo-rs.extraRules = lib.mkAfter [
|
||||
@@ -55,6 +56,13 @@ in
|
||||
port = 443;
|
||||
};
|
||||
|
||||
loginText.extraServiceStatus = {
|
||||
Docker = "docker";
|
||||
"mTLS Renewal" = "mtls-renew.timer";
|
||||
Forgejo = "forgejo.service";
|
||||
"Forgejo Backup" = "forgejo-dump.timer";
|
||||
};
|
||||
|
||||
step-ssh-host.hostname = hostname;
|
||||
|
||||
# This provides the secrets at install time
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
{ inputs, ... }: {
|
||||
flake.modules.nixos.login-text = { config, ... }: {
|
||||
flake.modules.nixos.login-text = { config, lib, ... }:
|
||||
let
|
||||
defaultServiceStatus = {
|
||||
SSH = "sshd.socket";
|
||||
"SSH Cert Renewal" = "step-ssh-host-renew.timer";
|
||||
};
|
||||
in {
|
||||
options.loginText.extraServiceStatus = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.str;
|
||||
default = { };
|
||||
description = "Additional rust-motd service status entries keyed by display name.";
|
||||
};
|
||||
|
||||
config = {
|
||||
programs.rust-motd = {
|
||||
enable = true;
|
||||
refreshInterval = "*:0/5";
|
||||
@@ -21,12 +34,10 @@
|
||||
root = 3;
|
||||
};
|
||||
|
||||
service_status = {
|
||||
Docker = "docker";
|
||||
SSH = "sshd.socket";
|
||||
"SSH Cert Renewal" = "step-ssh-host-renew.timer";
|
||||
"mTLS Renewal" = "mtls-renew.timer";
|
||||
};
|
||||
service_status = lib.mkMerge [
|
||||
defaultServiceStatus
|
||||
config.loginText.extraServiceStatus
|
||||
];
|
||||
|
||||
# This calculation is wrong for LXCs
|
||||
# uptime = {
|
||||
@@ -43,4 +54,5 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -8,7 +8,7 @@
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
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