update packages and hardware

This commit is contained in:
Dmitriy Kholkin 2021-06-29 22:29:22 +03:00
parent f290bef00c
commit 5e4cd54ba1
6 changed files with 67 additions and 36 deletions

View File

@ -87,20 +87,18 @@ with config.deviceSpecific; {
zathura zathura
# misc # misc
i3status-rust # i3status-rust
papirus-icon-theme
] ++ lib.optionals (!(isVM || isISO)) [ ] ++ lib.optionals (!(isVM || isISO)) [
# rust-stable # rust-stable
libreoffice libreoffice
] ++ lib.optionals isGaming [ ] ++ lib.optionals isGaming [
# lutris lutris
protontricks protontricks
# retroarch # retroarch
(steam.override { withJava = true; }) # (steam.override { withJava = true; })
steam-run # steam-run
# winetricks wine
(winetricks.override { wine = wineWowPackages.full; }) winetricks
wineWowPackages.full
] ++ lib.optionals isLaptop [ ] ++ lib.optionals isLaptop [
acpi acpi
] ++ lib.optionals (config.device == "AMD-Workstation") [ ] ++ lib.optionals (config.device == "AMD-Workstation") [

View File

@ -0,0 +1,4 @@
{ pkgs, ... }: {
programs.steam.enable = true;
hardware.steam-hardware.enable = true;
}

View File

@ -15,14 +15,21 @@ with config.deviceSpecific; {
driSupport32Bit = true; driSupport32Bit = true;
extraPackages = if devInfo.gpu.vendor == "intel" then [ extraPackages = if devInfo.gpu.vendor == "intel" then [
pkgs.intel-media-driver pkgs.intel-media-driver
] else if devInfo.gpu.vendor == "intel" then [
pkgs.amdvlk
] else [ ]; ] else [ ];
extraPackages32 = lib.mkIf (devInfo.gpu.vendor == "amd") [
pkgs.driversi686Linux.amdvlk
];
}; };
environment.sessionVariables = { environment.sessionVariables = {
GST_VAAPI_ALL_DRIVERS = "1"; GST_VAAPI_ALL_DRIVERS = "1";
LIBVA_DRIVER_NAME = "iHD"; LIBVA_DRIVER_NAME = "iHD";
}; };
environment.systemPackages = if devInfo.gpu.vendor == "amd" then boot.initrd.kernelModules = lib.mkIf (devInfo.gpu.vendor == "amd") [ "amdgpu" ];
[ (pkgs.mesa.override { enableRadv = true; }) ] # environment.systemPackages = if devInfo.gpu.vendor == "amd" then
else # # [ (pkgs.mesa.override { enableRadv = true; }) ]
[ ]; # [ pkgs.mesa ]
# else
# [ ];
} }

View File

@ -25,6 +25,7 @@ with config.deviceSpecific; {
"cdrom" "cdrom"
"scanner" "scanner"
"lp" "lp"
"dialout"
]; ];
description = "Дмитрий Холкин"; description = "Дмитрий Холкин";
uid = 1000; uid = 1000;
@ -33,11 +34,15 @@ with config.deviceSpecific; {
}; };
security.sudo = { security.sudo = {
enable = true; enable = true;
extraConfig = lib.mkIf isLaptop '' extraConfig = lib.concatStrings [''
alukard ALL = (root) NOPASSWD: /run/current-system/sw/bin/btrfs fi usage /
''
(if (isLaptop) then ''
alukard ALL = (root) NOPASSWD: /run/current-system/sw/bin/tlp-stat alukard ALL = (root) NOPASSWD: /run/current-system/sw/bin/tlp-stat
alukard ALL = (root) NOPASSWD: /run/current-system/sw/bin/tlp ac alukard ALL = (root) NOPASSWD: /run/current-system/sw/bin/tlp ac
alukard ALL = (root) NOPASSWD: /run/current-system/sw/bin/tlp bat alukard ALL = (root) NOPASSWD: /run/current-system/sw/bin/tlp bat
''; '' else "")
];
}; };
# nix.requireSignedBinaryCaches = false; # nix.requireSignedBinaryCaches = false;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;

View File

@ -7,6 +7,42 @@
alsa.support32Bit = true; alsa.support32Bit = true;
pulse.enable = true; pulse.enable = true;
# jack.enable = true; # jack.enable = true;
config.pipewire-pulse = {
"context.modules" = [
{
"name" = "libpipewire-module-rtkit";
"args" = {};
"flags" = [
"ifexists"
"nofail"
];
}
{
"name" = "libpipewire-module-protocol-native";
}
{
"name" = "libpipewire-module-client-node";
}
{
"name" = "libpipewire-module-adapter";
}
{
"name" = "libpipewire-module-metadata";
}
{
"name" = "libpipewire-module-protocol-pulse";
"args" = {
"server.address" = [
"unix:native"
"tcp:127.0.0.1:8888" # IPv4 on a single address
];
"vm.overrides" = {
"pulse.min.quantum" = "1024/48000";
};
};
}
];
};
media-session.config.bluez-monitor.rules = [ media-session.config.bluez-monitor.rules = [
{ {
# Matches all cards # Matches all cards
@ -34,28 +70,6 @@
}; };
} }
]; ];
# media-session.config.bluez-monitor = {
# properties = { };
# rules = [
# {
# actions = {
# update-props = {
# "bluez5.auto-connect" = [ "hfp_hf" "hsp_hs" "a2dp_sink" ];
# "bluez5.hw-volume" =
# [ "hfp_ag" "hsp_ag" "a2dp_source" "a2dp_sink" ];
# };
# };
# matches = [{ "device.name" = "~bluez_card.*"; }];
# }
# {
# actions = { update-props = { "node.pause-on-idle" = false; }; };
# matches = [
# { "node.name" = "~bluez_input.*"; }
# { "node.name" = "~bluez_output.*"; }
# ];
# }
# ];
# };
}; };
security.rtkit.enable = true; security.rtkit.enable = true;

View File

@ -16,10 +16,13 @@
alacritty alacritty
kitty kitty
mopidy
mpv mpv
ncmpcpp
packages packages
rofi rofi
spotify spotify
steam
urxvt urxvt
vivaldi vivaldi
vscode vscode