cleanup comments and unneeded code

This commit is contained in:
Noah Masur 2023-07-01 15:33:24 -06:00
parent 140b410ea0
commit 5348cbdf61
2 changed files with 7 additions and 13 deletions

View File

@ -15,12 +15,14 @@ nixpkgs.lib.nixosSystem {
../../modules/common ../../modules/common
../../modules/nixos ../../modules/nixos
{ {
# Hardeware # Hardware
server = true; server = true;
networking.hostName = "swan"; networking.hostName = "swan";
boot.initrd.availableKernelModules = boot.initrd.availableKernelModules =
[ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ]; [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ];
# Required for transcoding
boot.initrd.kernelModules = [ "amdgpu" ]; boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelParams = [ boot.kernelParams = [
"radeon.si_support=0" "radeon.si_support=0"
@ -30,20 +32,17 @@ nixpkgs.lib.nixosSystem {
"amdgpu.dc=1" "amdgpu.dc=1"
]; ];
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;
powerManagement.cpuFreqGovernor = "powersave"; powerManagement.cpuFreqGovernor = "powersave";
hardware.cpu.intel.updateMicrocode = true; hardware.cpu.intel.updateMicrocode = true;
# ZFS # ZFS
zfs.enable = true; zfs.enable = true;
# head -c 8 /etc/machine-id # Generated with: head -c 8 /etc/machine-id
networking.hostId = "600279f4"; # Random ID required for ZFS networking.hostId = "600279f4"; # Random ID required for ZFS
disko = { disko = {
enableConfig = true; enableConfig = true;
devices = (import ../../disks/root.nix { disk = "/dev/nvme0n1"; }); devices = (import ../../disks/root.nix { disk = "/dev/nvme0n1"; });
# // (import ../../disks/zfs.nix {
# pool = "tank";
# disks = [ "/dev/sda" "/dev/sdb" "/dev/sdc" ];
# });
}; };
boot.zfs.extraPools = [ "tank" ]; boot.zfs.extraPools = [ "tank" ];
@ -53,11 +52,11 @@ nixpkgs.lib.nixosSystem {
neovim.enable = true; neovim.enable = true;
caddy.enable = true; caddy.enable = true;
cloudflare.enable = true; cloudflare.enable = true;
dotfiles.enable = true;
streamServer = "stream.masu.rs"; streamServer = "stream.masu.rs";
nextcloudServer = "cloud.masu.rs"; nextcloudServer = "cloud.masu.rs";
bookServer = "books.masu.rs"; bookServer = "books.masu.rs";
arrServer = "download.masu.rs"; arrServer = "download.masu.rs";
transmissionServer = "download.masu.rs";
samba.enable = true; samba.enable = true;
cloudflareTunnel = { cloudflareTunnel = {
@ -77,12 +76,6 @@ nixpkgs.lib.nixosSystem {
# Disable passwords, only use SSH key # Disable passwords, only use SSH key
publicKey = publicKey =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s"; "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
# Clone dotfiles
dotfiles.enable = true;
# services.nfs.server.enable = true;
} }
]; ];
} }

View File

@ -87,6 +87,7 @@
settings = { settings = {
# Add community Cachix to binary cache # Add community Cachix to binary cache
# Don't use with macOS because blocked by corporate firewall
builders-use-substitutes = true; builders-use-substitutes = true;
substituters = lib.mkIf (!pkgs.stdenv.isDarwin) substituters = lib.mkIf (!pkgs.stdenv.isDarwin)
[ "https://nix-community.cachix.org" ]; [ "https://nix-community.cachix.org" ];