feat: migrated thor to nixos (again)

This commit is contained in:
2024-11-16 11:46:23 +01:00
parent 6b8cec9963
commit 3b63a0873f
6 changed files with 170 additions and 77 deletions

View File

@@ -30,19 +30,29 @@
else if hostname == "thor" then [
./thor.nix
./modules/nh.nix
./modules/tlp.nix
./modules/boot.nix
./modules/users.nix
./modules/greetd.nix
./modules/fstrim.nix
./modules/network.nix
./modules/security.nix
./modules/pipewire.nix
./modules/gsettings.nix
./modules/adb.nix
./modules/ananicy.nix
./modules/bluetooth.nix
./modules/lanzaboot.nix
./modules/boot.nix
./modules/configuration.nix
./modules/distributed-builds.nix
./modules/fstrim.nix
./modules/gaming.nix
./modules/greetd.nix
./modules/gsettings.nix
# ./modules/kde.nix
# ./modules/lanzaboot.nix
./modules/network.nix
./modules/nh.nix
# ./modules/nvidia.nix
./modules/ollama.nix
./modules/packages.nix
./modules/pipewire.nix
./modules/printing.nix
./modules/security.nix
./modules/ssh.nix
./modules/users.nix
./modules/vm.nix
]
else if hostname == "server" then [
./server.nix

View File

@@ -0,0 +1,15 @@
{ pkgs, ... }:
{
nix.distributedBuilds = true;
nix.settings.builders-use-substitutes = true;
nix.buildMachines = [
{
hostName = "192.168.0.10";
sshUser = "remotebuild";
sshKey = "/root/.ssh/remotebuild";
system = "x86_64-linux";
supportedFeatures = [ "nixos-test" "big-parallel" "kvm" ];
}
];
}

39
hosts/thor.nix Normal file
View File

@@ -0,0 +1,39 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/efcf6f2f-7d44-441e-84a9-0a9725be0b72";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/0656-C8A6";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}