Files
nixos/hosts/monolith/default.nix
2024-12-26 22:28:21 -08:00

96 lines
1.9 KiB
Nix
Executable File

{ self, pkgs, ... }:
{
imports = [
self.nixosModules.common
self.nixosModules.prompt
self.nixosModules.server
self.nixosModules.zerotier
./dns.nix
./vault.nix
];
networking = {
hostName = "monolith";
hostId = "44551c32";
firewall.allowedTCPPorts = [ 8000 ];
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/0c335248-f2b4-4a33-86f0-e96cfac82866";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-uuid/D945-7F54";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
"/library" = {
device = "library";
fsType = "zfs";
};
};
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
kernelModules = [ "kvm-amd" ];
supportedFilesystems = [ "zfs" ];
};
environment.systemPackages = with pkgs; [
rclone
beets
flac
screen
rustup
gcc
(callPackage ../marauder/ffcheck.nix { })
htop
mp3val
];
services.jellyfin = {
enable = true;
openFirewall = true;
};
services.navidrome = {
enable = true;
openFirewall = true;
settings = {
Address = "0.0.0.0";
MusicFolder = "/library/music";
Scanner.GroupAlbumReleases = "true";
ScanSchedule = "0";
};
};
systemd = {
services.reboot = {
description = "Reboot the system";
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.systemd}/bin/systemctl reboot";
};
};
timers.reboot = {
description = "Reboot the system every two hours";
wantedBy = [ "timers.target" ];
timerConfig = {
OnBootSec = "6h";
Persistent = true;
};
};
};
promptEmoji = "🏰";
time.timeZone = "America/Los_Angeles";
system.stateVersion = "24.05";
}