From 574222c251c10876359822fda33d08effe38080b Mon Sep 17 00:00:00 2001 From: shibazaki Date: Wed, 9 Apr 2025 17:32:25 +0200 Subject: [PATCH] xdd --- flake.lock | 35 ++++++++++++++++++++++++++++++++ flake.nix | 16 +++++++-------- nixos/system/system-packages.nix | 5 +++++ nixos/system/system-settings.nix | 7 ++++++- 4 files changed, 53 insertions(+), 10 deletions(-) diff --git a/flake.lock b/flake.lock index 2d2200f..d910ed9 100644 --- a/flake.lock +++ b/flake.lock @@ -735,6 +735,22 @@ "type": "github" } }, + "nixpkgs_4": { + "locked": { + "lastModified": 1647297614, + "narHash": "sha256-ulGq3W5XsrBMU/u5k9d4oPy65pQTkunR4HKKtTq0RwY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "73ad5f9e147c0d2a2061f1d4bd91e05078dc0b58", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nmd": { "flake": false, "locked": { @@ -3630,12 +3646,31 @@ "type": "github" } }, + "rocm": { + "inputs": { + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1687959333, + "narHash": "sha256-NqM5vMtpznX/Ws4Ca7LDFKFSX6srFd82aaFIZXwssg4=", + "owner": "nixos-rocm", + "repo": "nixos-rocm", + "rev": "242305cac651e136928ddae922a4edec723ddf59", + "type": "github" + }, + "original": { + "owner": "nixos-rocm", + "repo": "nixos-rocm", + "type": "github" + } + }, "root": { "inputs": { "home-manager": "home-manager", "hyprland": "hyprland", "nixpkgs": "nixpkgs", "nvf": "nvf", + "rocm": "rocm", "stylix": "stylix" } }, diff --git a/flake.nix b/flake.nix index d28644f..82ed057 100644 --- a/flake.nix +++ b/flake.nix @@ -20,14 +20,12 @@ url = "github:danth/stylix"; # stylix follows unstable automatically inputs.nixpkgs.follows = "nixpkgs"; }; + rocm = { + url = "github:nixos-rocm/nixos-rocm"; + }; }; - outputs = { - self, - nixpkgs, - home-manager, - ... - } @ inputs: let + outputs = {nixpkgs, ...} @ inputs: let system = "x86_64-linux"; pkgs = import nixpkgs { @@ -39,7 +37,7 @@ in { nixosConfigurations = { shibazaki = nixpkgs.lib.nixosSystem { - system = system; + inherit system; specialArgs = { inherit inputs pkgs; userSettings = { @@ -52,7 +50,7 @@ ]; }; twelve = nixpkgs.lib.nixosSystem { - system = system; + inherit system; specialArgs = { inherit inputs pkgs; userSettings = { @@ -65,7 +63,7 @@ ]; }; nine = nixpkgs.lib.nixosSystem { - system = system; + inherit system; specialArgs = { inherit inputs pkgs; userSettings = { diff --git a/nixos/system/system-packages.nix b/nixos/system/system-packages.nix index 3b95287..9a0ea1d 100644 --- a/nixos/system/system-packages.nix +++ b/nixos/system/system-packages.nix @@ -8,5 +8,10 @@ vulkan-validation-layers mesa libxkbcommon + clinfo + ]; + + hardware.opengl.extraPackages = with pkgs; [ + rocmPackages.clr.icd ]; } diff --git a/nixos/system/system-settings.nix b/nixos/system/system-settings.nix index 02c47cd..d38873b 100644 --- a/nixos/system/system-settings.nix +++ b/nixos/system/system-settings.nix @@ -1,4 +1,4 @@ -{...}: { +{pkgs, ...}: { i18n = { defaultLocale = "en_US.UTF-8"; extraLocaleSettings = { @@ -19,6 +19,11 @@ nixpkgs.config.allowUnfree = true; boot.loader.systemd-boot.enable = true; + boot.initrd.kernelModules = ["amdgpu"]; programs.nix-ld.enable = true; + + hardware.opengl.extraPackages = with pkgs; [ + rocmPackages.clr + ]; }