test: dn-lap test build

This commit is contained in:
DACHXY 2024-12-24 10:44:37 +08:00
parent 36b9f4e2b0
commit 04ce8d76ba
25 changed files with 245 additions and 160 deletions

View file

@ -0,0 +1,12 @@
{ config, pkgs, lib, ... }:
{
boot.loader.systemd-boot.enable = true;
boot.extraModprobeConfig = ''
options hid_apple fnmode=2
'';
boot.initrd.systemd.enable = true;
boot.initrd.kernelModules = [ "i915" ];
boot.swraid.enable = true;
}

View file

@ -0,0 +1,44 @@
{ lib, pkgs, inputs, ... }:
{
imports = [
./hardware-configuration.nix
inputs.home-manager.nixosModules.default
# Modules
./boot.nix
../../modules/dn-ca.nix
../../modules/fonts.nix
../../modules/hardware.nix
../../modules/hyprland.nix
../../modules/internationalisation.nix
../../modules/misc.nix
../../modules/networking.nix
../../modules/nixsettings.nix
../../modules/packages.nix
../../modules/plymouth.nix
../../modules/polkit.nix
../../modules/programs.nix
../../modules/sddm-theme.nix
../../modules/security.nix
../../modules/services.nix
../../modules/sound.nix
../../modules/theme.nix
../../modules/time.nix
../../modules/users.nix
../../modules/virtualization.nix
../../modules/wireguard.nix
];
# Overrides
networking.hostName = "dn-lap";
programs.steam.enable = false;
system.stateVersion = "24.11";
home-manager = {
backupFileExtension = "backup";
extraSpecialArgs = { inherit inputs; };
users = { "danny" = import ../home; };
};
}

View file

@ -0,0 +1,18 @@
{ config, pkgs, lib, ... }:
{
boot.loader.systemd-boot.enable = true;
boot.kernelParams =
[ "nvidia-drm.fbdev=1" "nvidia.NVreg_PreserveVideoMemoryAllocations=1" ];
boot.extraModprobeConfig = ''
options hid_apple fnmode=2
options nvidia_drm modeset=1 dbdev=1
'';
boot.initrd.systemd.enable = true;
boot.initrd.kernelModules =
[ "nvidia" "i915" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ];
boot.swraid.enable = true;
boot.swraid.mdadmConf =
"\n MAILADDR smitty\n ARRAY /dev/md126 metadata=1.2 name=stuff:0\n UUID=3b0b7c51-2681-407e-a22a-e965a8aeece7\n ";
}

View file

@ -0,0 +1,22 @@
{ lib, pkgs, inputs, ... }:
{
imports = [
./hardware-configuration.nix
../../modules
../../modules/nvidia.nix
./boot.nix
inputs.home-manager.nixosModules.default
];
# Overrides
networking.hostName = "dn-pre7780";
system.stateVersion = "24.11";
home-manager = {
backupFileExtension = "backup";
extraSpecialArgs = { inherit inputs; };
users = { "danny" = import ../home; };
};
}

View file

@ -0,0 +1,49 @@
# 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 = [
"vmd"
"dm-raid"
"xhci_pci"
"thunderbolt"
"nvme"
"usbhid"
"uas"
"sd_mod"
"rtsx_pci_sdmmc"
];
boot.initrd.kernelModules = [ ];
boot.kernelParams = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/BOOT";
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.wlp0s20f3.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
}