hosts/Infini-SERVER: update configuration

This commit is contained in:
Infinidoge 2021-12-13 20:50:22 -05:00
parent 2a6651fd67
commit 48d9bc352a
2 changed files with 96 additions and 1 deletions

View file

@ -1,6 +1,8 @@
{ suites, profiles, pkgs, lib, ... }: { { suites, profiles, pkgs, lib, ... }: {
imports = lib.flatten [ imports = lib.flatten [
(with suites; [ base ]) (with suites; [ base ])
./hardware-configuration.nix
]; ];
modules = { modules = {
@ -9,8 +11,35 @@
timeout = 1; timeout = 1;
}; };
hardware = { hardware = {
gpu.nvidia = true; # gpu.nvidia = true;
form.server = true; form.server = true;
}; };
filesystems = {
enable = true;
btrfs.enable = true;
};
};
environment.persistence."/persist" = {
directories = [
"/home"
"/etc/nixos"
# /var directories
"/var/log"
"/var/lib/systemd/coredump"
];
files = [
"/etc/machine-id"
"/etc/ssh/ssh_host_rsa_key"
"/etc/ssh/ssh_host_rsa_key.pub"
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_ed25519_key.pub"
"/root/.local/share/nix/trusted-settings.json"
"/root/.ssh/known_hosts"
];
}; };
} }

View file

@ -0,0 +1,66 @@
# 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, ... }:
let
uuid = uuid: "/dev/disk/by-uuid/${uuid}";
in
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "usb_storage" "xhci_pci" "ahci" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.kernelParams = [ "boot.shell_on_fail" ];
boot.supportedFilesystems = [ "btrfs" ];
fileSystems =
let
main = uuid "577db170-141b-4131-8df5-ca5e7b595294";
esp = uuid "E6C2-3E00";
in
{
"/" = {
device = "none";
fsType = "tmpfs";
options = [ "defaults" "size=4G" "mode=755" ];
};
"/persist" = {
device = main;
fsType = "btrfs";
options = [ "subvol=root" "autodefrag" "noatime" "ssd" ];
neededForBoot = true;
};
"/nix" = {
device = main;
fsType = "btrfs";
options = [ "subvol=nix" "autodefrag" "noatime" "ssd" ];
neededForBoot = true;
};
"/boot" = {
device = main;
fsType = "btrfs";
options = [ "subvol=boot" "autodefrag" "noatime" "ssd" ];
neededForBoot = true;
};
"/boot/efi" = {
device = esp;
fsType = "vfat";
neededForBoot = true;
};
};
swapDevices = [
{ device = uuid "d6a57248-e29b-4366-aec6-721a7ddbe2ec"; }
];
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
}