mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-09 23:22:57 +00:00
89 lines
2.6 KiB
Nix
89 lines
2.6 KiB
Nix
# The Swan
|
|
# System configuration for my home NAS server
|
|
|
|
{ inputs, globals, overlays, ... }:
|
|
|
|
with inputs;
|
|
|
|
nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
specialArgs = { };
|
|
modules = [
|
|
globals
|
|
home-manager.nixosModules.home-manager
|
|
disko.nixosModules.disko
|
|
../../modules/common
|
|
../../modules/nixos
|
|
{
|
|
# Hardeware
|
|
server = true;
|
|
networking.hostName = "swan";
|
|
|
|
boot.initrd.availableKernelModules =
|
|
[ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ];
|
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
|
boot.kernelParams = [
|
|
"radeon.si_support=0"
|
|
"amdgpu.si_support=1"
|
|
"radeon.cik_support=0"
|
|
"amdgpu.cik_support=1"
|
|
"amdgpu.dc=1"
|
|
];
|
|
hardware.enableRedistributableFirmware = true;
|
|
powerManagement.cpuFreqGovernor = "powersave";
|
|
hardware.cpu.intel.updateMicrocode = true;
|
|
|
|
# ZFS
|
|
zfs.enable = true;
|
|
# 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" ];
|
|
|
|
gui.enable = false;
|
|
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
|
nixpkgs.overlays = overlays;
|
|
neovim.enable = true;
|
|
caddy.enable = true;
|
|
cloudflare.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 = {
|
|
enable = true;
|
|
id = "646754ac-2149-4a58-b51a-e1d0a1f3ade2";
|
|
credentialsFile = ../../private/cloudflared-swan.age;
|
|
ca =
|
|
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCHF/UMtJqPFrf6f6GRY0ZFnkCW7b6sYgUTjTtNfRj1RdmNic1NoJZql7y6BrqQinZvy7nsr1UFDNWoHn6ah3tg= open-ssh-ca@cloudflareaccess.org";
|
|
};
|
|
|
|
backup.s3 = {
|
|
endpoint = "s3.us-west-002.backblazeb2.com";
|
|
bucket = "noahmasur-backup";
|
|
accessKeyId = "0026b0e73b2e2c80000000005";
|
|
};
|
|
|
|
# Disable passwords, only use SSH key
|
|
publicKey =
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
|
|
|
|
# Clone dotfiles
|
|
dotfiles.enable = true;
|
|
|
|
# services.nfs.server.enable = true;
|
|
|
|
}
|
|
];
|
|
}
|