This commit is contained in:
Tao Tien 2025-05-22 18:48:53 -07:00
parent 67619e3478
commit 50eb5f227a
5 changed files with 537 additions and 456 deletions

View file

@ -0,0 +1,154 @@
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2.1 of the
# License, or (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
; For devices where a 'Internal Mic' or 'Internal Mic Boost' element exists
; 'Int Mic' and 'Int Mic Boost' are for compatibility with kernels < 2.6.38
;
; See analog-output.conf.common for an explanation on the directives
[General]
priority = 89
description-key = analog-input-microphone-internal
[Jack Mic]
state.plugged = no
state.unplugged = unknown
[Jack Dock Mic]
state.plugged = no
state.unplugged = unknown
[Jack Front Mic]
state.plugged = no
state.unplugged = unknown
[Jack Rear Mic]
state.plugged = no
state.unplugged = unknown
[Jack Internal Mic Phantom]
state.plugged = unknown
state.unplugged = unknown
required-any = any
[Element Capture]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right
[Element Internal Mic Boost]
required-any = any
switch = select
volume = zero
override-map.1 = all
override-map.2 = all-left,all-right
[Option Internal Mic Boost:on]
name = input-boost-on
[Option Internal Mic Boost:off]
name = input-boost-off
[Element Int Mic Boost]
required-any = any
switch = select
volume = zero
override-map.1 = all
override-map.2 = all-left,all-right
[Option Int Mic Boost:on]
name = input-boost-on
[Option Int Mic Boost:off]
name = input-boost-off
[Element Internal Mic]
required-any = any
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right
[Element Int Mic]
required-any = any
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right
[Element Input Source]
enumeration = select
[Option Input Source:Internal Mic]
name = analog-input-microphone-internal
required-any = any
[Option Input Source:Int Mic]
name = analog-input-microphone-internal
required-any = any
[Element Capture Source]
enumeration = select
[Option Capture Source:Internal Mic]
name = analog-input-microphone-internal
required-any = any
[Option Capture Source:Int Mic]
name = analog-input-microphone-internal
required-any = any
[Element Mic]
switch = off
volume = off
[Element Dock Mic]
switch = off
volume = off
[Element Front Mic]
switch = off
volume = off
[Element Rear Mic]
switch = off
volume = off
[Element Headphone Mic]
switch = off
volume = off
[Element Headphone Mic Boost]
switch = off
volume = off
[Element Mic Boost]
switch = off
volume = off
[Element Dock Mic Boost]
switch = off
volume = off
[Element Front Mic Boost]
switch = off
volume = off
[Element Rear Mic Boost]
switch = off
volume = off
.include analog-input-mic.conf.common

View file

@ -1,7 +1,7 @@
{
pkgs,
lib,
...
pkgs,
lib,
...
}:
# let
# if_desktop =
@ -10,96 +10,97 @@
# else false;
# in
{
# aagl.url = "github:ezKEa/aagl-gtk-on-nix";
# aagl.inputs.nixpkgs.follows = "nixpkgs";
# programs.noisetorch.enable = true;
# aagl.url = "github:ezKEa/aagl-gtk-on-nix";
# aagl.inputs.nixpkgs.follows = "nixpkgs";
environment.systemPackages = with pkgs; [
# parsec-bin
# yuzu # nintendo can suck the shit out of my asshole
gamemode
heroic
lutris
mangohud
prismlauncher
protonup-qt
r2modman
wine
temurin-jre-bin-17
];
environment.systemPackages = with pkgs; [
# parsec-bin
# yuzu # nintendo can suck the shit out of my asshole
gamemode
heroic
lutris
mangohud
prismlauncher
protonup-qt
r2modman
wine
temurin-jre-bin-17
];
networking.firewall.allowedTCPPorts = [25565];
networking.firewall.allowedTCPPorts = [25565];
programs.steam = {
enable = true;
# remotePlay.openFirewall = true;
# gamescopeSession.enable = false;
};
programs.gamemode.enable = true;
programs.gamescope.enable = true;
programs.steam = {
enable = true;
# remotePlay.openFirewall = true;
# gamescopeSession.enable = false;
};
programs.gamemode.enable = true;
programs.gamescope.enable = true;
security.pam.loginLimits = [
security.pam.loginLimits = [
{
domain = "@game";
type = "-";
item = "nice";
value = -20;
}
];
security.sudo-rs.extraRules = [
{
commands = [
{
domain = "@game";
type = "-";
item = "nice";
value = -20;
command = "${pkgs.systemd}/bin/bootctl set-oneshot auto-windows";
options = ["NOPASSWD"];
}
];
security.sudo-rs.extraRules = [
{
commands = [
{
command = "${pkgs.systemd}/bin/bootctl set-oneshot auto-windows";
options = ["NOPASSWD"];
}
];
groups = ["wheel"];
}
];
];
groups = ["wheel"];
}
];
# THE FINALS audio borked
# services.pipewire.enable = !if_desktop;
# hardware.pulseaudio.enable = if_desktop;
# hardware.pulseaudio.support32Bit = if_desktop;
# services.pipewire.extraConfig = {
# pipewire."99-low-latency" = {
# context.properties = {
# default.allowed-rates = [44100 48000 96000 192000];
# default.clock.rate = 192000;
# default.clock.quantum = 32;
# default.clock.min-quantum = 32;
# default.clock.max-quantum = 32;
# };
# context.modules = [
# {
# name = "libpipewire-module-rt";
# args = {
# nice.level = -12;
# rt.prio = 89;
# rt.time.soft = 200000;
# rt.time.hard = 200000;
# };
# flags = ["ifexists nofail"];
# }
# ];
# };
# pipewire-pulse."99-low-latency" = {
# context.modules = [
# {
# name = "libpipewire-module-protocol-pulse";
# args = {
# pulse.min.req = "32/192000";
# pulse.default.req = "32/192000";
# pulse.max.req = "32/192000";
# pulse.min.quantum = "32/192000";
# pulse.max.quantum = "32/192000";
# };
# }
# ];
# stream.properties = {
# node.latency = "32/192000";
# resample.quality = 1;
# };
# };
# };
# THE FINALS audio borked
# services.pipewire.enable = !if_desktop;
# hardware.pulseaudio.enable = if_desktop;
# hardware.pulseaudio.support32Bit = if_desktop;
# services.pipewire.extraConfig = {
# pipewire."99-low-latency" = {
# context.properties = {
# default.allowed-rates = [44100 48000 96000 192000];
# default.clock.rate = 192000;
# default.clock.quantum = 32;
# default.clock.min-quantum = 32;
# default.clock.max-quantum = 32;
# };
# context.modules = [
# {
# name = "libpipewire-module-rt";
# args = {
# nice.level = -12;
# rt.prio = 89;
# rt.time.soft = 200000;
# rt.time.hard = 200000;
# };
# flags = ["ifexists nofail"];
# }
# ];
# };
# pipewire-pulse."99-low-latency" = {
# context.modules = [
# {
# name = "libpipewire-module-protocol-pulse";
# args = {
# pulse.min.req = "32/192000";
# pulse.default.req = "32/192000";
# pulse.max.req = "32/192000";
# pulse.min.quantum = "32/192000";
# pulse.max.quantum = "32/192000";
# };
# }
# ];
# stream.properties = {
# node.latency = "32/192000";
# resample.quality = 1;
# };
# };
# };
}

View file

@ -1,194 +1,194 @@
{
inputs,
lib,
pkgs,
modulesPath,
...
inputs,
lib,
pkgs,
modulesPath,
...
}: {
environment.systemPackages = with pkgs; [
# inputs.helix.packages.${pkgs.system}.default
# screen
bat
bottom
cifs-utils
du-dust
dumbpipe
exfatprogs
fastfetch
ffmpeg
firefox
git
helix
inputs.agenix.packages.${pkgs.system}.default
inputs.zen-browser.packages."${system}".default
jujutsu
mesa
mpv
ouch
pueue
ripgrep
# rustdesk
sendme
skim
tree
wezterm
wget
zstd
environment.systemPackages = with pkgs; [
# inputs.helix.packages.${pkgs.system}.default
# screen
bat
bottom
cifs-utils
du-dust
dumbpipe
exfatprogs
fastfetch
ffmpeg
firefox
git
helix
inputs.agenix.packages.${pkgs.system}.default
inputs.zen-browser.packages."${system}".default
jujutsu
mesa
mpv
ouch
pueue
ripgrep
# rustdesk
sendme
skim
tree
wezterm
wget
zstd
];
programs.partition-manager.enable = lib.mkDefault true;
# programs.nh = {
# enable = true;
# };
programs.firefox.enable = true;
programs.firefox.policies = {
DisablePocket = true;
PasswordManagerEnabled = false;
NoDefaultBookmarks = false;
};
programs.firefox.preferences = {
"media.ffmpeg.vaapi.enabled" = true;
"widget.use-xdg-desktop-portal.file-picker" = 1;
"widget.use-xdg-desktop-portal.location" = 1;
"widget.use-xdg-desktop-portal.mime-handler" = 1;
"widget.use-xdg-desktop-portal.open-uri" = 1;
"widget.use-xdg-desktop-portal.settings" = 1;
"accessibility.browsewithcaret_shortcut.enabled" = false;
"browser.bookmarks.restore_default_bookmarks" = false;
};
hardware.graphics.enable = true;
# hardware.opengl = {
# enable = true;
# extraPackaged = with pkgs; [
# libvdpau-va-gl
# ];
# };
services.xserver.enable = lib.mkDefault true;
services.xserver.excludePackages = [pkgs.xterm];
services.xserver.xkb.layout = "us";
systemd.services.display-manager.restartIfChanged = false;
services.displayManager.sddm.enable = lib.mkDefault true;
services.displayManager.sddm.wayland.enable = true;
services.desktopManager.plasma6.enable = lib.mkDefault true;
environment.plasma6.excludePackages = with pkgs; [
kdePackages.elisa
kdePackages.konsole
kdePackages.gwenview
kdePackages.kate
xterm
];
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keys = [
];
programs.ssh.startAgent = true;
services.printing.enable = lib.mkDefault true;
services.printing.drivers = with pkgs; lib.mkDefault [gutenprint gutenprintBin];
services.avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
networking.networkmanager.enable = true;
networking.networkmanager.wifi.backend = "iwd";
services.tailscale.enable = true;
services.resolved.enable = true;
networking.wireless.iwd = {
enable = true;
settings.IPv6.Enabled = true;
settings.Settings.AutoConnect = true;
};
services.smartd.enable = true;
# services.btrfs.autoScrub.enable = lib.mkDefault true;
# hardware.pulseaudio.enable = lib.mkDefault false;
security.rtkit.enable = true;
services.pipewire = {
enable = lib.mkDefault true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
wireplumber.enable = lib.mkDefault true;
};
security.sudo-rs.enable = true;
security.sudo.enable = false;
i18n.inputMethod = {
enable = lib.mkDefault true;
type = "fcitx5";
fcitx5.addons = with pkgs; [
fcitx5-gtk
fcitx5-mozc
fcitx5-rime
];
programs.partition-manager.enable = lib.mkDefault true;
};
# programs.nh = {
# enable = true;
# };
environment.variables = {
EDITOR = "hx";
VISUAL = "hx";
PAGER = "bat";
SKIM_DEFAULT_COMMAND = "rg --files";
};
environment.sessionVariables = {
EDITOR = "hx";
VISUAL = "hx";
PAGER = "bat";
SKIM_DEFAULT_COMMAND = "rg --files";
};
programs.firefox.enable = true;
programs.firefox.policies = {
DisablePocket = true;
PasswordManagerEnabled = false;
NoDefaultBookmarks = false;
};
programs.firefox.preferences = {
"media.ffmpeg.vaapi.enabled" = true;
time.timeZone = lib.mkDefault "US/Pacific";
# services.automatic-timezoned.enable = lib.mkDefault true;
# i18n.defaultLocale = "en_US.UTF-8";
# i18n.extraLocaleSettings = {
# LC_CTYPE = "en_US.UTF-8";
# LC_MESSAGES = "en_US.UTF-8";
# LC_ALL = "en_US.UTF-8";
# };
"widget.use-xdg-desktop-portal.file-picker" = 1;
"widget.use-xdg-desktop-portal.location" = 1;
"widget.use-xdg-desktop-portal.mime-handler" = 1;
"widget.use-xdg-desktop-portal.open-uri" = 1;
"widget.use-xdg-desktop-portal.settings" = 1;
systemd.extraConfig = ''
DefaultTimeoutStopSec=15s
'';
"accessibility.browsewithcaret_shortcut.enabled" = false;
"browser.bookmarks.restore_default_bookmarks" = false;
};
zramSwap = {
enable = true;
algorithm = "zstd";
};
hardware.graphics.enable = true;
# hardware.opengl = {
# enable = true;
# extraPackaged = with pkgs; [
# libvdpau-va-gl
# ];
# };
services.xserver.enable = lib.mkDefault true;
services.xserver.excludePackages = [pkgs.xterm];
services.xserver.xkb.layout = "us";
systemd.services.display-manager.restartIfChanged = false;
services.displayManager.sddm.enable = lib.mkDefault true;
services.displayManager.sddm.wayland.enable = true;
services.desktopManager.plasma6.enable = lib.mkDefault true;
environment.plasma6.excludePackages = with pkgs; [
kdePackages.elisa
kdePackages.konsole
kdePackages.gwenview
kdePackages.kate
xterm
boot.loader.systemd-boot.enable = lib.mkDefault true;
boot.loader.efi.canTouchEfiVariables = lib.mkDefault true;
boot.loader.timeout = lib.mkForce 1;
# boot.supportedFilesystems = ["ntfs" "btrfs"];
hardware.enableAllFirmware = true;
hardware.bluetooth.enable = lib.mkDefault true;
# hardware.bluetooth.settings.General.Experimental = true;
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
nix.settings = {
experimental-features = "nix-command flakes";
auto-optimise-store = true;
# adding logged in users allows for passwordless root
# trusted-users = ["root"];
system-features = [
"benchmark"
"big-parallel"
"gccarch-znver3"
"gccarch-znver4"
"kvm"
"nixos-test"
];
};
nixpkgs.config = {allowUnfree = true;};
nix.nixPath = ["nixpkgs=${pkgs.path}"];
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keys = [
];
programs.ssh.startAgent = true;
services.printing.enable = lib.mkDefault true;
services.printing.drivers = with pkgs; lib.mkDefault [gutenprint gutenprintBin];
services.avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
networking.networkmanager.enable = true;
networking.networkmanager.wifi.backend = "iwd";
services.tailscale.enable = true;
services.resolved.enable = true;
networking.wireless.iwd = {
enable = true;
settings.IPv6.Enabled = true;
settings.Settings.AutoConnect = true;
};
services.smartd.enable = true;
# services.btrfs.autoScrub.enable = lib.mkDefault true;
# hardware.pulseaudio.enable = lib.mkDefault false;
security.rtkit.enable = true;
services.pipewire = {
enable = lib.mkDefault true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
wireplumber.enable = lib.mkDefault true;
};
security.sudo-rs.enable = true;
security.sudo.enable = false;
i18n.inputMethod = lib.mkDefault {
enable = true;
type = "fcitx5";
fcitx5.addons = with pkgs; [
fcitx5-gtk
fcitx5-mozc
fcitx5-rime
];
};
environment.variables = {
EDITOR = "hx";
VISUAL = "hx";
PAGER = "bat";
SKIM_DEFAULT_COMMAND = "rg --files";
};
environment.sessionVariables = {
EDITOR = "hx";
VISUAL = "hx";
PAGER = "bat";
SKIM_DEFAULT_COMMAND = "rg --files";
};
time.timeZone = lib.mkDefault "US/Pacific";
# services.automatic-timezoned.enable = lib.mkDefault true;
# i18n.defaultLocale = "en_US.UTF-8";
# i18n.extraLocaleSettings = {
# LC_CTYPE = "en_US.UTF-8";
# LC_MESSAGES = "en_US.UTF-8";
# LC_ALL = "en_US.UTF-8";
# };
systemd.extraConfig = ''
DefaultTimeoutStopSec=15s
'';
zramSwap = {
enable = true;
algorithm = "zstd";
};
boot.loader.systemd-boot.enable = lib.mkDefault true;
boot.loader.efi.canTouchEfiVariables = lib.mkDefault true;
boot.loader.timeout = lib.mkForce 1;
# boot.supportedFilesystems = ["ntfs" "btrfs"];
hardware.enableAllFirmware = true;
hardware.bluetooth.enable = lib.mkDefault true;
# hardware.bluetooth.settings.General.Experimental = true;
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
nix.settings = {
experimental-features = "nix-command flakes";
auto-optimise-store = true;
# adding logged in users allows for passwordless root
# trusted-users = ["root"];
system-features = [
"benchmark"
"big-parallel"
"gccarch-znver3"
"gccarch-znver4"
"kvm"
"nixos-test"
];
};
nixpkgs.config = {allowUnfree = true;};
nix.nixPath = ["nixpkgs=${pkgs.path}"];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
system.stateVersion = lib.mkDefault "23.05";
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
system.stateVersion = lib.mkDefault "23.05";
}

View file

@ -10,14 +10,12 @@
programs.partition-manager.enable = false;
services.printing.enable = false;
i18n.inputMethod = {};
i18n.inputMethod.enable = false;
services.xserver.enable = false;
services.desktopManager.plasma6.enable = false;
# services.pipewire.enable = false;
# services.pulseaudio.enable = true;
hardware.raspberry-pi."4" = {
apply-overlays-dtmerge.enable = true;
bluetooth.enable = true;
fkms-3d.enable = true;
};
@ -34,79 +32,6 @@
boot.loader.efi.canTouchEfiVariables = false;
# Configure for modesetting in the device tree
hardware.deviceTree = {
overlays = [
# Equivalent to:
# https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/cma-overlay.dts
{
name = "rpi4-cma-overlay";
dtsText = ''
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2711";
fragment@0 {
target = <&cma>;
__overlay__ {
size = <(512 * 1024 * 1024)>;
};
};
};
'';
}
# Equivalent to:
# https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts
{
name = "rpi4-vc4-fkms-v3d-overlay";
dtsText = ''
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2711";
fragment@1 {
target = <&fb>;
__overlay__ {
status = "disabled";
};
};
fragment@2 {
target = <&firmwarekms>;
__overlay__ {
status = "okay";
};
};
fragment@3 {
target = <&v3d>;
__overlay__ {
status = "okay";
};
};
fragment@4 {
target = <&vc4>;
__overlay__ {
status = "okay";
};
};
};
'';
}
];
};
# Also configure the system for modesetting.
services.xserver.videoDrivers = lib.mkBefore [
"modesetting" # Prefer the modesetting driver in X11
"fbdev" # Fallback to fbdev
];
fileSystems = {
"/" = {
device = "/dev/disk/by-label/NIXOS_SD";

View file

@ -1,121 +1,122 @@
{
lib,
config,
pkgs,
...
}: {
hardware.opengl.extraPackages = with pkgs; [
amdvlk
];
hardware.opengl.extraPackages32 = with pkgs; [
driversi686Linux.amdvlk
];
services.xserver.videoDrivers = [
"amdgpu"
];
lib,
config,
pkgs,
...
}:
# let
# boostless = pkgs.pipewire.overrideAttrs (old: {
# postInstall =
# old.postInstall or ""
# + ''
# '';
# });
# in
{
environment.etc."alsa-card-profile/analog-input-internal-mic.conf".source = ../extras/analog-input-internal-mic.conf;
# services.pipewire.wireplumber.extraConfig = {
# "wireplumber.settings" = {
# "device.routes.default-source-volume" = 0.42;
# };
# };
hardware.opengl.extraPackages = with pkgs; [
amdvlk
];
hardware.opengl.extraPackages32 = with pkgs; [
driversi686Linux.amdvlk
];
services.xserver.videoDrivers = [
"amdgpu"
];
services.rsyslogd = {
enable = true;
extraConfig = ''
module(load="imudp")
input(type="imudp" port="514")
# services.pipewire.wireplumber.extraConfig = {
# "wireplumber.settings" = {
# "device.routes.default-source-volume" = 0.42;
# };
# };
THENAS.* -/var/log/THENAS
'';
};
services.rsyslogd = {
enable = true;
extraConfig = ''
module(load="imudp")
input(type="imudp" port="514")
# boot.kernelPatches = [
# (lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.11")
# {
# name = "cros_ec_lpc";
# patch = pkgs.fetchpatch {
# url = "https://patchwork.kernel.org/series/840830/mbox/";
# sha256 = "sha256-7jSEAGInFC+a+ozCyD4dFz3Qgh2JrHskwz7UfswizFw=";
# };
# })
# ];
# nixpkgs.overlays = [
# (final: prev: {
# libinput = prev.libinput.overrideAttrs (old: {
# patches =
# (old.patches or [])
# ++ [
# ../extras/libinput-delay.patch
# ];
# });
# })
# ];
environment.systemPackages = with pkgs; [
fw-ectool
framework-tool
nvtopPackages.amd
lact
];
systemd.services.lactd.wantedBy = ["multi-user.target"];
services.fwupd.enable = true;
services.tailscale.useRoutingFeatures = "client";
systemd.services."backlight@backlight:amdgpu_bl2".enable = false;
nix.buildMachines = [
{
hostName = "nocomputer";
systems = ["x86_64-linux" "i686-linux"];
supportedFeatures = [
"benchmark"
"big-parallel"
"gccarch-znver4"
"kvm"
"nixos-test"
];
}
];
nix.extraOptions = ''
builders-use-substitutes = true
THENAS.* -/var/log/THENAS
'';
nix.distributedBuilds = true;
};
services.udev.extraRules = ''
# ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.coreutils}/bin/chgrp video /sys/class/backlight/%k/brightness"
# ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.coreutils}/bin/chmod g+w /sys/class/backlight/%k/brightness"
# nixpkgs.overlays = [
# (final: prev: {
# libinput = prev.libinput.overrideAttrs (old: {
# patches =
# (old.patches or [])
# ++ [
# ../extras/libinput-delay.patch
# ];
# });
# })
# ];
ACTION=="add|change", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0012", ATTR{power/wakeup}="disabled"
ACTION=="add|change", KERNEL=="i2c", SUBSYSTEM=="i2c", DEVPATH=="/sys/devices/platform/AMDI0010:03/i2c-1/i2c-PIXA3854:00", ATTR{power/wakeup}="disabled"
environment.systemPackages = with pkgs; [
fw-ectool
framework-tool
nvtopPackages.amd
lact
];
# ACTION=="add", SUBSYSTEM=="acpi", DRIVERS=="button", ATTRS{hid}=="PNP0C0D", ATTR{power/wakeup}="disabled"
# ACTION=="add", SUBSYSTEM=="serio", DRIVERS=="atkbd", ATTR{power/wakeup}="disabled"
# ACTION=="add", SUBSYSTEM=="i2c", DRIVERS=="i2c_hid_acpi", ATTRS{name}=="PIXA3854:00", ATTR{power/wakeup}="disabled"
'';
systemd.services.lactd.wantedBy = ["multi-user.target"];
services.fprintd.enable = true;
services.fwupd.enable = true;
services.tailscale.useRoutingFeatures = "client";
systemd.services."backlight@backlight:amdgpu_bl2".enable = false;
boot.kernelPackages = pkgs.linuxPackages_latest;
# boot.initrd.availableKernelModules = [
# "nvme"
# "sd_mod"
# "thunderbolt"
# "usb_storage"
# "xhci_pci"
# "usbhid"
# "uas"
# ];
boot.kernelParams = [
"amdgpu.abmlevel=1"
# "amdgpu.dcdebugmask=0x400"
# "mem_sleep_default=deep"
];
# boot.kernelModules = ["kvm-amd"];
boot.kernelModules = ["amdgpu"];
powerManagement.cpuFreqGovernor = "powersave";
systemd.sleep.extraConfig = "HibernateDelaySec=360m";
nix.buildMachines = [
{
hostName = "nocomputer";
systems = ["x86_64-linux" "i686-linux"];
supportedFeatures = [
"benchmark"
"big-parallel"
"gccarch-znver4"
"kvm"
"nixos-test"
];
}
];
nix.extraOptions = ''
builders-use-substitutes = true
'';
nix.distributedBuilds = true;
networking.hostName = "NOlaptop";
services.udev.extraRules = ''
# ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.coreutils}/bin/chgrp video /sys/class/backlight/%k/brightness"
# ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.coreutils}/bin/chmod g+w /sys/class/backlight/%k/brightness"
ACTION=="add|change", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0012", ATTR{power/wakeup}="disabled"
ACTION=="add|change", KERNEL=="i2c", SUBSYSTEM=="i2c", DEVPATH=="/sys/devices/platform/AMDI0010:03/i2c-1/i2c-PIXA3854:00", ATTR{power/wakeup}="disabled"
# ACTION=="add", SUBSYSTEM=="acpi", DRIVERS=="button", ATTRS{hid}=="PNP0C0D", ATTR{power/wakeup}="disabled"
# ACTION=="add", SUBSYSTEM=="serio", DRIVERS=="atkbd", ATTR{power/wakeup}="disabled"
# ACTION=="add", SUBSYSTEM=="i2c", DRIVERS=="i2c_hid_acpi", ATTRS{name}=="PIXA3854:00", ATTR{power/wakeup}="disabled"
'';
services.fprintd.enable = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
# boot.initrd.availableKernelModules = [
# "nvme"
# "sd_mod"
# "thunderbolt"
# "usb_storage"
# "xhci_pci"
# "usbhid"
# "uas"
# ];
boot.kernelParams = [
"amdgpu.abmlevel=1"
# "amdgpu.dcdebugmask=0x400"
# "mem_sleep_default=deep"
];
# boot.kernelModules = ["kvm-amd"];
boot.kernelModules = ["amdgpu"];
powerManagement.cpuFreqGovernor = "powersave";
systemd.sleep.extraConfig = "HibernateDelaySec=360m";
networking.hostName = "NOlaptop";
}