rbuh
This commit is contained in:
parent
67619e3478
commit
50eb5f227a
5 changed files with 537 additions and 456 deletions
154
extras/analog-input-internal-mic.conf
Normal file
154
extras/analog-input-internal-mic.conf
Normal 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
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
# let
|
# let
|
||||||
# if_desktop =
|
# if_desktop =
|
||||||
|
|
@ -10,96 +10,97 @@
|
||||||
# else false;
|
# else false;
|
||||||
# in
|
# in
|
||||||
{
|
{
|
||||||
# aagl.url = "github:ezKEa/aagl-gtk-on-nix";
|
# programs.noisetorch.enable = true;
|
||||||
# aagl.inputs.nixpkgs.follows = "nixpkgs";
|
# aagl.url = "github:ezKEa/aagl-gtk-on-nix";
|
||||||
|
# aagl.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# parsec-bin
|
# parsec-bin
|
||||||
# yuzu # nintendo can suck the shit out of my asshole
|
# yuzu # nintendo can suck the shit out of my asshole
|
||||||
gamemode
|
gamemode
|
||||||
heroic
|
heroic
|
||||||
lutris
|
lutris
|
||||||
mangohud
|
mangohud
|
||||||
prismlauncher
|
prismlauncher
|
||||||
protonup-qt
|
protonup-qt
|
||||||
r2modman
|
r2modman
|
||||||
wine
|
wine
|
||||||
temurin-jre-bin-17
|
temurin-jre-bin-17
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [25565];
|
networking.firewall.allowedTCPPorts = [25565];
|
||||||
|
|
||||||
programs.steam = {
|
programs.steam = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# remotePlay.openFirewall = true;
|
# remotePlay.openFirewall = true;
|
||||||
# gamescopeSession.enable = false;
|
# gamescopeSession.enable = false;
|
||||||
};
|
};
|
||||||
programs.gamemode.enable = true;
|
programs.gamemode.enable = true;
|
||||||
programs.gamescope.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";
|
command = "${pkgs.systemd}/bin/bootctl set-oneshot auto-windows";
|
||||||
type = "-";
|
options = ["NOPASSWD"];
|
||||||
item = "nice";
|
|
||||||
value = -20;
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
security.sudo-rs.extraRules = [
|
groups = ["wheel"];
|
||||||
{
|
}
|
||||||
commands = [
|
];
|
||||||
{
|
|
||||||
command = "${pkgs.systemd}/bin/bootctl set-oneshot auto-windows";
|
|
||||||
options = ["NOPASSWD"];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
groups = ["wheel"];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
# THE FINALS audio borked
|
# THE FINALS audio borked
|
||||||
# services.pipewire.enable = !if_desktop;
|
# services.pipewire.enable = !if_desktop;
|
||||||
# hardware.pulseaudio.enable = if_desktop;
|
# hardware.pulseaudio.enable = if_desktop;
|
||||||
# hardware.pulseaudio.support32Bit = if_desktop;
|
# hardware.pulseaudio.support32Bit = if_desktop;
|
||||||
# services.pipewire.extraConfig = {
|
# services.pipewire.extraConfig = {
|
||||||
# pipewire."99-low-latency" = {
|
# pipewire."99-low-latency" = {
|
||||||
# context.properties = {
|
# context.properties = {
|
||||||
# default.allowed-rates = [44100 48000 96000 192000];
|
# default.allowed-rates = [44100 48000 96000 192000];
|
||||||
# default.clock.rate = 192000;
|
# default.clock.rate = 192000;
|
||||||
# default.clock.quantum = 32;
|
# default.clock.quantum = 32;
|
||||||
# default.clock.min-quantum = 32;
|
# default.clock.min-quantum = 32;
|
||||||
# default.clock.max-quantum = 32;
|
# default.clock.max-quantum = 32;
|
||||||
# };
|
# };
|
||||||
# context.modules = [
|
# context.modules = [
|
||||||
# {
|
# {
|
||||||
# name = "libpipewire-module-rt";
|
# name = "libpipewire-module-rt";
|
||||||
# args = {
|
# args = {
|
||||||
# nice.level = -12;
|
# nice.level = -12;
|
||||||
# rt.prio = 89;
|
# rt.prio = 89;
|
||||||
# rt.time.soft = 200000;
|
# rt.time.soft = 200000;
|
||||||
# rt.time.hard = 200000;
|
# rt.time.hard = 200000;
|
||||||
# };
|
# };
|
||||||
# flags = ["ifexists nofail"];
|
# flags = ["ifexists nofail"];
|
||||||
# }
|
# }
|
||||||
# ];
|
# ];
|
||||||
# };
|
# };
|
||||||
# pipewire-pulse."99-low-latency" = {
|
# pipewire-pulse."99-low-latency" = {
|
||||||
# context.modules = [
|
# context.modules = [
|
||||||
# {
|
# {
|
||||||
# name = "libpipewire-module-protocol-pulse";
|
# name = "libpipewire-module-protocol-pulse";
|
||||||
# args = {
|
# args = {
|
||||||
# pulse.min.req = "32/192000";
|
# pulse.min.req = "32/192000";
|
||||||
# pulse.default.req = "32/192000";
|
# pulse.default.req = "32/192000";
|
||||||
# pulse.max.req = "32/192000";
|
# pulse.max.req = "32/192000";
|
||||||
# pulse.min.quantum = "32/192000";
|
# pulse.min.quantum = "32/192000";
|
||||||
# pulse.max.quantum = "32/192000";
|
# pulse.max.quantum = "32/192000";
|
||||||
# };
|
# };
|
||||||
# }
|
# }
|
||||||
# ];
|
# ];
|
||||||
# stream.properties = {
|
# stream.properties = {
|
||||||
# node.latency = "32/192000";
|
# node.latency = "32/192000";
|
||||||
# resample.quality = 1;
|
# resample.quality = 1;
|
||||||
# };
|
# };
|
||||||
# };
|
# };
|
||||||
# };
|
# };
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,194 +1,194 @@
|
||||||
{
|
{
|
||||||
inputs,
|
inputs,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# inputs.helix.packages.${pkgs.system}.default
|
# inputs.helix.packages.${pkgs.system}.default
|
||||||
# screen
|
# screen
|
||||||
bat
|
bat
|
||||||
bottom
|
bottom
|
||||||
cifs-utils
|
cifs-utils
|
||||||
du-dust
|
du-dust
|
||||||
dumbpipe
|
dumbpipe
|
||||||
exfatprogs
|
exfatprogs
|
||||||
fastfetch
|
fastfetch
|
||||||
ffmpeg
|
ffmpeg
|
||||||
firefox
|
firefox
|
||||||
git
|
git
|
||||||
helix
|
helix
|
||||||
inputs.agenix.packages.${pkgs.system}.default
|
inputs.agenix.packages.${pkgs.system}.default
|
||||||
inputs.zen-browser.packages."${system}".default
|
inputs.zen-browser.packages."${system}".default
|
||||||
jujutsu
|
jujutsu
|
||||||
mesa
|
mesa
|
||||||
mpv
|
mpv
|
||||||
ouch
|
ouch
|
||||||
pueue
|
pueue
|
||||||
ripgrep
|
ripgrep
|
||||||
# rustdesk
|
# rustdesk
|
||||||
sendme
|
sendme
|
||||||
skim
|
skim
|
||||||
tree
|
tree
|
||||||
wezterm
|
wezterm
|
||||||
wget
|
wget
|
||||||
zstd
|
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 = {
|
environment.variables = {
|
||||||
# enable = true;
|
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;
|
time.timeZone = lib.mkDefault "US/Pacific";
|
||||||
programs.firefox.policies = {
|
# services.automatic-timezoned.enable = lib.mkDefault true;
|
||||||
DisablePocket = true;
|
# i18n.defaultLocale = "en_US.UTF-8";
|
||||||
PasswordManagerEnabled = false;
|
# i18n.extraLocaleSettings = {
|
||||||
NoDefaultBookmarks = false;
|
# LC_CTYPE = "en_US.UTF-8";
|
||||||
};
|
# LC_MESSAGES = "en_US.UTF-8";
|
||||||
programs.firefox.preferences = {
|
# LC_ALL = "en_US.UTF-8";
|
||||||
"media.ffmpeg.vaapi.enabled" = true;
|
# };
|
||||||
|
|
||||||
"widget.use-xdg-desktop-portal.file-picker" = 1;
|
systemd.extraConfig = ''
|
||||||
"widget.use-xdg-desktop-portal.location" = 1;
|
DefaultTimeoutStopSec=15s
|
||||||
"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;
|
zramSwap = {
|
||||||
"browser.bookmarks.restore_default_bookmarks" = false;
|
enable = true;
|
||||||
};
|
algorithm = "zstd";
|
||||||
|
};
|
||||||
|
|
||||||
hardware.graphics.enable = true;
|
boot.loader.systemd-boot.enable = lib.mkDefault true;
|
||||||
# hardware.opengl = {
|
boot.loader.efi.canTouchEfiVariables = lib.mkDefault true;
|
||||||
# enable = true;
|
boot.loader.timeout = lib.mkForce 1;
|
||||||
# extraPackaged = with pkgs; [
|
# boot.supportedFilesystems = ["ntfs" "btrfs"];
|
||||||
# libvdpau-va-gl
|
hardware.enableAllFirmware = true;
|
||||||
# ];
|
hardware.bluetooth.enable = lib.mkDefault true;
|
||||||
# };
|
# hardware.bluetooth.settings.General.Experimental = true;
|
||||||
services.xserver.enable = lib.mkDefault true;
|
|
||||||
services.xserver.excludePackages = [pkgs.xterm];
|
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||||
services.xserver.xkb.layout = "us";
|
|
||||||
systemd.services.display-manager.restartIfChanged = false;
|
nix.settings = {
|
||||||
services.displayManager.sddm.enable = lib.mkDefault true;
|
experimental-features = "nix-command flakes";
|
||||||
services.displayManager.sddm.wayland.enable = true;
|
auto-optimise-store = true;
|
||||||
services.desktopManager.plasma6.enable = lib.mkDefault true;
|
# adding logged in users allows for passwordless root
|
||||||
environment.plasma6.excludePackages = with pkgs; [
|
# trusted-users = ["root"];
|
||||||
kdePackages.elisa
|
system-features = [
|
||||||
kdePackages.konsole
|
"benchmark"
|
||||||
kdePackages.gwenview
|
"big-parallel"
|
||||||
kdePackages.kate
|
"gccarch-znver3"
|
||||||
xterm
|
"gccarch-znver4"
|
||||||
|
"kvm"
|
||||||
|
"nixos-test"
|
||||||
];
|
];
|
||||||
|
};
|
||||||
|
nixpkgs.config = {allowUnfree = true;};
|
||||||
|
nix.nixPath = ["nixpkgs=${pkgs.path}"];
|
||||||
|
|
||||||
services.openssh.enable = true;
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
users.users.root.openssh.authorizedKeys.keys = [
|
system.stateVersion = lib.mkDefault "23.05";
|
||||||
];
|
|
||||||
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";
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,14 +10,12 @@
|
||||||
programs.partition-manager.enable = false;
|
programs.partition-manager.enable = false;
|
||||||
|
|
||||||
services.printing.enable = false;
|
services.printing.enable = false;
|
||||||
i18n.inputMethod = {};
|
i18n.inputMethod.enable = false;
|
||||||
|
|
||||||
services.xserver.enable = false;
|
|
||||||
services.desktopManager.plasma6.enable = false;
|
services.desktopManager.plasma6.enable = false;
|
||||||
|
|
||||||
# services.pipewire.enable = false;
|
|
||||||
# services.pulseaudio.enable = true;
|
|
||||||
hardware.raspberry-pi."4" = {
|
hardware.raspberry-pi."4" = {
|
||||||
|
apply-overlays-dtmerge.enable = true;
|
||||||
bluetooth.enable = true;
|
bluetooth.enable = true;
|
||||||
fkms-3d.enable = true;
|
fkms-3d.enable = true;
|
||||||
};
|
};
|
||||||
|
|
@ -34,79 +32,6 @@
|
||||||
boot.loader.efi.canTouchEfiVariables = false;
|
boot.loader.efi.canTouchEfiVariables = false;
|
||||||
|
|
||||||
# Configure for modesetting in the device tree
|
# 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 = {
|
fileSystems = {
|
||||||
"/" = {
|
"/" = {
|
||||||
device = "/dev/disk/by-label/NIXOS_SD";
|
device = "/dev/disk/by-label/NIXOS_SD";
|
||||||
|
|
|
||||||
|
|
@ -1,121 +1,122 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
hardware.opengl.extraPackages = with pkgs; [
|
# let
|
||||||
amdvlk
|
# boostless = pkgs.pipewire.overrideAttrs (old: {
|
||||||
];
|
# postInstall =
|
||||||
hardware.opengl.extraPackages32 = with pkgs; [
|
# old.postInstall or ""
|
||||||
driversi686Linux.amdvlk
|
# + ''
|
||||||
];
|
# '';
|
||||||
services.xserver.videoDrivers = [
|
# });
|
||||||
"amdgpu"
|
# in
|
||||||
];
|
{
|
||||||
|
environment.etc."alsa-card-profile/analog-input-internal-mic.conf".source = ../extras/analog-input-internal-mic.conf;
|
||||||
|
|
||||||
# services.pipewire.wireplumber.extraConfig = {
|
hardware.opengl.extraPackages = with pkgs; [
|
||||||
# "wireplumber.settings" = {
|
amdvlk
|
||||||
# "device.routes.default-source-volume" = 0.42;
|
];
|
||||||
# };
|
hardware.opengl.extraPackages32 = with pkgs; [
|
||||||
# };
|
driversi686Linux.amdvlk
|
||||||
|
];
|
||||||
|
services.xserver.videoDrivers = [
|
||||||
|
"amdgpu"
|
||||||
|
];
|
||||||
|
|
||||||
services.rsyslogd = {
|
# services.pipewire.wireplumber.extraConfig = {
|
||||||
enable = true;
|
# "wireplumber.settings" = {
|
||||||
extraConfig = ''
|
# "device.routes.default-source-volume" = 0.42;
|
||||||
module(load="imudp")
|
# };
|
||||||
input(type="imudp" port="514")
|
# };
|
||||||
|
|
||||||
THENAS.* -/var/log/THENAS
|
services.rsyslogd = {
|
||||||
'';
|
enable = true;
|
||||||
};
|
extraConfig = ''
|
||||||
|
module(load="imudp")
|
||||||
|
input(type="imudp" port="514")
|
||||||
|
|
||||||
# boot.kernelPatches = [
|
THENAS.* -/var/log/THENAS
|
||||||
# (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
|
|
||||||
'';
|
'';
|
||||||
nix.distributedBuilds = true;
|
};
|
||||||
|
|
||||||
services.udev.extraRules = ''
|
# nixpkgs.overlays = [
|
||||||
# ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.coreutils}/bin/chgrp video /sys/class/backlight/%k/brightness"
|
# (final: prev: {
|
||||||
# ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.coreutils}/bin/chmod g+w /sys/class/backlight/%k/brightness"
|
# 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"
|
environment.systemPackages = with pkgs; [
|
||||||
ACTION=="add|change", KERNEL=="i2c", SUBSYSTEM=="i2c", DEVPATH=="/sys/devices/platform/AMDI0010:03/i2c-1/i2c-PIXA3854:00", ATTR{power/wakeup}="disabled"
|
fw-ectool
|
||||||
|
framework-tool
|
||||||
|
nvtopPackages.amd
|
||||||
|
lact
|
||||||
|
];
|
||||||
|
|
||||||
# ACTION=="add", SUBSYSTEM=="acpi", DRIVERS=="button", ATTRS{hid}=="PNP0C0D", ATTR{power/wakeup}="disabled"
|
systemd.services.lactd.wantedBy = ["multi-user.target"];
|
||||||
# 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;
|
services.fwupd.enable = true;
|
||||||
|
services.tailscale.useRoutingFeatures = "client";
|
||||||
|
systemd.services."backlight@backlight:amdgpu_bl2".enable = false;
|
||||||
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
nix.buildMachines = [
|
||||||
# boot.initrd.availableKernelModules = [
|
{
|
||||||
# "nvme"
|
hostName = "nocomputer";
|
||||||
# "sd_mod"
|
systems = ["x86_64-linux" "i686-linux"];
|
||||||
# "thunderbolt"
|
supportedFeatures = [
|
||||||
# "usb_storage"
|
"benchmark"
|
||||||
# "xhci_pci"
|
"big-parallel"
|
||||||
# "usbhid"
|
"gccarch-znver4"
|
||||||
# "uas"
|
"kvm"
|
||||||
# ];
|
"nixos-test"
|
||||||
boot.kernelParams = [
|
];
|
||||||
"amdgpu.abmlevel=1"
|
}
|
||||||
# "amdgpu.dcdebugmask=0x400"
|
];
|
||||||
# "mem_sleep_default=deep"
|
nix.extraOptions = ''
|
||||||
];
|
builders-use-substitutes = true
|
||||||
# boot.kernelModules = ["kvm-amd"];
|
'';
|
||||||
boot.kernelModules = ["amdgpu"];
|
nix.distributedBuilds = true;
|
||||||
powerManagement.cpuFreqGovernor = "powersave";
|
|
||||||
systemd.sleep.extraConfig = "HibernateDelaySec=360m";
|
|
||||||
|
|
||||||
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";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue