zellij
This commit is contained in:
@@ -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;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -99,6 +99,7 @@
|
||||
../../modules/home/zsh
|
||||
../../modules/home/git
|
||||
../../modules/home/ssh
|
||||
../../modules/home/zellij
|
||||
# ../../modules/home/gh
|
||||
];
|
||||
};
|
||||
|
||||
@@ -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 = { };
|
||||
}
|
||||
@@ -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";
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user