migrate configuration.nix into flexible modular flake setup
This commit is contained in:
37
hosts/wildfire/configuration.nix
Normal file
37
hosts/wildfire/configuration.nix
Normal file
@ -0,0 +1,37 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../modules/common.nix
|
||||
];
|
||||
|
||||
# Encrypted drive
|
||||
boot.initrd.luks.devices."luks-1728f038-43a6-4e0d-b7dd-19a4c1083605".device = "/dev/disk/by-uuid/1728f038-43a6-4e0d-b7dd-19a4c1083605";
|
||||
|
||||
networking.hostName = "wildfire";
|
||||
|
||||
hardware = {
|
||||
steam-hardware.enable = true;
|
||||
graphics.enable = true;
|
||||
};
|
||||
|
||||
# Network security specific to wildfire
|
||||
networking.firewall.allowedTCPPorts = [];
|
||||
networking.firewall.allowedUDPPorts = [];
|
||||
|
||||
# Wildfire-specific packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
lact
|
||||
];
|
||||
|
||||
# Wildfire-specific Systemd services
|
||||
systemd.services.lact = {
|
||||
description = "AMDGPU Control Daemon";
|
||||
after = ["multi-user.target"];
|
||||
wantedBy = ["multi-user.target"];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.lact}/bin/lact daemon";
|
||||
};
|
||||
enable = true;
|
||||
};
|
||||
}
|
43
hosts/wildfire/hardware-configuration.nix
Normal file
43
hosts/wildfire/hardware-configuration.nix
Normal file
@ -0,0 +1,43 @@
|
||||
# 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 = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.kernel.sysctl = { "vm.swappiness" = 10;};
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/f23b65a6-9564-4120-bf58-69cf6312eecc";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-be9995ed-6b36-4f4d-a374-28a85fc50ed8".device = "/dev/disk/by-uuid/be9995ed-6b36-4f4d-a374-28a85fc50ed8";
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/B7CE-982B";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/2fd893cd-ffc0-4c8d-b071-7520f7a25889"; }
|
||||
];
|
||||
|
||||
# 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.bnep0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
Reference in New Issue
Block a user