From 5348cbdf61ef547ed41ca0805c5358b9622464ea Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Sat, 1 Jul 2023 15:33:24 -0600 Subject: [PATCH] cleanup comments and unneeded code --- hosts/swan/default.nix | 19 ++++++------------- modules/common/default.nix | 1 + 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/hosts/swan/default.nix b/hosts/swan/default.nix index 575dc7c..70f74e4 100644 --- a/hosts/swan/default.nix +++ b/hosts/swan/default.nix @@ -15,12 +15,14 @@ nixpkgs.lib.nixosSystem { ../../modules/common ../../modules/nixos { - # Hardeware + # Hardware server = true; networking.hostName = "swan"; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ]; + + # Required for transcoding boot.initrd.kernelModules = [ "amdgpu" ]; boot.kernelParams = [ "radeon.si_support=0" @@ -30,20 +32,17 @@ nixpkgs.lib.nixosSystem { "amdgpu.dc=1" ]; hardware.enableRedistributableFirmware = true; + powerManagement.cpuFreqGovernor = "powersave"; hardware.cpu.intel.updateMicrocode = true; # ZFS 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 disko = { enableConfig = true; 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" ]; @@ -53,11 +52,11 @@ nixpkgs.lib.nixosSystem { neovim.enable = true; caddy.enable = true; cloudflare.enable = true; + dotfiles.enable = true; streamServer = "stream.masu.rs"; nextcloudServer = "cloud.masu.rs"; bookServer = "books.masu.rs"; arrServer = "download.masu.rs"; - transmissionServer = "download.masu.rs"; samba.enable = true; cloudflareTunnel = { @@ -77,12 +76,6 @@ nixpkgs.lib.nixosSystem { # Disable passwords, only use SSH key publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s"; - - # Clone dotfiles - dotfiles.enable = true; - - # services.nfs.server.enable = true; - } ]; } diff --git a/modules/common/default.nix b/modules/common/default.nix index 713b248..b02d01f 100644 --- a/modules/common/default.nix +++ b/modules/common/default.nix @@ -87,6 +87,7 @@ settings = { # Add community Cachix to binary cache + # Don't use with macOS because blocked by corporate firewall builders-use-substitutes = true; substituters = lib.mkIf (!pkgs.stdenv.isDarwin) [ "https://nix-community.cachix.org" ];