Merge remote-tracking branch 'origin/main'
Some checks failed
/ check (push) Failing after 3m0s

This commit is contained in:
Daniel Flanagan 2024-09-23 15:01:52 -05:00
commit 095bfdddfc
6 changed files with 306 additions and 31 deletions

View file

@ -364,10 +364,10 @@
home-manager-defaults
hardware.nixosModules.common-pc-ssd
common
gaming
graphical-workstation
plasma6
./nixos/htpc.nix

View file

@ -42,6 +42,8 @@ if has_command skim
set --export --universal SKIM_CTRL_T_COMMAND "fd --hidden"
end
set --export --universal NEWT_COLORS "root=black,black:border=black,blue"
# colors
set -U fish_color_normal normal # default color
set -U fish_color_command white # base command being run (>ls< -la)

View file

@ -152,8 +152,8 @@
];
}
{command = "mako";}
{command = "firefox";}
{command = "wezterm";}
# {command = "firefox";}
# {command = "wezterm";}
];
modes = {
@ -284,19 +284,32 @@
# TODO: this should also reset the horizontal and vertical gaps?
"${mod}+control+equal" = "gaps inner current set 0";
"${mod}+shift+v" = "exec swayosd-client --input-volume mute-toggle";
"${mod}+F1" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioRaiseVolume" = "exec swayosd-client --output-volume raise";
"XF86AudioLowerVolume" = "exec swayosd-client --output-volume lower";
"XF86AudioMute" = "exec swayosd-client --output-volume mute-toggle";
"XF86AudioMicMute" = "exec swayosd-client --input-volume mute-toggle";
"${mod}+shift+v" = "exec swayosd-client --input-volume mute-toggle";
"XF86MonBrightnessUp" = "exec swayosd-client --brightness raise";
"XF86MonBrightnessDown" = "exec swayosd-client --brightness lower";
"control+XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +1%";
"control+XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -1%";
"${mod}+F1" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioPlay" = "exec playerctl play-pause";
"XF86AudioNext" = "exec playerctl next";
"XF86AudioPrev" = "exec playerctl previous";
"--locked ${mod}+shift+v" = "exec swayosd-client --input-volume mute-toggle";
"--locked ${mod}+F1" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
"--locked XF86AudioRaiseVolume" = "exec swayosd-client --output-volume raise";
"--locked XF86AudioLowerVolume" = "exec swayosd-client --output-volume lower";
"--locked XF86AudioMute" = "exec swayosd-client --output-volume mute-toggle";
"--locked XF86AudioMicMute" = "exec swayosd-client --input-volume mute-toggle";
"--locked XF86MonBrightnessUp" = "exec swayosd-client --brightness raise";
"--locked XF86MonBrightnessDown" = "exec swayosd-client --brightness lower";
"--locked control+XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +1%";
"--locked control+XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -1%";
"--locked XF86AudioPlay" = "exec playerctl play-pause";
"--locked XF86AudioNext" = "exec playerctl next";
"--locked XF86AudioPrev" = "exec playerctl previous";
/*
"XF86MonBrightnessUp" = " exec swayosd-client --brightness 10";

View file

@ -403,6 +403,19 @@
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"
'';
services.upower.enable = true;
# NOTE: I previously let plasma settings handle this
services.logind = {
lidSwitch = "suspend-then-hibernate";
extraConfig = ''
HandleLidSwitchDocked=ignore
HandlePowerKey=suspend-then-hibernate
IdleActionSec=11m
IdleAction=suspend-then-hibernate
'';
};
};
emacs = {pkgs, ...}: {
@ -540,6 +553,7 @@
hexyl
pkgs.unixtools.xxd
usbutils
comma
];
};
@ -569,7 +583,6 @@
...
}: {
imports = with nixosModules; [
plasma6
sway
# hyprland
enable-flatpaks-and-appimages
@ -932,6 +945,10 @@
TODO: powersave?
TODO: can I pre-configure my usual wifi networks with SSIDs and PSKs loaded from secrets?
*/
hardware.wirelessRegulatoryDatabase = true;
boot.extraModprobeConfig = ''
options cfg80211 ieee80211_regdom="US"
'';
};
steam = {pkgs, ...}: {

View file

@ -1,4 +1,244 @@
{pkgs, ...}: {
{pkgs, ...}:
/*
## source: https://community.frame.work/t/speakers-sound-quality/1078/82
let
pipewire-speakers-profile-json = ''{
"output": {
"blocklist": [],
"equalizer": {
"balance": 0.0,
"bypass": false,
"input-gain": 0.0,
"left": {
"band0": {
"frequency": 100.0,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 1.0,
"slope": "x4",
"solo": false,
"type": "Hi-pass"
},
"band1": {
"frequency": 150.0,
"gain": 4.02,
"mode": "RLC (BT)",
"mute": false,
"q": 3.0,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band2": {
"frequency": 600.0,
"gain": -5.07,
"mode": "RLC (BT)",
"mute": false,
"q": 4.000000000000008,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band3": {
"frequency": 1200.0,
"gain": -3.49,
"mode": "RLC (BT)",
"mute": false,
"q": 4.17,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band4": {
"frequency": 2000.0,
"gain": 1.43,
"mode": "RLC (BT)",
"mute": false,
"q": 4.0,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band5": {
"frequency": 5300.0,
"gain": 3.84,
"mode": "RLC (BT)",
"mute": false,
"q": 2.64,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band6": {
"frequency": 6000.0,
"gain": 4.02,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Hi-shelf"
},
"band7": {
"frequency": 7500.0,
"gain": -2.09,
"mode": "RLC (BT)",
"mute": false,
"q": 3.0,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band8": {
"frequency": 8000.0,
"gain": 2.01,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band9": {
"frequency": 900.0,
"gain": -4.12,
"mode": "RLC (BT)",
"mute": false,
"q": 5.909999999999967,
"slope": "x1",
"solo": false,
"type": "Bell"
}
},
"mode": "IIR",
"num-bands": 10,
"output-gain": -1.5,
"pitch-left": 0.0,
"pitch-right": 0.0,
"right": {
"band0": {
"frequency": 100.0,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 1.0,
"slope": "x4",
"solo": false,
"type": "Hi-pass"
},
"band1": {
"frequency": 150.0,
"gain": 4.02,
"mode": "RLC (BT)",
"mute": false,
"q": 3.0,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band2": {
"frequency": 600.0,
"gain": -5.07,
"mode": "RLC (BT)",
"mute": false,
"q": 4.000000000000008,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band3": {
"frequency": 1200.0,
"gain": -3.49,
"mode": "RLC (BT)",
"mute": false,
"q": 4.17,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band4": {
"frequency": 2000.0,
"gain": 1.43,
"mode": "RLC (BT)",
"mute": false,
"q": 4.0,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band5": {
"frequency": 5300.0,
"gain": 3.84,
"mode": "RLC (BT)",
"mute": false,
"q": 2.64,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band6": {
"frequency": 6000.0,
"gain": 4.02,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Hi-shelf"
},
"band7": {
"frequency": 7500.0,
"gain": -2.09,
"mode": "RLC (BT)",
"mute": false,
"q": 3.0,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band8": {
"frequency": 8000.0,
"gain": 2.01,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band9": {
"frequency": 900.0,
"gain": -4.12,
"mode": "RLC (BT)",
"mute": false,
"q": 5.909999999999967,
"slope": "x1",
"solo": false,
"type": "Bell"
}
},
"split-channels": false
},
"loudness": {
"bypass": false,
"clipping": false,
"clipping-range": 6.0,
"fft": "4096",
"input-gain": 0.0,
"output-gain": 0.0,
"std": "ISO226-2003",
"volume": 6.999999999999991
},
"plugins_order": [
"loudness",
"equalizer"
]
}
}'';
in
*/
{
imports = [
{
system.stateVersion = "24.05";
@ -6,8 +246,6 @@
networking.hostName = "foxtrot";
}
{
# laptop power management
services.upower.enable = true;
swapDevices = [
# TODO: move this to disko?
# NOTE(oninstall):
@ -20,20 +258,9 @@
];
# findmnt -no UUID -T /swap/swapfile
boot.resumeDevice = "/dev/disk/by-uuid/81c3354a-f629-4b6b-a249-7705aeb9f0d5";
systemd.sleep.extraConfig = "HibernateDelaySec=30m";
systemd.sleep.extraConfig = "HibernateDelaySec=121m";
services.fwupd.enable = true;
services.fwupd.extraRemotes = ["lvfs-testing"];
# NOTE: I previously let plasma settings handle this
services.logind = {
lidSwitch = "suspend-then-hibernate";
extraConfig = ''
HandleLidSwitchDocked=ignore
HandlePowerKey=suspend-then-hibernate
IdleActionSec=11m
IdleAction=suspend-then-hibernate
'';
};
}
];
@ -77,10 +304,15 @@
output = {
"BOE NE135A1M-NY1 Unknown" = {
mode = "2880x1920@120Hz";
position = "0,0";
position = "1092,2160";
scale = toString 1.75;
};
"Dell Inc. DELL U2720Q CWTM623" = {
mode = "3840x2160@60Hz";
position = "0,0";
};
/*
"BOE 0x0BCA Unknown" = {
mode = "2256x1504@60Hz";
@ -111,7 +343,6 @@
];
networking.networkmanager.wifi.powersave = false;
hardware.wirelessRegulatoryDatabase = true;
hardware.framework.amd-7040.preventWakeOnAC = true;
@ -155,9 +386,6 @@
];
initrd.availableKernelModules = ["xhci_pci" "nvme" "thunderbolt"];
kernelModules = ["kvm-amd"];
extraModprobeConfig = ''
options cfg80211 ieee80211_regdom="US"
'';
};
hardware.bluetooth = {
enable = true;
@ -178,7 +406,7 @@
};
services.fprintd = {
enable = true;
enable = false;
package = pkgs.fprintd.overrideAttrs {
# Source: https://github.com/NixOS/nixpkgs/commit/87ca2dc071581aea0e691c730d6844f1beb07c9f
mesonCheckFlags = [

View file

@ -5,9 +5,6 @@
}: {
networking.hostName = "thablet";
home-manager.users.daniel = {
};
boot.loader.systemd-boot.enable = true;
services.fprintd = {
@ -48,7 +45,11 @@
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
powerOnBoot = false;
};
services.power-profiles-daemon = {
enable = true;
};
networking = {
@ -61,5 +62,19 @@
};
};
home-manager.users.daniel = {
wayland.windowManager.sway = {
config = {
output = {
"AU Optronics 0x2236 Unknown" = {
mode = "2560x1440@60Hz";
position = "0,0";
scale = toString 1.25;
};
};
};
};
};
system.stateVersion = "24.05";
}