Compare commits
5 Commits
61391cc180
...
e37878c544
Author | SHA1 | Date | |
---|---|---|---|
e37878c544 | |||
73bbd39c64 | |||
acbf162ffe | |||
516121b26c | |||
8742352ea9 |
@ -57,6 +57,7 @@
|
|||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
openssh.authorizedKeys.keys = (import ./ssh.nix).users;
|
openssh.authorizedKeys.keys = (import ./ssh.nix).users;
|
||||||
hashedPassword = "$6$TuDO46rILr$gkPUuLKZe3psexhs8WFZMpzgEBGksE.c3Tjh1f8sD0KMC4oV89K2pqAABfl.Lpxu2jVdr5bgvR5cWnZRnji/r/";
|
hashedPassword = "$6$TuDO46rILr$gkPUuLKZe3psexhs8WFZMpzgEBGksE.c3Tjh1f8sD0KMC4oV89K2pqAABfl.Lpxu2jVdr5bgvR5cWnZRnji/r/";
|
||||||
|
uid = 1000;
|
||||||
};
|
};
|
||||||
nix.trustedUsers = [ "root" "googlebot" ];
|
nix.trustedUsers = [ "root" "googlebot" ];
|
||||||
|
|
||||||
|
@ -3,6 +3,11 @@
|
|||||||
let
|
let
|
||||||
system = (import ./ssh.nix).system;
|
system = (import ./ssh.nix).system;
|
||||||
in {
|
in {
|
||||||
|
networking.hosts = {
|
||||||
|
# some DNS providers filter local ip results from DNS request
|
||||||
|
"172.30.145.180" = [ "s0.zt.neet.dev" ];
|
||||||
|
};
|
||||||
|
|
||||||
programs.ssh.knownHosts = {
|
programs.ssh.knownHosts = {
|
||||||
liza = {
|
liza = {
|
||||||
hostNames = [ "liza" "liza.neet.dev" ];
|
hostNames = [ "liza" "liza.neet.dev" ];
|
||||||
|
@ -63,7 +63,7 @@ in {
|
|||||||
"fihnjjcciajhdojfnbdddfaoknhalnja" # I don't care about cookies
|
"fihnjjcciajhdojfnbdddfaoknhalnja" # I don't care about cookies
|
||||||
"mnjggcdmjocbbbhaepdhchncahnbgone" # SponsorBlock
|
"mnjggcdmjocbbbhaepdhchncahnbgone" # SponsorBlock
|
||||||
"dhdgffkkebhmkfjojejmpbldmpobfkfo" # Tampermonkey
|
"dhdgffkkebhmkfjojejmpbldmpobfkfo" # Tampermonkey
|
||||||
"ehpdicggenhgapiikfpnmppdonadlnmp" # Disable Scroll Jacking
|
# "ehpdicggenhgapiikfpnmppdonadlnmp" # Disable Scroll Jacking
|
||||||
];
|
];
|
||||||
extraOpts = {
|
extraOpts = {
|
||||||
"BrowserSignin" = 0;
|
"BrowserSignin" = 0;
|
||||||
|
@ -17,6 +17,7 @@ in {
|
|||||||
./discord.nix
|
./discord.nix
|
||||||
./steam.nix
|
./steam.nix
|
||||||
./touchpad.nix
|
./touchpad.nix
|
||||||
|
./mount-samba.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
options.de = {
|
options.de = {
|
||||||
|
36
common/pc/mount-samba.nix
Normal file
36
common/pc/mount-samba.nix
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# mounts the samba share on s0 over zeroteir
|
||||||
|
|
||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.services.mount-samba;
|
||||||
|
|
||||||
|
# prevents hanging on network split
|
||||||
|
network_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
|
||||||
|
|
||||||
|
user_opts = "uid=${toString config.users.users.googlebot.uid},file_mode=0660,dir_mode=0770,user";
|
||||||
|
auth_opts = "credentials=/run/agenix/smb-secrets";
|
||||||
|
version_opts = "vers=2.1";
|
||||||
|
|
||||||
|
opts = "${network_opts},${user_opts},${version_opts}";
|
||||||
|
in {
|
||||||
|
options.services.mount-samba = {
|
||||||
|
enable = lib.mkEnableOption "enable mounting samba shares";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf (cfg.enable && config.services.zerotierone.enable) {
|
||||||
|
fileSystems."/mnt/public" = {
|
||||||
|
device = "//s0.zt.neet.dev/public";
|
||||||
|
fsType = "cifs";
|
||||||
|
options = ["guest,${opts}"];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/mnt/private" = {
|
||||||
|
device = "//s0.zt.neet.dev/googlebot";
|
||||||
|
fsType = "cifs";
|
||||||
|
options = ["${auth_opts},${opts}"];
|
||||||
|
};
|
||||||
|
|
||||||
|
age.secrets.smb-secrets.file = ../../secrets/smb-secrets.age;
|
||||||
|
};
|
||||||
|
}
|
@ -24,18 +24,6 @@
|
|||||||
load printers = yes
|
load printers = yes
|
||||||
printing = cups
|
printing = cups
|
||||||
printcap name = cups
|
printcap name = cups
|
||||||
|
|
||||||
# encryption
|
|
||||||
server smb encrypt = desired
|
|
||||||
|
|
||||||
# gotta go fast https://wiki.archlinux.org/title/Samba#Improve_throughput
|
|
||||||
server multi channel support = yes
|
|
||||||
deadtime = 30
|
|
||||||
use sendfile = yes
|
|
||||||
min receivefile size = 16384
|
|
||||||
aio read size = 1
|
|
||||||
aio write size = 1
|
|
||||||
socket options = IPTOS_LOWDELAY TCP_NODELAY IPTOS_THROUGHPUT SO_RCVBUF=131072 SO_SNDBUF=131072
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
shares = {
|
shares = {
|
||||||
@ -49,16 +37,28 @@
|
|||||||
"force user" = "public_data";
|
"force user" = "public_data";
|
||||||
"force group" = "public_data";
|
"force group" = "public_data";
|
||||||
};
|
};
|
||||||
private = {
|
googlebot = {
|
||||||
path = "/data/samba/Private";
|
path = "/data/samba/googlebot";
|
||||||
browseable = "yes";
|
browseable = "yes";
|
||||||
"read only" = "no";
|
"read only" = "no";
|
||||||
"guest ok" = "no";
|
"guest ok" = "no";
|
||||||
|
"valid users" = "googlebot";
|
||||||
"create mask" = "0644";
|
"create mask" = "0644";
|
||||||
"directory mask" = "0755";
|
"directory mask" = "0755";
|
||||||
"force user" = "googlebot";
|
"force user" = "googlebot";
|
||||||
"force group" = "users";
|
"force group" = "users";
|
||||||
};
|
};
|
||||||
|
cris = {
|
||||||
|
path = "/data/samba/cris";
|
||||||
|
browseable = "yes";
|
||||||
|
"read only" = "no";
|
||||||
|
"guest ok" = "no";
|
||||||
|
"valid users" = "cris";
|
||||||
|
"create mask" = "0644";
|
||||||
|
"directory mask" = "0755";
|
||||||
|
"force user" = "root";
|
||||||
|
"force group" = "users";
|
||||||
|
};
|
||||||
printers = {
|
printers = {
|
||||||
comment = "All Printers";
|
comment = "All Printers";
|
||||||
path = "/var/spool/samba";
|
path = "/var/spool/samba";
|
||||||
|
@ -49,6 +49,8 @@
|
|||||||
|
|
||||||
services.zerotierone.enable = true;
|
services.zerotierone.enable = true;
|
||||||
|
|
||||||
|
services.mount-samba.enable = true;
|
||||||
|
|
||||||
de.enable = true;
|
de.enable = true;
|
||||||
de.touchpad.enable = true;
|
de.touchpad.enable = true;
|
||||||
}
|
}
|
||||||
|
@ -173,6 +173,15 @@
|
|||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
pykms = prev.pykms.overrideAttrs (old: {
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "Py-KMS-Organization";
|
||||||
|
repo = "py-kms";
|
||||||
|
rev = "7bea3a2cb03c4c3666ff41185ace9f7ea2a07b99";
|
||||||
|
sha256 = "90DqMqPjfqfyRq86UzG9B/TjY+yclJBlggw+eIDgRe0=";
|
||||||
|
};
|
||||||
|
});
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -17,4 +17,5 @@ in
|
|||||||
"spotifyd.age".publicKeys = all;
|
"spotifyd.age".publicKeys = all;
|
||||||
"wolframalpha.age".publicKeys = all;
|
"wolframalpha.age".publicKeys = all;
|
||||||
"cloudflared-navidrome.json.age".publicKeys = all;
|
"cloudflared-navidrome.json.age".publicKeys = all;
|
||||||
|
"smb-secrets.age".publicKeys = all;
|
||||||
}
|
}
|
||||||
|
BIN
secrets/smb-secrets.age
Normal file
BIN
secrets/smb-secrets.age
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user