Merge branch 'main' of https://git.syzygial.cc/Syzygial/NixMachines
This commit is contained in:
25
machines/pericyte/configuration.nix
Normal file
25
machines/pericyte/configuration.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ pkgs, inputs, ... }: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
"${inputs.nixpkgs}/nixos/modules/profiles/headless.nix"
|
||||
"${inputs.nixpkgs}/nixos/modules/profiles/minimal.nix"
|
||||
|
||||
./microvm-configuration.nix
|
||||
./k3s.nix
|
||||
];
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
btop
|
||||
];
|
||||
|
||||
boot.tmp.cleanOnBoot = true;
|
||||
zramSwap.enable = true;
|
||||
networking.hostName = "pericyte";
|
||||
networking.domain = "";
|
||||
services.openssh.enable = true;
|
||||
users.users.root.openssh.authorizedKeys.keys = [''ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDOaNNSV/wurGA8D7bT+WX4UlHdKqd9SFfVXvSalvHag5qYDPUIsGGkqSNj1dcong9qxrC8y7G7ybWhwRKTKXInXrq6EO4JkVkCSbVqrq8gIv66upsKltvmf0esiOdrpRgHoiup8JKaX93aUT27rykReT39mFwkJZDoD4ViNiK7QmbgDC/9pyGDSJykreSnBoxtczox8Zi+pwN8XMI4nRVdV9hppXMpj38/O3Qaq+oXdHJ2MVNy9D+TqxYofstFbzpJpEb2xA4QYnq/VVJFk8VaZlg3qxelwBJ1GNZO8TMkLA+6b07D3aISyEIQAONviNktPwRPiw903hsDyeKDunDx ssh-key-2025-03-31'' ];
|
||||
system.stateVersion = "25.05";
|
||||
}
|
||||
14
machines/pericyte/hardware-configuration.nix
Normal file
14
machines/pericyte/hardware-configuration.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ modulesPath, ... }:
|
||||
{
|
||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||
boot.loader.grub = {
|
||||
efiSupport = true;
|
||||
efiInstallAsRemovable = true;
|
||||
device = "nodev";
|
||||
};
|
||||
fileSystems."/boot" = { device = "/dev/disk/by-uuid/FCE4-1F46"; fsType = "vfat"; };
|
||||
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ];
|
||||
boot.initrd.kernelModules = [ "nvme" ];
|
||||
fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
|
||||
|
||||
}
|
||||
19
machines/pericyte/k3s.nix
Normal file
19
machines/pericyte/k3s.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{ pkgs, ... }: {
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [
|
||||
6443 # k3s: required so that pods can reach the API server (running on port 6443 by default)
|
||||
# 2379 # k3s, etcd clients: required if using a "High Availability Embedded etcd" configuration
|
||||
# 2380 # k3s, etcd peers: required if using a "High Availability Embedded etcd" configuration
|
||||
];
|
||||
allowedUDPPorts = [
|
||||
# 8472 # k3s, flannel: required if using multi-node for inter-node networking
|
||||
];
|
||||
};
|
||||
services.k3s = {
|
||||
enable = true;
|
||||
role = "server";
|
||||
extraFlags = toString [
|
||||
# "--debug" # Optionally add additional args to k3s
|
||||
];
|
||||
};
|
||||
}
|
||||
6
machines/pericyte/microvm-configuration.nix
Normal file
6
machines/pericyte/microvm-configuration.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{ pkgs, ... }: {
|
||||
microvm.autostart = [
|
||||
"vm-starbot"
|
||||
"vm-starbot-dev"
|
||||
];
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
powerManagement.finegrained = false;
|
||||
nvidiaSettings = true;
|
||||
open = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta;
|
||||
# package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta;
|
||||
#package = let
|
||||
# rcu_patch = pkgs.fetchpatch {
|
||||
# url = "https://github.com/gentoo/gentoo/raw/c64caf53/x11-drivers/nvidia-drivers/files/nvidia-drivers-470.223.02-gpl-pfn_valid.patch";
|
||||
|
||||
Reference in New Issue
Block a user