Added system3
This commit is contained in:
@@ -0,0 +1,134 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
|
||||
in {
|
||||
imports = [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> ];
|
||||
|
||||
system.stateVersion = "21.05";
|
||||
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
initrd = {
|
||||
availableKernelModules =
|
||||
[ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||
kernelModules = [ "amdgpu" ];
|
||||
};
|
||||
|
||||
kernelModules = [ "kvm-amd" ];
|
||||
supportedFilesystems = [ "zfs" ];
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
zfs.enableUnstable = true;
|
||||
|
||||
# kernelPatches = [{
|
||||
# name = "big-navi";
|
||||
# patch = null;
|
||||
# extraConfig = ''
|
||||
# DRM_AMD_DC_DCN3_0 y
|
||||
# DRM_AMD_DC_DCN y
|
||||
# '';
|
||||
# }];
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-label/SYS3-BOOT";
|
||||
fsType = "vfat";
|
||||
options = [ "noexec" ];
|
||||
};
|
||||
|
||||
"/" = {
|
||||
device = "system3-root";
|
||||
fsType = "tmpfs";
|
||||
options = [ "mode=755" ];
|
||||
};
|
||||
|
||||
"/nix" = {
|
||||
device = "system3/transient/nix";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
"/var/log" = {
|
||||
device = "system3/transient/logs";
|
||||
fsType = "zfs";
|
||||
neededForBoot = true;
|
||||
options = [ "noexec" ];
|
||||
};
|
||||
|
||||
"/state" = {
|
||||
device = "system3/persistent/state";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
"/home" = {
|
||||
device = "system3/persistent/home";
|
||||
fsType = "zfs";
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [{ device = "/dev/disk/by-label/system3-swap"; }];
|
||||
|
||||
hardware = {
|
||||
bluetooth.enable = true;
|
||||
|
||||
cpu.amd.updateMicrocode = true;
|
||||
|
||||
opengl = {
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
rocm-opencl-icd
|
||||
rocm-opencl-runtime
|
||||
amdvlk
|
||||
driversi686Linux.amdvlk
|
||||
];
|
||||
setLdLibraryPath = true;
|
||||
};
|
||||
|
||||
pulseaudio = {
|
||||
support32Bit = true;
|
||||
package = pkgs.pulseaudioFull;
|
||||
};
|
||||
|
||||
enableRedistributableFirmware = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
xserver.videoDrivers = [ "amdgpu" ];
|
||||
|
||||
compton.backend = "xrender";
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostId = substring 0 8 (fileContents /etc/machine-id);
|
||||
|
||||
useDHCP = false;
|
||||
|
||||
macvlans = {
|
||||
intif0 = {
|
||||
interface = "enp6s0";
|
||||
mode = "bridge";
|
||||
};
|
||||
};
|
||||
|
||||
interfaces = {
|
||||
intif0 = {
|
||||
# output of: echo lambda-intif0|md5sum|sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/'
|
||||
macAddress = "02:0d:df:2d:46:90";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.targets = {
|
||||
sleep.enable = false;
|
||||
suspend.enable = false;
|
||||
hibernate.enable = false;
|
||||
hybrid-sleep.enable = false;
|
||||
};
|
||||
}
|
||||
+14
-15
@@ -1,9 +1,7 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
|
||||
];
|
||||
imports = [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> ];
|
||||
|
||||
boot = {
|
||||
loader = {
|
||||
@@ -18,19 +16,17 @@
|
||||
extraModulePackages = [ ];
|
||||
};
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-label/zbox-root";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/zbox-root";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-label/BOOT";
|
||||
fsType = "vfat";
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/BOOT";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-label/zbox-swap"; }
|
||||
];
|
||||
swapDevices = [{ device = "/dev/disk/by-label/zbox-swap"; }];
|
||||
|
||||
hardware = {
|
||||
bluetooth.enable = true;
|
||||
@@ -44,7 +40,10 @@
|
||||
# extraPackages32 = with pkgs.i686Linux; [ libva ];
|
||||
};
|
||||
|
||||
pulseaudio.support32Bit = true;
|
||||
pulseaudio = {
|
||||
support32Bit = true;
|
||||
package = pkgs.pulseaudioFull;
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
|
||||
Reference in New Issue
Block a user