i love burning electricity
This commit is contained in:
parent
a02bdad904
commit
1e750a8968
2 changed files with 80 additions and 28 deletions
|
@ -39,6 +39,7 @@
|
||||||
modules.garage.enable = true;
|
modules.garage.enable = true;
|
||||||
modules.forgejo.enable = true;
|
modules.forgejo.enable = true;
|
||||||
modules.immich.enable = true;
|
modules.immich.enable = true;
|
||||||
|
modules.monero.enable = true;
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# NETWORKING
|
# NETWORKING
|
||||||
|
@ -147,7 +148,7 @@
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"d /storage/immich 0755 immich immich -"
|
"d /storage/immich 0755 immich immich -"
|
||||||
"d /storage/immich/photos 0755 immich immich -"
|
"d /storage/immich/photos 0755 immich immich -"
|
||||||
"Z /storage/immich 0755 immich immich -" # Recursively fix ownership of existing files
|
"Z /storage/immich 0755 immich immich -"
|
||||||
];
|
];
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
@ -160,44 +161,53 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
services.samba = {
|
|
||||||
|
services.samba = {
|
||||||
enable = true;
|
enable = true;
|
||||||
securityType = "user";
|
enableNmbd = false;
|
||||||
settings = {
|
enableWinbindd = false;
|
||||||
global = {
|
|
||||||
"workgroup" = "WORKGROUP";
|
settings = {
|
||||||
"server string" = "smbnix";
|
global = {
|
||||||
"netbios name" = "smbnix";
|
"guest account" = "regent";
|
||||||
"security" = "user";
|
"map to guest" = "Bad User";
|
||||||
"hosts allow" = "100.64. 10.0.0. 127.0.0.1 localhost";
|
"load printers" = "no";
|
||||||
"hosts deny" = "0.0.0.0/0";
|
"printcap name" = "/dev/null";
|
||||||
"guest account" = "nobody";
|
"log file" = "/var/log/samba/client.%I";
|
||||||
"map to guest" = "bad user";
|
"log level" = "2";
|
||||||
"guest ok" = "yes";
|
|
||||||
"public" = "yes";
|
|
||||||
};
|
|
||||||
"storage" = {
|
|
||||||
"path" = "/storage";
|
|
||||||
"browseable" = "yes";
|
|
||||||
"read only" = "no";
|
|
||||||
"guest ok" = "yes";
|
|
||||||
"public" = "yes";
|
|
||||||
"force user" = "nobody";
|
|
||||||
"force group" = "nogroup";
|
|
||||||
"create mask" = "0666";
|
|
||||||
"directory mask" = "0777";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
shares = {
|
||||||
|
nas = {
|
||||||
|
"path" = "/storage";
|
||||||
|
"guest ok" = "yes";
|
||||||
|
"read only" = "no";
|
||||||
|
"public" = "yes";
|
||||||
|
"writable" = "yes";
|
||||||
|
"force user" = "regent";
|
||||||
|
"force group" = "users";
|
||||||
|
"create mask" = "0777";
|
||||||
|
"directory mask" = "0777";
|
||||||
|
"force create mode" = "0777";
|
||||||
|
"force directory mode" = "0777";
|
||||||
|
"security mask" = "0777";
|
||||||
|
"force security mode" = "0777";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
services.samba-wsdd = {
|
services.samba-wsdd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
discovery = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
|
extraOptions = [
|
||||||
|
"--verbose"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.avahi = {
|
services.avahi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
nssmdns = true;
|
nssmdns4 = true;
|
||||||
publish = {
|
publish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
addresses = true;
|
addresses = true;
|
||||||
|
|
42
modules/monero/default.nix
Normal file
42
modules/monero/default.nix
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.modules.monero;
|
||||||
|
|
||||||
|
#TODO make this configurable through nix
|
||||||
|
address = "46Ev6Vk4QeQZTr14tRjksTT2VPhi4jKB48mGz31rpUUci2Bvg9PHZj9GLK3VceWDc13tkUbzmqQz8eKR3hkD9bUKFKHLrzg";
|
||||||
|
dataDir = "/storage/monero";
|
||||||
|
miningThreads = 6;
|
||||||
|
user = "regent";
|
||||||
|
password = "AnRPCPasswordChangedImperatively";
|
||||||
|
rpcAddress = "10.0.0.30";
|
||||||
|
rpcPort = 18081;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
modules = {
|
||||||
|
monero = {
|
||||||
|
enable = mkEnableOption "Deploy monero node";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services.monero = {
|
||||||
|
enable = true;
|
||||||
|
dataDir = dataDir;
|
||||||
|
rpc = {
|
||||||
|
user = user;
|
||||||
|
password = password;
|
||||||
|
address = rpcAddress;
|
||||||
|
port = rpcPort;
|
||||||
|
};
|
||||||
|
mining = {
|
||||||
|
enable = true;
|
||||||
|
threads = miningThreads;
|
||||||
|
address = address;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue