More server prep
This commit is contained in:
parent
829459865c
commit
5f6e8ef364
17 changed files with 103 additions and 124 deletions
|
@ -1,6 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
users.groups.nfsShare = {
|
||||
gid = 983;
|
||||
};
|
||||
users.groups.nfsShare.gid = 983;
|
||||
}
|
||||
|
|
|
@ -12,13 +12,11 @@
|
|||
config = lib.mkIf config.system.lanzaboote.enable {
|
||||
boot = {
|
||||
loader.systemd-boot.enable = lib.mkForce false;
|
||||
|
||||
lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/etc/secureboot";
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [ sbctl ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
./bluetooth
|
||||
./boot
|
||||
./disks
|
||||
./firmware
|
||||
./networking
|
||||
./printing
|
||||
./udev
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
}
|
|
@ -1,7 +1,17 @@
|
|||
{ ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./oculus
|
||||
./pdp
|
||||
];
|
||||
services.udev = {
|
||||
packages = [
|
||||
(pkgs.writeTextFile {
|
||||
name = "10-oculus.rules";
|
||||
text = ''KERNEL=="hidraw*", ATTRS{idVendor}=="0e6f", ATTRS{idProduct}=="0184", MODE="0660", TAG+="uaccess"'';
|
||||
destination = "/etc/udev/rules.d/10-oculus.rules";
|
||||
})
|
||||
(pkgs.writeTextFile {
|
||||
name = "10-pdp.rules";
|
||||
text = ''SUBSYSTEM=="usb", ATTR{idVendor}=="2833", MODE="0666"'';
|
||||
destination = "/etc/udev/rules.d/10-pdp.rules";
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
services.udev = {
|
||||
packages = [
|
||||
(pkgs.writeTextFile {
|
||||
name = "10-oculus.rules";
|
||||
text = ''KERNEL=="hidraw*", ATTRS{idVendor}=="0e6f", ATTRS{idProduct}=="0184", MODE="0660", TAG+="uaccess"'';
|
||||
destination = "/etc/udev/rules.d/10-oculus.rules";
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
services.udev = {
|
||||
packages = [
|
||||
(pkgs.writeTextFile {
|
||||
name = "10-pdp.rules";
|
||||
text = ''SUBSYSTEM=="usb", ATTR{idVendor}=="2833", MODE="0666"'';
|
||||
destination = "/etc/udev/rules.d/10-pdp.rules";
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
|
@ -6,6 +6,6 @@
|
|||
settings.general.renice = 10;
|
||||
};
|
||||
|
||||
hardware.steam-hardware.enable = config.system.desktop.enable;
|
||||
hardware.steam-hardware.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{ config, ... }:
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
services = {
|
||||
services = lib.mkIf config.system.server.enable {
|
||||
samba = {
|
||||
enable = config.system.server.enable;
|
||||
enable = true;
|
||||
securityType = "user";
|
||||
openFirewall = true;
|
||||
settings = {
|
||||
|
@ -20,7 +20,7 @@
|
|||
|
||||
# Advertise to Windows
|
||||
samba-wsdd = {
|
||||
enable = config.services.samba.enable;
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,30 +1,32 @@
|
|||
{ pkgs, config, ... }:
|
||||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
services.liquidsoap.streams.jimbops = pkgs.writeText "liquidstream1" ''
|
||||
settings.log.stdout.set(true)
|
||||
settings.init.allow_root.set(true)
|
||||
settings.scheduler.fast_queues.set(2)
|
||||
|
||||
jimbops = mksafe(playlist(mode='randomize', reload=1, reload_mode="rounds", "/export/JimboNFS/Music/JimBops"))
|
||||
jimbops_fallback = fallback([jimbops, jimbops])
|
||||
|
||||
output.icecast(
|
||||
%ffmpeg(format="ogg", %audio(codec="libvorbis", samplerate=48000, b="256k", channels=2)),
|
||||
host="127.0.0.1",
|
||||
port=265,
|
||||
password="${config.secrets.castSourcePass}",
|
||||
encoding = "UTF-8",
|
||||
services.liquidsoap.streams = lib.mkIf config.services.icecast.enable {
|
||||
jimbops = pkgs.writeText "liquidstream1" ''
|
||||
settings.log.stdout.set(true)
|
||||
settings.init.allow_root.set(true)
|
||||
settings.scheduler.fast_queues.set(2)
|
||||
|
||||
jimbops = mksafe(playlist(mode='randomize', reload=1, reload_mode="rounds", "/export/JimboNFS/Music/JimBops"))
|
||||
jimbops_fallback = fallback([jimbops, jimbops])
|
||||
|
||||
output.icecast(
|
||||
%ffmpeg(format="ogg", %audio(codec="libvorbis", samplerate=48000, b="256k", channels=2)),
|
||||
host="127.0.0.1",
|
||||
port=265,
|
||||
password="${config.secrets.castSourcePass}",
|
||||
encoding = "UTF-8",
|
||||
|
||||
radio="JimBops Radio",
|
||||
genre = "Anything",
|
||||
description="Music gathered by me, Jimbo.",
|
||||
website="https://icecast.${config.domains.jim1}",
|
||||
url="https://icecast.${config.domains.jim1}/jimbops.opus",
|
||||
mount="jimbops.opus",
|
||||
icy_metadata=["artist", "title"],
|
||||
public=true,
|
||||
radio="JimBops Radio",
|
||||
genre = "Anything",
|
||||
description="Music gathered by me, Jimbo.",
|
||||
website="https://icecast.${config.domains.jim1}",
|
||||
url="https://icecast.${config.domains.jim1}/jimbops.opus",
|
||||
mount="jimbops.opus",
|
||||
icy_metadata=["artist", "title"],
|
||||
public=true,
|
||||
|
||||
jimbops_fallback
|
||||
)
|
||||
'';
|
||||
jimbops_fallback
|
||||
)
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,30 +1,32 @@
|
|||
{ pkgs, config, ... }:
|
||||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
services.liquidsoap.streams.jimscrapped = pkgs.writeText "liquidstream2" ''
|
||||
settings.log.stdout.set(true)
|
||||
settings.init.allow_root.set(true)
|
||||
settings.scheduler.fast_queues.set(2)
|
||||
|
||||
jimscrapped = mksafe(playlist(mode='randomize', reload=1, reload_mode="rounds", "/export/JimboNFS/Music/JimScrapped"))
|
||||
jimscrapped_fallback = fallback([jimscrapped, jimscrapped])
|
||||
|
||||
output.icecast(
|
||||
%ffmpeg(format="ogg", %audio(codec="libvorbis", samplerate=48000, b="256k", channels=2)),
|
||||
host="127.0.0.1",
|
||||
port=265,
|
||||
password="${config.secrets.castSourcePass}",
|
||||
encoding = "UTF-8",
|
||||
services.liquidsoap.streams = lib.mkIf config.services.icecast.enable {
|
||||
jimscrapped = pkgs.writeText "liquidstream2" ''
|
||||
settings.log.stdout.set(true)
|
||||
settings.init.allow_root.set(true)
|
||||
settings.scheduler.fast_queues.set(2)
|
||||
|
||||
jimscrapped = mksafe(playlist(mode='randomize', reload=1, reload_mode="rounds", "/export/JimboNFS/Music/JimScrapped"))
|
||||
jimscrapped_fallback = fallback([jimscrapped, jimscrapped])
|
||||
|
||||
output.icecast(
|
||||
%ffmpeg(format="ogg", %audio(codec="libvorbis", samplerate=48000, b="256k", channels=2)),
|
||||
host="127.0.0.1",
|
||||
port=265,
|
||||
password="${config.secrets.castSourcePass}",
|
||||
encoding = "UTF-8",
|
||||
|
||||
radio="Jimbo's Scrap",
|
||||
genre = "Scrapped",
|
||||
description="Music canned from the main radio.",
|
||||
website="https://icecast.${config.domains.jim1}",
|
||||
url="https://icecast.${config.domains.jim1}/jimscrapped.opus",
|
||||
mount="jimscrapped.opus",
|
||||
icy_metadata=["artist", "title"],
|
||||
public=true,
|
||||
radio="Jimbo's Scrap",
|
||||
genre = "Scrapped",
|
||||
description="Music canned from the main radio.",
|
||||
website="https://icecast.${config.domains.jim1}",
|
||||
url="https://icecast.${config.domains.jim1}/jimscrapped.opus",
|
||||
mount="jimscrapped.opus",
|
||||
icy_metadata=["artist", "title"],
|
||||
public=true,
|
||||
|
||||
jimscrapped_fallback
|
||||
)
|
||||
'';
|
||||
jimscrapped_fallback
|
||||
)
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
];
|
||||
|
||||
mailserver = rec {
|
||||
enable = true;
|
||||
enable = config.system.mailserver.enable;
|
||||
domains = [
|
||||
"${config.domains.jim1}"
|
||||
"${config.domains.jim2}"
|
||||
|
@ -25,7 +25,7 @@
|
|||
organizationName = "Jimbo's Files";
|
||||
};
|
||||
|
||||
# Passwords generated with 'mkpasswd -sm bcrypt'
|
||||
# Passwords made with 'mkpasswd -sm bcrypt'
|
||||
loginAccounts = {
|
||||
"noreply@${config.domains.jim1}" = {
|
||||
hashedPasswordFile = pkgs.writeText "noreply" config.secrets.noreplyMailHash;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."mx.${config.domains.jim1}" = {
|
||||
services.nginx.virtualHosts."mx.${config.domains.jim1}" = lib.mkIf config.mailserver.enable {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue