Add smtp to pretty much every service on the server
This commit is contained in:
parent
8eb0724768
commit
963e056b93
7 changed files with 277 additions and 93 deletions
|
@ -67,10 +67,11 @@ in
|
|||
# Set all boot options
|
||||
boot = {
|
||||
# Set a kernel version and load/blacklist drivers
|
||||
kernelPackages = pkgs.linuxPackages_xanmod_latest;
|
||||
kernelPackages = pkgs.unstable.linuxPackages_zen;
|
||||
blacklistedKernelModules = [ "pcspkr" ];
|
||||
kernelParams = commonKernelParams ++ [ "vfio-pci.ids=10de:13c2,10de:0fbb" ];
|
||||
initrd.kernelModules = [ "vfio" "vfio_pci" "vfio_iommu_type1" ];
|
||||
kernel.sysctl."vm.max_map_count" = 2147483642;
|
||||
|
||||
# Manage supported filesystems
|
||||
supportedFilesystems = {
|
||||
|
@ -101,7 +102,12 @@ in
|
|||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
# Enable the Nouveau drivers
|
||||
services.xserver.videoDrivers = [ "nouveau" ];
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
nvidiaSettings = false;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
};
|
||||
|
||||
# Enable a permissioning system
|
||||
security = {
|
||||
|
@ -124,18 +130,21 @@ in
|
|||
# Timezone
|
||||
time.timeZone = "America/New_York";
|
||||
|
||||
# Define a user account
|
||||
# Define user accounts
|
||||
users.users.jimbo = {
|
||||
description = "Jimbo Awesome";
|
||||
isNormalUser = true;
|
||||
hashedPassword =
|
||||
"$6$gYpE.pG/zPXgin06$2kydjDfd0K62Dhf9P0PFvJhRNz6xIC/bHYaf/XYqyKcLyZNzPQpy8uy9tCRcSYlj1wwBhzVtTRyItwajOHCEj0";
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIKC8Uqxb09V3msBgDv6lD/nETMYr/X0OgtpDo8ldcMK jimbo@JimDebianServer"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDLe/HioxCOkszFQdm1vb3ZwuzLzsOThqHNvEI4IXeXZ JimPhone"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEuCYrIZlD6LNpFh3XTYbXaPQWYysr1oZAX4DL3gF28l jimbo@DV-JHAMPTON"
|
||||
];
|
||||
extraGroups = [
|
||||
"wheel" "audio" "video" "input" "disk" "dialout"
|
||||
"networkmanager" "kvm" "libvirtd" "qemu-libvirtd"
|
||||
"wheel" "audio" "video" "input" "disk"
|
||||
"dialout" "networkmanager" "rtkit"
|
||||
"kvm" "libvirtd" "qemu-libvirtd"
|
||||
];
|
||||
uid = 1000;
|
||||
shell = pkgs.zsh;
|
||||
|
@ -163,8 +172,6 @@ in
|
|||
# Enable OpenGL
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
package = pkgs.unstable.mesa.drivers;
|
||||
package32 = pkgs.unstable.pkgsi686Linux.mesa.drivers;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
|
@ -204,14 +211,18 @@ in
|
|||
];
|
||||
allowPing = false;
|
||||
};
|
||||
extraHosts = ''
|
||||
192.168.1.18 pc
|
||||
192.168.1.17 server
|
||||
192.168.2.2 vm
|
||||
'';
|
||||
|
||||
# Set hostnames
|
||||
hosts = {
|
||||
"192.168.2.10" = [ "pc" ];
|
||||
"192.168.2.11" = [ "server" ];
|
||||
"172.16.0.2" = [ "vm" ];
|
||||
};
|
||||
|
||||
# Set nameserver
|
||||
nameservers = [
|
||||
"1.1.1.1"
|
||||
"9.9.9.9"
|
||||
"1.1.1.1"
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -242,7 +253,7 @@ in
|
|||
pdpRules = pkgs.writeTextFile {
|
||||
name = "10-pdp.rules";
|
||||
text = ''
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="2833", MODE="0666", GROUP="plugdev"
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="2833", MODE="0666"
|
||||
'';
|
||||
destination = "/etc/udev/rules.d/10-pdp.rules";
|
||||
};
|
||||
|
@ -390,6 +401,9 @@ in
|
|||
# Enable AppArmor
|
||||
security.apparmor.enable = true;
|
||||
|
||||
# Enable a keying agent
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
|
||||
# Enable Polkit for authentication
|
||||
security.polkit.enable = true;
|
||||
|
||||
|
@ -402,7 +416,7 @@ in
|
|||
# Attempt to automount USB drives
|
||||
services.udisks2.enable = true;
|
||||
|
||||
# Used for Seneca VPN
|
||||
# Enable school VPN
|
||||
services.globalprotect.enable = true;
|
||||
|
||||
# Define the initial install version and allow auto-upgrades
|
||||
|
|
|
@ -54,8 +54,8 @@
|
|||
};
|
||||
"/home/jimbo/JimboNFS" = {
|
||||
device = "server:/export/JimboNFS";
|
||||
fsType = "nfs";
|
||||
options = [ "nofail" ];
|
||||
fsType = "nfs4";
|
||||
options = [ "x-systemd.automount" "_netdev" "noauto" ];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
47
PC/jimbo.nix
47
PC/jimbo.nix
|
@ -95,7 +95,7 @@ let
|
|||
export __GLX_VENDOR_LIBRARY_NAME=nvidia
|
||||
export WLR_NO_HARDWARE_CURSORS=1
|
||||
else
|
||||
export WLR_RENDERER=vulkan
|
||||
:
|
||||
fi
|
||||
|
||||
# Sway/Wayland
|
||||
|
@ -1153,9 +1153,7 @@ let
|
|||
P:/home/jimbo/JimboNFS/Projects
|
||||
V:/home/jimbo/JimboNFS/Videos/Random
|
||||
m:/home/jimbo/JimboNFS/Music
|
||||
L:/home/jimbo/JimboNFS/MineServers
|
||||
s:/home/jimbo/JimboNFS/School
|
||||
N:/home/jimbo/JimboNFS/JimboOS/NixOS
|
||||
'';
|
||||
|
||||
# Sunshine apps config
|
||||
|
@ -1186,6 +1184,12 @@ let
|
|||
drivers=pulse
|
||||
'';
|
||||
|
||||
# Ncmpcpp configuration
|
||||
ncmpcppConf = ''
|
||||
browser_sort_mode = "name"
|
||||
user_interface = "alternative"
|
||||
'';
|
||||
|
||||
# FireFox/LibreWolf colors
|
||||
foxJimCol = ''
|
||||
:root {
|
||||
|
@ -1549,12 +1553,14 @@ in
|
|||
# Install user programs
|
||||
home.packages = (with pkgs; [
|
||||
# Useful programs
|
||||
rofi-bluetooth bemoji imv qbittorrent libreoffice-fresh
|
||||
easyeffects pavucontrol vesktop ffmpegthumbnailer
|
||||
rofi-bluetooth bemoji imv qbittorrent
|
||||
libreoffice-fresh easyeffects pavucontrol
|
||||
vesktop element-desktop ffmpegthumbnailer
|
||||
thunderbird
|
||||
|
||||
# Terminal programs
|
||||
dua vimv p7zip fastfetch gotop pciutils
|
||||
usbutils tcptrack mpc-cli ncmpcpp
|
||||
usbutils tcptrack mpc-cli ncmpcpp protonvpn-cli_2
|
||||
|
||||
# Scripts as global programs
|
||||
serverDash beScripts makoToggle swayLock
|
||||
|
@ -1635,7 +1641,7 @@ in
|
|||
'';
|
||||
in {
|
||||
enable = true;
|
||||
package = pkgs.unstable.sway; # swayfx
|
||||
package = pkgs.sway; # swayfx
|
||||
wrapperFeatures.gtk = true;
|
||||
checkConfig = false;
|
||||
config = {
|
||||
|
@ -1664,6 +1670,8 @@ in
|
|||
# Foreground apps
|
||||
{ command = "librewolf -P Variety --name=Variety"; }
|
||||
{ command = "vesktop --ozone-platform-hint=auto"; }
|
||||
{ command = "element-desktop"; }
|
||||
{ command = "thunderbird"; }
|
||||
{ command = "serverdash"; }
|
||||
];
|
||||
|
||||
|
@ -1824,9 +1832,11 @@ in
|
|||
"${primeMod}+Shift+b" = ''exec rofi-bluetooth'';
|
||||
"${primeMod}+Shift+Return" = ''exec ${terminal} ranger'';
|
||||
|
||||
# Swaytools prop, colorpicker
|
||||
# Swaytools prop, colorpicker, obs-cmd
|
||||
"${primeMod}+Ctrl+x" = ''exec ${swayTools} --prop'';
|
||||
"${primeMod}+Ctrl+c" = ''exec ${pkgs.hyprpicker}/bin/hyprpicker -an && ${sendNotif} "Color copied to clipboard"'';
|
||||
"${primeMod}+Ctrl+Prior" = ''exec ${pkgs.obs-cmd}/bin/obs-cmd scene switch "Main"'';
|
||||
"${primeMod}+Ctrl+Next" = ''exec ${pkgs.obs-cmd}/bin/obs-cmd scene switch "Guest"'';
|
||||
|
||||
## Media keys
|
||||
|
||||
|
@ -2037,9 +2047,11 @@ in
|
|||
# Communication
|
||||
"${w3a}" = [{ class = "zoom"; }];
|
||||
"${w8}" = [{ app_id = "vesktop"; }];
|
||||
"${w9}" = [{ class = "Element"; }];
|
||||
"${w7a}" = [{ app_id = "thunderbird"; }];
|
||||
|
||||
# Else
|
||||
"${w2}" = [{ class = "steam"; } { class = "heroic"; } { app_id = "lutris"; }];
|
||||
"${w2}" = [{ class = "SDL Application"; } { class = "heroic"; }];
|
||||
"${w2a}" = [{ app_id = "looking-glass-client"; }];
|
||||
"${w4}" = [{ app_id = "serverdash"; }];
|
||||
"${w4a}" = [{ app_id = "com.obsproject.Studio"; }];
|
||||
|
@ -2554,14 +2566,12 @@ in
|
|||
"file:///home/jimbo/JimboNFS/Music"
|
||||
"file:///home/jimbo/JimboNFS/Photos"
|
||||
"file:///home/jimbo/JimboNFS/Videos"
|
||||
"file:///home/jimbo/JimboNFS/MineServers"
|
||||
"file:///home/jimbo/JimboNFS/Projects"
|
||||
|
||||
# Links and mounts
|
||||
"file:///home/jimbo/VMs"
|
||||
|
||||
# More important stuff
|
||||
"file:///home/jimbo/JimboNFS/JimboOS"
|
||||
"file:///home/jimbo/JimboNFS/School"
|
||||
];
|
||||
|
||||
|
@ -2871,10 +2881,9 @@ in
|
|||
programs.obs-studio = {
|
||||
enable = true;
|
||||
plugins = with pkgs.obs-studio-plugins; [
|
||||
obs-pipewire-audio-capture
|
||||
looking-glass-obs
|
||||
obs-webkitgtk
|
||||
advanced-scene-switcher
|
||||
obs-pipewire-audio-capture obs-webkitgtk
|
||||
obs-multi-rtmp obs-vkcapture obs-tuna
|
||||
advanced-scene-switcher looking-glass-obs
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -2949,7 +2958,7 @@ in
|
|||
".alsoftrc".text = alsoftConf;
|
||||
|
||||
# Ncmpcpp config
|
||||
".config/ncmpcpp/config".text = "browser_sort_mode = \"name\"";
|
||||
".config/ncmpcpp/config".text = ncmpcppConf;
|
||||
|
||||
# LibreWolf profiles and theming
|
||||
".librewolf/profiles.ini".text = foxProfiles;
|
||||
|
@ -2991,6 +3000,8 @@ in
|
|||
syntaxHighlighting.enable = true;
|
||||
initExtra = ''
|
||||
${pkgs.any-nix-shell}/bin/any-nix-shell zsh --info-right | source /dev/stdin; pfetch
|
||||
setopt HIST_IGNORE_SPACE
|
||||
setopt RM_STAR_WAIT
|
||||
'';
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
|
@ -3024,7 +3035,7 @@ in
|
|||
|
||||
# Download from sources
|
||||
ytdl = "yt-dlp --embed-thumbnail --embed-metadata --output \"%(title)s.%(ext)s\"";
|
||||
ytmp4 = "ytdl --recode-video mp4";
|
||||
ytmp4 = "ytdl --recode-video webm";
|
||||
ytm3u = "yt-dlp -gS proto:m3u8";
|
||||
opusdl = "ytdl --recode-video opus";
|
||||
ytopus = "opusdl --format 251";
|
||||
|
@ -3032,7 +3043,7 @@ in
|
|||
|
||||
# Flakes
|
||||
buildiso =
|
||||
"nix run github:nix-community/nixos-generators -- -f install-iso -c /etc/nixos/configuration.nix";
|
||||
"${pkgs.nixos-generators}/bin/nixos-generate -f install-iso -c /home/jimbo/Downloads/NixISO/configuration.nix";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue