This commit is contained in:
Your Name
2025-12-16 18:39:02 +01:00
parent 48bfbd1f30
commit c30e1479cf
5 changed files with 149 additions and 13 deletions

View File

@@ -128,5 +128,15 @@
];
};
# elros
nixosConfigurations.elros = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs system; };
modules = [
./hosts/elros/configuration.nix
sops-nix.nixosModules.sops
];
};
};
}

View File

@@ -55,6 +55,8 @@
];
services.desktopManager.gnome.enable = true;
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;

View File

@@ -31,32 +31,51 @@
hardware.amdgpu.opencl.enable = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
hardware.graphics = {
enable = true;
};
services.xserver.videoDrivers = [ "amdgpu" ];
systemd.tmpfiles.rules = [
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
];
nixpkgs.config.rocmSupport = true;
nixpkgs.config.rocmTargets = [ "gfx1030" ];
environment.variables = {
HSA_OVERRIDE_GFX_VERSION = "10.3.0";
};
# Environment variables for ROCm
environment.sessionVariables = {
HSA_OVERRIDE_GFX_VERSION = "10.3.0";
ROCM_PATH = "${pkgs.rocmPackages.rocm-core}/opt/rocm";
HIP_PATH = "${pkgs.rocmPackages.rocm-core}/opt/rocm/hip";
};
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [
rocmPackages.clr.icd
];
};
# Enable Vulkan support
hardware.opengl.enable = true;
hardware.opengl.driSupport32 = true;
hardware.opengl.extraPackages = with pkgs; [
vulkan-loader
vulkan-tools
vulkan-headers
];
# Explicitly include ROCm packages for compilation
# You *can* still put utilities here
environment.systemPackages = with pkgs; [
vulkan-tools
clinfo
rocmPackages.clr
rocmPackages.rocminfo
rocmPackages.rocm-runtime
rocmPackages.rocm-core
rocmPackages.rocm-smi
rocmPackages.rocblas
rocmPackages.rccl
rocmPackages.hipcc
lact
rocmPackages.rocminfo
rocmPackages.rocm-smi
@@ -68,15 +87,8 @@
rocmPackages.rocblas
rocmPackages.rccl
rocmPackages.hipcc
rocmPackages.rocm-opencl-runtime
];
# Ensure ROCm is available in the environment for compilation
environment.sessionVariables = {
ROCM_PATH = "${pkgs.rocmPackages.rocm-core}/opt/rocm";
HIP_PATH = "${pkgs.rocmPackages.rocm-core}/opt/rocm/hip";
};
systemd.packages = with pkgs; [ lact ];
systemd.services.lactd.wantedBy = [ "multi-user.target" ];

View File

@@ -0,0 +1,57 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{
config,
lib,
pkgs,
...
}:
{
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
../../modules/boot.nix
../../modules/zram.nix
../../modules/nix.nix
../../modules/openssh.nix
../../modules/gunalx.nix
../../secrets/sops.nix
../../secrets/sopsconf.nix
../../modules/pam.nix
../../modules/tailscale.nix
../../modules/basePackages.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "elros";
networking.networkmanager.enable = true;
time.timeZone = "Europe/Amsterdam";
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#
# Most users should NEVER change this value after the initial install, for any reason,
# even if you've upgraded your system to a new NixOS release.
#
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
# to actually do that.
#
# This value being lower than the current NixOS release does NOT mean your system is
# out of date, out of support, or vulnerable.
#
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
# and migrated your data accordingly.
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "25.05"; # Did you read the comment?
}

View File

@@ -0,0 +1,55 @@
# 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 + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [
"ata_piix"
"uhci_hcd"
"virtio_pci"
"virtio_scsi"
"sd_mod"
"sr_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/7fa4de3a-20bb-4d0f-b049-dd6a0a0aee6e";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/E04D-431D";
fsType = "vfat";
options = [
"fmask=0022"
"dmask=0022"
];
};
swapDevices = [ ];
services.qemuGuest.enable = true;
# 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.ens18.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}