More server prep

This commit is contained in:
Jimbo 2024-12-22 22:02:10 -05:00
parent 829459865c
commit 5f6e8ef364
17 changed files with 103 additions and 124 deletions

View file

@ -6,7 +6,7 @@
}; };
config.look.fonts = { config.look.fonts = {
main = ''Ubuntu''; main = "Ubuntu";
nerd = ''UbuntuMono Nerd Font''; nerd = "UbuntuMono Nerd Font";
}; };
} }

View file

@ -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";
}; };
} }

View file

@ -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";
}; };
} }

View file

@ -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'';
}; };
} }

View file

@ -1,6 +1,4 @@
{ ... }: { ... }:
{ {
users.groups.nfsShare = { users.groups.nfsShare.gid = 983;
gid = 983;
};
} }

View file

@ -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 ];
}; };
} }

View file

@ -5,7 +5,6 @@
./bluetooth ./bluetooth
./boot ./boot
./disks ./disks
./firmware
./networking ./networking
./printing ./printing
./udev ./udev

View file

@ -1,4 +0,0 @@
{ ... }:
{
hardware.enableRedistributableFirmware = true;
}

View file

@ -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";
})
]; ];
};
} }

View file

@ -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";
})
];
};
}

View file

@ -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";
})
];
};
}

View file

@ -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;
}; };
} }

View file

@ -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;
}; };
}; };

View file

@ -1,6 +1,7 @@
{ pkgs, config, ... }: { pkgs, lib, config, ... }:
{ {
services.liquidsoap.streams.jimbops = pkgs.writeText "liquidstream1" '' services.liquidsoap.streams = lib.mkIf config.services.icecast.enable {
jimbops = pkgs.writeText "liquidstream1" ''
settings.log.stdout.set(true) settings.log.stdout.set(true)
settings.init.allow_root.set(true) settings.init.allow_root.set(true)
settings.scheduler.fast_queues.set(2) settings.scheduler.fast_queues.set(2)
@ -27,4 +28,5 @@
jimbops_fallback jimbops_fallback
) )
''; '';
};
} }

View file

@ -1,6 +1,7 @@
{ pkgs, config, ... }: { pkgs, lib, config, ... }:
{ {
services.liquidsoap.streams.jimscrapped = pkgs.writeText "liquidstream2" '' services.liquidsoap.streams = lib.mkIf config.services.icecast.enable {
jimscrapped = pkgs.writeText "liquidstream2" ''
settings.log.stdout.set(true) settings.log.stdout.set(true)
settings.init.allow_root.set(true) settings.init.allow_root.set(true)
settings.scheduler.fast_queues.set(2) settings.scheduler.fast_queues.set(2)
@ -27,4 +28,5 @@
jimscrapped_fallback jimscrapped_fallback
) )
''; '';
};
} }

View file

@ -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;

View file

@ -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."/" = {