2023-11-17 15:31:32 -07:00
|
|
|
{ config, lib, pkgs, forEachUser, ... }:
|
2023-11-17 15:24:56 -07:00
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
../configuration.nix
|
|
|
|
];
|
|
|
|
|
2023-11-17 15:31:32 -07:00
|
|
|
networking.hostName = "railbird-sf";
|
|
|
|
|
|
|
|
hardware.enableRedistributableFirmware = true;
|
|
|
|
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
|
|
|
boot.initrd.kernelModules = [ ];
|
|
|
|
boot.kernelModules = [ "kvm-amd" ];
|
|
|
|
boot.extraModulePackages = [ ];
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
2024-09-30 18:38:01 -06:00
|
|
|
modules.postgres.enable = true;
|
2023-11-17 15:31:32 -07:00
|
|
|
|
2024-10-02 21:55:36 -06:00
|
|
|
services.k3s.role = "agent";
|
2024-10-02 22:03:01 -06:00
|
|
|
services.k3s.extraFlags = lib.mkForce ["--node-label nixos-nvidia-cdi=enabled"];
|
2023-11-17 15:24:56 -07:00
|
|
|
|
|
|
|
hardware.nvidia = {
|
|
|
|
powerManagement.enable = false;
|
|
|
|
# Fine-grained power management. Turns off GPU when not in use.
|
|
|
|
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
|
|
|
powerManagement.finegrained = false;
|
|
|
|
|
|
|
|
# Enable the Nvidia settings menu,
|
2023-11-17 15:31:32 -07:00
|
|
|
# accessible via `nvidia-settings`.
|
2023-11-17 15:24:56 -07:00
|
|
|
nvidiaSettings = true;
|
|
|
|
};
|
|
|
|
|
2023-11-17 15:31:32 -07:00
|
|
|
features.full.enable = false;
|
2024-09-26 14:15:27 -06:00
|
|
|
myModules.base.enable = true;
|
|
|
|
myModules.desktop.enable = true;
|
|
|
|
myModules.xmonad.enable = false;
|
|
|
|
myModules.code.enable = true;
|
|
|
|
myModules.syncthing.enable = true;
|
|
|
|
myModules.fonts.enable = true;
|
2024-09-30 18:38:01 -06:00
|
|
|
myModules.plasma.enable = true;
|
|
|
|
myModules.nvidia.enable = true;
|
2024-09-26 14:15:27 -06:00
|
|
|
myModules.gitea-runner.enable = true;
|
2024-09-30 20:47:12 -06:00
|
|
|
myModules.railbird-k3s = {
|
|
|
|
enable = true;
|
|
|
|
serverAddr = "https://dev.railbird.ai:6443";
|
|
|
|
};
|
2023-11-17 15:24:56 -07:00
|
|
|
|
2023-11-17 15:31:32 -07:00
|
|
|
fileSystems."/" =
|
2023-11-17 15:24:56 -07:00
|
|
|
{ device = "/dev/disk/by-uuid/a317d456-6f84-41ee-a149-8e466e414aae";
|
2023-11-17 15:31:32 -07:00
|
|
|
fsType = "ext4";
|
2023-11-17 15:24:56 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
fileSystems."/boot" =
|
|
|
|
{ device = "/dev/disk/by-uuid/B875-39D4";
|
|
|
|
fsType = "vfat";
|
2023-11-17 15:31:32 -07:00
|
|
|
};
|
2023-11-17 15:24:56 -07:00
|
|
|
|
|
|
|
swapDevices =
|
|
|
|
[ { device = "/dev/disk/by-uuid/129345f3-e1e1-4d45-9db9-643160c6d564"; }
|
|
|
|
];
|
|
|
|
|
2023-11-17 18:06:39 -07:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
android-studio
|
|
|
|
];
|
2023-11-17 15:24:56 -07:00
|
|
|
|
|
|
|
networking.useDHCP = lib.mkDefault true;
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
|
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
2023-11-17 15:31:32 -07:00
|
|
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
2024-09-30 18:38:01 -06:00
|
|
|
|
2023-11-17 15:24:56 -07:00
|
|
|
home-manager.users = forEachUser {
|
2023-11-17 15:31:32 -07:00
|
|
|
home.stateVersion = "23.11";
|
2023-11-17 15:24:56 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
system.stateVersion = "23.11";
|
|
|
|
}
|