Commit a316412e authored by Naoki OKAMURA's avatar Naoki OKAMURA

updated: disable restic and smb services

parent 04b078dd
......@@ -34,20 +34,13 @@
# -------
networking.hostId = "71ca914d";
networking.hostName = "NyXPS15";
networking.wireless = {
enable = true;
networks = {
dummary = {};
};
};
# Firewall
# --------
networking.firewall = {
enable = true;
allowedTCPPorts = [ 445 139 19000 58080 ];
allowedUDPPorts = [ 137 138 5353 19000 ];
allowedTCPPorts = [ 53 19000 58080 17500 ];
allowedUDPPorts = [ 53 5353 19000 17500 ];
};
# Auto Discovery
......@@ -95,67 +88,63 @@
# file sharing
# ------------
services.samba = {
enable = true;
package = pkgs.samba4;
securityType = "user";
extraConfig = ''
interfaces = 192.168.122.0/24 localhost
workgroup = WORKGROUP
server string = NyXPS15
netbios name = NYXPS15
hosts deny = 0.0.0.0/0
hosts allow = 192.168.122. localhost
guest account = nobody
map to guest = bad user
'';
shares = {
data = {
"path" = "/data";
"browsable" = "Yes";
"read only" = "No";
"create mask" = "0600";
"directory mask" = "0700";
"force user" = "nyarla";
"force group" = "users";
"acl allow execute always" = "Yes";
};
};
};
# ssh
# ---
programs.ssh.startAgent = true;
# services.samba = {
# enable = true;
# package = pkgs.samba4;
# securityType = "user";
# extraConfig = ''
# interfaces = 192.168.122.0/24 localhost
# workgroup = WORKGROUP
# server string = NyXPS15
# netbios name = NYXPS15
# hosts deny = 0.0.0.0/0
# hosts allow = 192.168.122. localhost
# guest account = nobody
# map to guest = bad user
# '';
# shares = {
# data = {
# "path" = "/data";
# "browsable" = "Yes";
# "read only" = "No";
# "create mask" = "0600";
# "directory mask" = "0700";
# "force user" = "nyarla";
# "force group" = "users";
# "acl allow execute always" = "Yes";
# };
# };
# };
# backup via restic
# -----------------
systemd.services.restic = {
enable = true;
description = "Automatic backup service via restic";
unitConfig = {
"RefuseManualStart" = "no";
"RefuseManualStop" = "yes";
};
serviceConfig = {
"Type" = "oneshot";
"ExecStart" = "${pkgs.zsh}/bin/zsh /etc/nixos/scripts/backup";
"User" = "nyarla";
"Group" = "users";
};
path = with pkgs; [
rsync restic zsh coreutils
];
};
systemd.timers.restic = {
enable = true;
description = "Automatic backup timer via restic";
wantedBy = [ "timer.target" "network.target" "mult-user.target" ];
timerConfig = {
"OnCalendar" = "*-*-* 01:00:00";
"Persistent" = "true";
};
};
# systemd.services.restic = {
# enable = true;
# description = "Automatic backup service via restic";
# unitConfig = {
# "RefuseManualStart" = "no";
# "RefuseManualStop" = "yes";
# };
# serviceConfig = {
# "Type" = "oneshot";
# "ExecStart" = "${pkgs.zsh}/bin/zsh /etc/nixos/scripts/backup";
# "User" = "nyarla";
# "Group" = "users";
# };
# path = with pkgs; [
# rsync restic zsh coreutils
# ];
# };
# systemd.timers.restic = {
# enable = true;
# description = "Automatic backup timer via restic";
# wantedBy = [ "timer.target" "network.target" "mult-user.target" ];
# timerConfig = {
# "OnCalendar" = "*-*-* 01:00:00";
# "Persistent" = "true";
# };
# };
# Resilio Sync
# ------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment