This commit is contained in:
2026-09-21 04:17:25 +02:00
parent 322c08660f
commit 42cc0397dc
4 changed files with 72 additions and 7 deletions
+28
View File
@@ -0,0 +1,28 @@
{ lib, config, ... }:
let
cfg = config.my.zellij;
in
{
options.my.zellij.autostart = lib.mkEnableOption "lancement auto de zellij dans les shells interactifs";
config.programs.zellij = {
enable = true;
enableZshIntegration = cfg.autostart;
enableBashIntegration = cfg.autostart;
attachExistingSession = true; # se rattache au lieu de créer une nouvelle session
exitShellOnExit = true; # quitter zellij ferme la connexion
settings = {
on_force_close = "detach"; # coupure = détache, ne tue rien
session_serialization = true; # restaure les sessions après reboot
default_mode = "locked"; # pas de conflit de raccourcis (Ctrl+g pour déverrouiller)
theme = "catppuccin-latte"; # ou "catppuccin-mocha"
default_layout = "compact"; # une seule barre, plus de place
pane_frames = false;
scroll_buffer_size = 50000;
copy_on_select = true;
show_startup_tips = false;
show_release_notes = false;
};
};
}
+1
View File
@@ -99,6 +99,7 @@
../../modules/home/zsh
../../modules/home/git
../../modules/home/ssh
../../modules/home/zellij
# ../../modules/home/gh
];
};
+36
View File
@@ -0,0 +1,36 @@
{ config, pkgs, lib, ... }:
{
services.postgresql = {
ensureDatabases = [ "oxicloud" ];
ensureUsers = [{
name = "oxicloud";
ensureDBOwnership = true;
}];
};
systemd.services.oxicloud = {
description = "OxiCloud";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" "postgresql.service" ];
requires = [ "postgresql.service" ];
serviceConfig = {
ExecStart = "${pkgs.oxicloud}/bin/oxicloud";
EnvironmentFile = config.sops.secrets.oxicloud_env.path;
# user transient nommé "oxicloud" -> auth peer sur le socket PG OK
DynamicUser = true;
User = "oxicloud";
StateDirectory = "oxicloud";
WorkingDirectory = "/var/lib/oxicloud";
# durcissement
ProtectSystem = "strict";
ProtectHome = true;
NoNewPrivileges = true;
Restart = "on-failure";
};
};
sops.secrets.oxicloud_env = { };
}
+7 -7
View File
@@ -54,12 +54,12 @@
# GRANT ALL PRIVILEGES ON DATABASE nextcloud TO nextcloud;
};
# services.postgresqlBackup = {
# enable = true;
# location = "/root/backup/nextcloud";
# databases = [ "nextcloud" ];
# # time to start backup in systemd.time format
# startAt = "*-*-* 5:00:00";
# };
services.postgresqlBackup = {
enable = true;
location = "/root/backup/nextcloud";
databases = [ "nextcloud" ];
# time to start backup in systemd.time format
startAt = "*-*-* 5:00:00";
};
}