mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2025-12-11 02:56:27 +00:00
feat: amd stuff
This commit is contained in:
@@ -30,13 +30,9 @@
|
||||
allowUnfree = true;
|
||||
allowUnsupportedSystem = true;
|
||||
experimental-features = "nix-command flakes";
|
||||
substituters = [
|
||||
"https://hyprland.cachix.org"
|
||||
"https://cuda-maintainers.cachix.org"
|
||||
];
|
||||
substituters = [ "https://hyprland.cachix.org" ];
|
||||
trusted-public-keys = [
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
|
||||
];
|
||||
};
|
||||
overlays = [
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
locale.preset.theaninova.enable = true;
|
||||
|
||||
hardware = {
|
||||
nvidia.preset.proprietary.enable = true;
|
||||
amdgpu.preset.default.enable = true;
|
||||
audio.preset.pipewire.enable = true;
|
||||
cc1.enable = true;
|
||||
fv43u.enable = true;
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
# 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, ... }: {
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
[ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
@@ -90,7 +90,6 @@
|
||||
brightness = 0.8;
|
||||
};
|
||||
};
|
||||
opengl.nvidia_anti_flicker = true;
|
||||
animations = {
|
||||
enabled = "yes";
|
||||
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
||||
@@ -236,15 +235,6 @@
|
||||
platformTheme = "qtct";
|
||||
};
|
||||
|
||||
programs.fish.loginShellInit =
|
||||
# fish
|
||||
''
|
||||
Hyprland && echo "goodbye" && exit 0 \
|
||||
|| echo "$status couldn't launch Hyprland" && tty | grep tty1 \
|
||||
&& echo "refusing to autologin without Hyprland on tty1" && exit 0 \
|
||||
|| echo "not on tty1, letting in"
|
||||
'';
|
||||
|
||||
home = {
|
||||
pointerCursor = {
|
||||
gtk.enable = true;
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
pinta
|
||||
kdePackages.kdenlive
|
||||
# friture TODO: broken
|
||||
blender
|
||||
blender-hip
|
||||
openscad-unstable
|
||||
|
||||
# development
|
||||
|
||||
@@ -9,28 +9,16 @@ in {
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
boot = {
|
||||
loader = {
|
||||
timeout = 0;
|
||||
systemd-boot.consoleMode = "max";
|
||||
};
|
||||
loader.timeout = 0;
|
||||
|
||||
plymouth = {
|
||||
enable = true;
|
||||
theme = "text";
|
||||
};
|
||||
plymouth.enable = true;
|
||||
|
||||
kernelParams = [
|
||||
# Redirect all kernel messages to a console off screen
|
||||
"fbcon=vc:2-6"
|
||||
"console=tty1"
|
||||
|
||||
"splash"
|
||||
"quiet"
|
||||
|
||||
"rd.udev.log_level=3"
|
||||
"rd.systemd.show_status=false"
|
||||
"udev.log_priority=3"
|
||||
"boot.shell_on_fail"
|
||||
"vt.global_cursor_default=0" # no cursor blinking
|
||||
];
|
||||
consoleLogLevel = 0;
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
./hardware/gbmonctl.nix
|
||||
./hardware/nvidia-proprietary.nix
|
||||
./hardware/nvidia-nouveau.nix
|
||||
./hardware/amdgpu.nix
|
||||
./hardware/cc1.nix
|
||||
./hardware/fv43u.nix
|
||||
./hardware/virtual-camera.nix
|
||||
|
||||
@@ -17,9 +17,16 @@ in {
|
||||
};
|
||||
|
||||
services = {
|
||||
getty.autologinUser = "${username}";
|
||||
getty.extraArgs = [ "--noclear" "--noissue" "--nonewline" ];
|
||||
getty.loginOptions = "-p -f -- \\u"; # preserve environment
|
||||
greetd = {
|
||||
enable = true;
|
||||
settings = rec {
|
||||
initial_session = {
|
||||
command = "${pkgs.hyprland}/bin/Hyprland &> /dev/null";
|
||||
user = username;
|
||||
};
|
||||
default_session = initial_session;
|
||||
};
|
||||
};
|
||||
|
||||
dbus.enable = true;
|
||||
|
||||
@@ -39,27 +46,5 @@ in {
|
||||
};
|
||||
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
/* systemd.services = {
|
||||
plymouth-quit-hyprland = mkIf config.boot.quiet.enable {
|
||||
description = "Pause plymouth animation";
|
||||
conflicts = [ "plymouth-quit.service" ];
|
||||
after = [
|
||||
"plymouth-quit.service"
|
||||
"rc-local.service"
|
||||
"plymouth-start.service"
|
||||
"systemd-user-sessions.service"
|
||||
];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStartPre = "${pkgs.plymouth}/bin/plymouth deactivate";
|
||||
ExecStartPost = [
|
||||
"${pkgs.coreutils}/bin/sleep 30"
|
||||
"${pkgs.plymouth}/bin/plymouth quit --retain-splash"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
*/
|
||||
};
|
||||
}
|
||||
|
||||
32
modules/nixos/hardware/amdgpu.nix
Normal file
32
modules/nixos/hardware/amdgpu.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
with lib;
|
||||
|
||||
let cfg = config.hardware.amdgpu.preset.default;
|
||||
|
||||
in {
|
||||
options.hardware.amdgpu.preset.default = {
|
||||
enable =
|
||||
mkEnableOption "Enable ADM GPU driver support with some sane defaults";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
extraPackages = with pkgs; [ rocmPackages.clr.icd ];
|
||||
};
|
||||
|
||||
boot = {
|
||||
# https://docs.kernel.org/gpu/amdgpu/module-parameters.html
|
||||
kernelParams = [ "amdgpu.seamless=1" "amdgpu.freesync_video=1" ];
|
||||
initrd.kernelModules = [ "amdgpu" ];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
amdgpu_top
|
||||
glxinfo
|
||||
libva-utils
|
||||
vulkan-tools
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user