More server prep
This commit is contained in:
parent
829459865c
commit
5f6e8ef364
|
@ -6,7 +6,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
config.look.fonts = {
|
config.look.fonts = {
|
||||||
main = ''Ubuntu'';
|
main = "Ubuntu";
|
||||||
nerd = ''UbuntuMono Nerd Font'';
|
nerd = "UbuntuMono Nerd Font";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,24 +6,24 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
config.ws = {
|
config.ws = {
|
||||||
w0 = ''0'';
|
w0 = "0";
|
||||||
w1 = ''1'';
|
w1 = "1";
|
||||||
w2 = ''2'';
|
w2 = "2";
|
||||||
w3 = ''3'';
|
w3 = "3";
|
||||||
w4 = ''4'';
|
w4 = "4";
|
||||||
w5 = ''5'';
|
w5 = "5";
|
||||||
w6 = ''6'';
|
w6 = "6";
|
||||||
w7 = ''7'';
|
w7 = "7";
|
||||||
w8 = ''8'';
|
w8 = "8";
|
||||||
w9 = ''9'';
|
w9 = "9";
|
||||||
w1a = ''I'';
|
w1a = "I";
|
||||||
w2a = ''II'';
|
w2a = "II";
|
||||||
w3a = ''III'';
|
w3a = "III";
|
||||||
w4a = ''IV'';
|
w4a = "IV";
|
||||||
w5a = ''V'';
|
w5a = "V";
|
||||||
w6a = ''VI'';
|
w6a = "VI";
|
||||||
w7a = ''VII'';
|
w7a = "VII";
|
||||||
w8a = ''VIII'';
|
w8a = "VIII";
|
||||||
w9a = ''IX'';
|
w9a = "IX";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
".face".source = ./assets/pfp.png;
|
".face".source = ./assets/pfp.png;
|
||||||
".assets/wallpapers".source = ./assets/wallpapers;
|
".assets/wallpapers".source = ./assets/wallpapers;
|
||||||
".assets/lockscreen".source = ./assets/lockscreen;
|
".assets/lockscreen".source = ./assets/lockscreen;
|
||||||
".alsoftrc".text = ''drivers=pulse'';
|
".alsoftrc".text = "drivers=pulse";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,13 +15,11 @@
|
||||||
# Shortcuts
|
# Shortcuts
|
||||||
ff = "clear && fastfetch";
|
ff = "clear && fastfetch";
|
||||||
ip = "ip -c";
|
ip = "ip -c";
|
||||||
|
rm = "trash-rm";
|
||||||
ls = "${pkgs.eza}/bin/eza -a --color=always --group-directories-first --icons";
|
ls = "${pkgs.eza}/bin/eza -a --color=always --group-directories-first --icons";
|
||||||
cat = "${pkgs.bat}/bin/bat --paging never";
|
cat = "${pkgs.bat}/bin/bat --paging never";
|
||||||
copycat = "wl-copy <";
|
copycat = "wl-copy <";
|
||||||
myip = "curl ifconfig.co";
|
myip = "curl ifconfig.co";
|
||||||
seneca = "ssh jhampton1@matrix.senecapolytechnic.ca";
|
seneca = "ssh jhampton1@matrix.senecapolytechnic.ca";
|
||||||
|
|
||||||
# Deny
|
|
||||||
rm = ''echo "Use trash."; false'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
users.groups.nfsShare = {
|
users.groups.nfsShare.gid = 983;
|
||||||
gid = 983;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,13 +12,11 @@
|
||||||
config = lib.mkIf config.system.lanzaboote.enable {
|
config = lib.mkIf config.system.lanzaboote.enable {
|
||||||
boot = {
|
boot = {
|
||||||
loader.systemd-boot.enable = lib.mkForce false;
|
loader.systemd-boot.enable = lib.mkForce false;
|
||||||
|
|
||||||
lanzaboote = {
|
lanzaboote = {
|
||||||
enable = true;
|
enable = true;
|
||||||
pkiBundle = "/etc/secureboot";
|
pkiBundle = "/etc/secureboot";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [ sbctl ];
|
environment.systemPackages = with pkgs; [ sbctl ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
./bluetooth
|
./bluetooth
|
||||||
./boot
|
./boot
|
||||||
./disks
|
./disks
|
||||||
./firmware
|
|
||||||
./networking
|
./networking
|
||||||
./printing
|
./printing
|
||||||
./udev
|
./udev
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
hardware.enableRedistributableFirmware = true;
|
|
||||||
}
|
|
|
@ -1,7 +1,17 @@
|
||||||
{ ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
services.udev = {
|
||||||
./oculus
|
packages = [
|
||||||
./pdp
|
(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;
|
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 = {
|
samba = {
|
||||||
enable = config.system.server.enable;
|
enable = true;
|
||||||
securityType = "user";
|
securityType = "user";
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
# Advertise to Windows
|
# Advertise to Windows
|
||||||
samba-wsdd = {
|
samba-wsdd = {
|
||||||
enable = config.services.samba.enable;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,30 +1,32 @@
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
{
|
{
|
||||||
services.liquidsoap.streams.jimbops = pkgs.writeText "liquidstream1" ''
|
services.liquidsoap.streams = lib.mkIf config.services.icecast.enable {
|
||||||
settings.log.stdout.set(true)
|
jimbops = pkgs.writeText "liquidstream1" ''
|
||||||
settings.init.allow_root.set(true)
|
settings.log.stdout.set(true)
|
||||||
settings.scheduler.fast_queues.set(2)
|
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 = mksafe(playlist(mode='randomize', reload=1, reload_mode="rounds", "/export/JimboNFS/Music/JimBops"))
|
||||||
jimbops_fallback = fallback([jimbops, jimbops])
|
jimbops_fallback = fallback([jimbops, jimbops])
|
||||||
|
|
||||||
output.icecast(
|
output.icecast(
|
||||||
%ffmpeg(format="ogg", %audio(codec="libvorbis", samplerate=48000, b="256k", channels=2)),
|
%ffmpeg(format="ogg", %audio(codec="libvorbis", samplerate=48000, b="256k", channels=2)),
|
||||||
host="127.0.0.1",
|
host="127.0.0.1",
|
||||||
port=265,
|
port=265,
|
||||||
password="${config.secrets.castSourcePass}",
|
password="${config.secrets.castSourcePass}",
|
||||||
encoding = "UTF-8",
|
encoding = "UTF-8",
|
||||||
|
|
||||||
radio="JimBops Radio",
|
radio="JimBops Radio",
|
||||||
genre = "Anything",
|
genre = "Anything",
|
||||||
description="Music gathered by me, Jimbo.",
|
description="Music gathered by me, Jimbo.",
|
||||||
website="https://icecast.${config.domains.jim1}",
|
website="https://icecast.${config.domains.jim1}",
|
||||||
url="https://icecast.${config.domains.jim1}/jimbops.opus",
|
url="https://icecast.${config.domains.jim1}/jimbops.opus",
|
||||||
mount="jimbops.opus",
|
mount="jimbops.opus",
|
||||||
icy_metadata=["artist", "title"],
|
icy_metadata=["artist", "title"],
|
||||||
public=true,
|
public=true,
|
||||||
|
|
||||||
jimbops_fallback
|
jimbops_fallback
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,30 +1,32 @@
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
{
|
{
|
||||||
services.liquidsoap.streams.jimscrapped = pkgs.writeText "liquidstream2" ''
|
services.liquidsoap.streams = lib.mkIf config.services.icecast.enable {
|
||||||
settings.log.stdout.set(true)
|
jimscrapped = pkgs.writeText "liquidstream2" ''
|
||||||
settings.init.allow_root.set(true)
|
settings.log.stdout.set(true)
|
||||||
settings.scheduler.fast_queues.set(2)
|
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 = mksafe(playlist(mode='randomize', reload=1, reload_mode="rounds", "/export/JimboNFS/Music/JimScrapped"))
|
||||||
jimscrapped_fallback = fallback([jimscrapped, jimscrapped])
|
jimscrapped_fallback = fallback([jimscrapped, jimscrapped])
|
||||||
|
|
||||||
output.icecast(
|
output.icecast(
|
||||||
%ffmpeg(format="ogg", %audio(codec="libvorbis", samplerate=48000, b="256k", channels=2)),
|
%ffmpeg(format="ogg", %audio(codec="libvorbis", samplerate=48000, b="256k", channels=2)),
|
||||||
host="127.0.0.1",
|
host="127.0.0.1",
|
||||||
port=265,
|
port=265,
|
||||||
password="${config.secrets.castSourcePass}",
|
password="${config.secrets.castSourcePass}",
|
||||||
encoding = "UTF-8",
|
encoding = "UTF-8",
|
||||||
|
|
||||||
radio="Jimbo's Scrap",
|
radio="Jimbo's Scrap",
|
||||||
genre = "Scrapped",
|
genre = "Scrapped",
|
||||||
description="Music canned from the main radio.",
|
description="Music canned from the main radio.",
|
||||||
website="https://icecast.${config.domains.jim1}",
|
website="https://icecast.${config.domains.jim1}",
|
||||||
url="https://icecast.${config.domains.jim1}/jimscrapped.opus",
|
url="https://icecast.${config.domains.jim1}/jimscrapped.opus",
|
||||||
mount="jimscrapped.opus",
|
mount="jimscrapped.opus",
|
||||||
icy_metadata=["artist", "title"],
|
icy_metadata=["artist", "title"],
|
||||||
public=true,
|
public=true,
|
||||||
|
|
||||||
jimscrapped_fallback
|
jimscrapped_fallback
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
mailserver = rec {
|
mailserver = rec {
|
||||||
enable = true;
|
enable = config.system.mailserver.enable;
|
||||||
domains = [
|
domains = [
|
||||||
"${config.domains.jim1}"
|
"${config.domains.jim1}"
|
||||||
"${config.domains.jim2}"
|
"${config.domains.jim2}"
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
organizationName = "Jimbo's Files";
|
organizationName = "Jimbo's Files";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Passwords generated with 'mkpasswd -sm bcrypt'
|
# Passwords made with 'mkpasswd -sm bcrypt'
|
||||||
loginAccounts = {
|
loginAccounts = {
|
||||||
"noreply@${config.domains.jim1}" = {
|
"noreply@${config.domains.jim1}" = {
|
||||||
hashedPasswordFile = pkgs.writeText "noreply" config.secrets.noreplyMailHash;
|
hashedPasswordFile = pkgs.writeText "noreply" config.secrets.noreplyMailHash;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
services.nginx.virtualHosts."mx.${config.domains.jim1}" = {
|
services.nginx.virtualHosts."mx.${config.domains.jim1}" = lib.mkIf config.mailserver.enable {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
|
|
Loading…
Reference in a new issue