reworks dnsc-server
This commit is contained in:
parent
062c286cd2
commit
f6c26e53d2
4 changed files with 90 additions and 90 deletions
39
modules/restic/default.nix
Normal file
39
modules/restic/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
# Root SSH
|
||||
programs.ssh = {
|
||||
extraConfig = ''
|
||||
Host dnsc-storage
|
||||
AddKeysToAgent yes
|
||||
Hostname u295965.your-storagebox.de
|
||||
User u295965
|
||||
IdentityFile /root/.ssh/id_ed25519
|
||||
IdentitiesOnly yes
|
||||
Port 23
|
||||
'';
|
||||
};
|
||||
|
||||
services.restic.backups = {
|
||||
"dnsc-storage" = {
|
||||
initialize = true;
|
||||
passwordFile = config.age.secrets."restic/password".path;
|
||||
repository = "sftp:dnsc-storage:restic/dnsc-server";
|
||||
paths = [
|
||||
"/home/dennis/notes"
|
||||
"/main/share"
|
||||
];
|
||||
pruneOpts = [
|
||||
"--keep-last 3"
|
||||
];
|
||||
timerConfig = {
|
||||
onCalendar = "daily";
|
||||
Persistent = true;
|
||||
RandomizedDelaySec = "5h";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
45
modules/samba/default.nix
Normal file
45
modules/samba/default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
# Samba
|
||||
services.samba = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
settings = {
|
||||
global = {
|
||||
"workgroup" = "WORKGROUP";
|
||||
"security" = "user";
|
||||
#"use sendfile" = "yes";
|
||||
#"max protocol" = "smb2";
|
||||
# note: localhost is the ipv6 localhost ::1
|
||||
"hosts allow" = "192.168.178. 127.0.0.1 localhost";
|
||||
"hosts deny" = "0.0.0.0/0";
|
||||
"guest account" = "nobody";
|
||||
"map to guest" = "bad user";
|
||||
};
|
||||
"share" = {
|
||||
"path" = "/main/share";
|
||||
"browseable" = "yes";
|
||||
"writeable" = "yes";
|
||||
"read only" = "no";
|
||||
"guest ok" = "yes";
|
||||
"force user" = "dennis";
|
||||
"force group" = "users";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.samba-wsdd = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
services.avahi = {
|
||||
publish.enable = true;
|
||||
publish.userServices = true;
|
||||
nssmdns4 = true;
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -40,8 +40,8 @@
|
|||
set -g status-left ""
|
||||
set -g status-right "#[bg=default,fg=magenta]>> #S << #[bg=default,fg=white]#H "
|
||||
set -g window-status-current-style bg=default,fg=magenta,bold
|
||||
set-window-option -g window-status-format " [#I] #W#F "
|
||||
set-window-option -g window-status-current-format " [#I] #W#F "
|
||||
set-window-option -g window-status-format " [#I] #W#F "
|
||||
set-window-option -g window-status-current-format " [#I] #W#F "
|
||||
set -g pane-border-style fg=#807c9f
|
||||
set -g pane-active-border-style fg=magenta
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue