add chrysalis
This commit is contained in:
parent
9193d6e469
commit
771b662dd7
17 changed files with 1186 additions and 486 deletions
63
XCompose
Normal file
63
XCompose
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
include "%L"
|
||||||
|
|
||||||
|
# compose 5 = euro
|
||||||
|
<Multi_key> <5> : "€" U20AC
|
||||||
|
|
||||||
|
# general typography
|
||||||
|
<Multi_key> <period> <period> : "…" U2026 # HORIZONTAL ELLIPSIS
|
||||||
|
<Multi_key> <v> <period> <period> : "⋮" U22EE # VERTICAL ELLIPSIS
|
||||||
|
<Multi_key> <c> <period> <period> : "⋯" U22EF # MIDLINE HORIZONTAL ELLIPSIS
|
||||||
|
|
||||||
|
# these aren't the cookie
|
||||||
|
<Multi_key> <equal> <A> : "Ā" U0100 # LATIN CAPITAL LETTER A WITH MACRON
|
||||||
|
<Multi_key> <equal> <a> : "ā" U0101 # LATIN SMALL LETTER A WITH MACRON
|
||||||
|
<Multi_key> <equal> <E> : "Ē" U0112 # LATIN CAPITAL LETTER E WITH MACRON
|
||||||
|
<Multi_key> <equal> <e> : "ē" U0113 # LATIN SMALL LETTER E WITH MACRON
|
||||||
|
<Multi_key> <equal> <I> : "Ī" U012A # LATIN CAPITAL LETTER I WITH MACRON
|
||||||
|
<Multi_key> <equal> <i> : "ī" U012B # LATIN SMALL LETTER I WITH MACRON
|
||||||
|
<Multi_key> <equal> <O> : "Ō" U014C # LATIN CAPITAL LETTER O WITH MACRON
|
||||||
|
<Multi_key> <equal> <o> : "ō" U014D # LATIN SMALL LETTER O WITH MACRON
|
||||||
|
<Multi_key> <equal> <U> : "Ū" U016A # LATIN CAPITAL LETTER U WITH MACRON
|
||||||
|
<Multi_key> <equal> <u> : "ū" U016B # LATIN SMALL LETTER U WITH MACRON
|
||||||
|
|
||||||
|
# puck keys
|
||||||
|
#- 2474;PARENTHESIZED DIGIT ONE;No;0;ON;<compat> 0028 0031 0029;;1;1;N;;;;;
|
||||||
|
<Multi_key> <parenleft> <period> <1> <parenright> : "⑴" U2474 # PARENTHESIZED DIGIT ONE
|
||||||
|
#- 2475;PARENTHESIZED DIGIT TWO;No;0;ON;<compat> 0028 0032 0029;;2;2;N;;;;;
|
||||||
|
<Multi_key> <parenleft> <period> <2> <parenright> : "⑵" U2475 # PARENTHESIZED DIGIT TWO
|
||||||
|
#- 2476;PARENTHESIZED DIGIT THREE;No;0;ON;<compat> 0028 0033 0029;;3;3;N;;;;;
|
||||||
|
<Multi_key> <parenleft> <period> <3> <parenright> : "⑶" U2476 # PARENTHESIZED DIGIT THREE
|
||||||
|
#- 2477;PARENTHESIZED DIGIT FOUR;No;0;ON;<compat> 0028 0034 0029;;4;4;N;;;;;
|
||||||
|
<Multi_key> <parenleft> <period> <4> <parenright> : "⑷" U2477 # PARENTHESIZED DIGIT FOUR
|
||||||
|
#- 2478;PARENTHESIZED DIGIT FIVE;No;0;ON;<compat> 0028 0035 0029;;5;5;N;;;;;
|
||||||
|
<Multi_key> <parenleft> <period> <5> <parenright> : "⑸" U2478 # PARENTHESIZED DIGIT FIVE
|
||||||
|
#- 2479;PARENTHESIZED DIGIT SIX;No;0;ON;<compat> 0028 0036 0029;;6;6;N;;;;;
|
||||||
|
<Multi_key> <parenleft> <period> <6> <parenright> : "⑹" U2479 # PARENTHESIZED DIGIT SIX
|
||||||
|
#- 247A;PARENTHESIZED DIGIT SEVEN;No;0;ON;<compat> 0028 0037 0029;;7;7;N;;;;;
|
||||||
|
<Multi_key> <parenleft> <period> <7> <parenright> : "⑺" U247A # PARENTHESIZED DIGIT SEVEN
|
||||||
|
#- 247B;PARENTHESIZED DIGIT EIGHT;No;0;ON;<compat> 0028 0038 0029;;8;8;N;;;;;
|
||||||
|
<Multi_key> <parenleft> <period> <8> <parenright> : "⑻" U247B # PARENTHESIZED DIGIT EIGHT
|
||||||
|
#- 247C;PARENTHESIZED DIGIT NINE;No;0;ON;<compat> 0028 0039 0029;;9;9;N;;;;;
|
||||||
|
<Multi_key> <parenleft> <period> <9> <parenright> : "⑼" U247C # PARENTHESIZED DIGIT NINE
|
||||||
|
#- 247D;PARENTHESIZED NUMBER TEN;No;0;ON;<compat> 0028 0031 0030 0029;;;10;N;;;;;
|
||||||
|
<Multi_key> <parenleft> <period> <1> <0> <parenright> : "⑽" U247D # PARENTHESIZED NUMBER TEN
|
||||||
|
#- 247E;PARENTHESIZED NUMBER ELEVEN;No;0;ON;<compat> 0028 0031 0031 0029;;;11;N;;;;;
|
||||||
|
<Multi_key> <parenleft> <period> <1> <1> <parenright> : "⑾" U247E # PARENTHESIZED NUMBER ELEVEN
|
||||||
|
#- 247F;PARENTHESIZED NUMBER TWELVE;No;0;ON;<compat> 0028 0031 0032 0029;;;12;N;;;;;
|
||||||
|
<Multi_key> <parenleft> <period> <1> <2> <parenright> : "⑿" U247F # PARENTHESIZED NUMBER TWELVE
|
||||||
|
#- 2480;PARENTHESIZED NUMBER THIRTEEN;No;0;ON;<compat> 0028 0031 0033 0029;;;13;N;;;;;
|
||||||
|
<Multi_key> <parenleft> <period> <1> <3> <parenright> : "⒀" U2480 # PARENTHESIZED NUMBER THIRTEEN
|
||||||
|
#- 2481;PARENTHESIZED NUMBER FOURTEEN;No;0;ON;<compat> 0028 0031 0034 0029;;;14;N;;;;;
|
||||||
|
<Multi_key> <parenleft> <period> <1> <4> <parenright> : "⒁" U2481 # PARENTHESIZED NUMBER FOURTEEN
|
||||||
|
#- 2482;PARENTHESIZED NUMBER FIFTEEN;No;0;ON;<compat> 0028 0031 0035 0029;;;15;N;;;;;
|
||||||
|
<Multi_key> <parenleft> <period> <1> <5> <parenright> : "⒂" U2482 # PARENTHESIZED NUMBER FIFTEEN
|
||||||
|
#- 2483;PARENTHESIZED NUMBER SIXTEEN;No;0;ON;<compat> 0028 0031 0036 0029;;;16;N;;;;;
|
||||||
|
<Multi_key> <parenleft> <period> <1> <6> <parenright> : "⒃" U2483 # PARENTHESIZED NUMBER SIXTEEN
|
||||||
|
#- 2484;PARENTHESIZED NUMBER SEVENTEEN;No;0;ON;<compat> 0028 0031 0037 0029;;;17;N;;;;;
|
||||||
|
<Multi_key> <parenleft> <period> <1> <7> <parenright> : "⒄" U2484 # PARENTHESIZED NUMBER SEVENTEEN
|
||||||
|
#- 2485;PARENTHESIZED NUMBER EIGHTEEN;No;0;ON;<compat> 0028 0031 0038 0029;;;18;N;;;;;
|
||||||
|
<Multi_key> <parenleft> <period> <1> <8> <parenright> : "⒅" U2485 # PARENTHESIZED NUMBER EIGHTEEN
|
||||||
|
#- 2486;PARENTHESIZED NUMBER NINETEEN;No;0;ON;<compat> 0028 0031 0039 0029;;;19;N;;;;;
|
||||||
|
<Multi_key> <parenleft> <period> <1> <9> <parenright> : "⒆" U2486 # PARENTHESIZED NUMBER NINETEEN
|
||||||
|
#- 2487;PARENTHESIZED NUMBER TWENTY;No;0;ON;<compat> 0028 0032 0030 0029;;;20;N;;;;;
|
||||||
|
<Multi_key> <parenleft> <period> <2> <0> <parenright> : "⒇" U2487 # PARENTHESIZED NUMBER TWENTY
|
12
flake.nix
12
flake.nix
|
@ -277,17 +277,15 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Valere (powerful laptop).
|
# Chrysalis (powerful Framework 13 laptop).
|
||||||
nixosConfigurations.valere = nixpkgs.lib.nixosSystem rec {
|
nixosConfigurations.chrysalis = nixpkgs.lib.nixosSystem rec {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = mkSpecialArgs system;
|
specialArgs = mkSpecialArgs system;
|
||||||
|
|
||||||
modules = linuxOfflineGuiModules [
|
modules = linuxOfflineGuiModules [
|
||||||
./nixos/hosts/valere
|
./nixos/hosts/chrysalis
|
||||||
./nixos/configs/steam.nix
|
./nixos/configs/power-saving-amd.nix
|
||||||
./nixos/configs/virt-host.nix
|
#./nixos/configs/vmware.nix
|
||||||
./nixos/configs/power-saving.nix
|
|
||||||
./nixos/configs/looking-glass.nix
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -165,7 +165,6 @@ UseIn=niri'')
|
||||||
# Also enable plasma, for when we need to use X11 for e.g. Talon.
|
# Also enable plasma, for when we need to use X11 for e.g. Talon.
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
services.desktopManager.plasma6.enable = true;
|
services.desktopManager.plasma6.enable = true;
|
||||||
services.power-profiles-daemon.enable = lib.mkForce false;
|
|
||||||
|
|
||||||
# Enable sound with pipewire.
|
# Enable sound with pipewire.
|
||||||
services.pulseaudio.enable = false;
|
services.pulseaudio.enable = false;
|
||||||
|
|
|
@ -168,9 +168,9 @@ in
|
||||||
accel-profile = "flat";
|
accel-profile = "flat";
|
||||||
};
|
};
|
||||||
|
|
||||||
keyboard = {
|
keyboard.xkb = {
|
||||||
# Make caps lock a second escape, and ralt a compose.
|
# Make caps lock a second escape, and ralt a compose.
|
||||||
xkb.options = "caps:escape,compose:ralt";
|
options = "caps:escape,compose:ralt";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,29 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
hostname = config.networking.hostName;
|
hostname = config.networking.hostName;
|
||||||
|
isAmd = config.hardware.cpu.amd.updateMicrocode;
|
||||||
isSmallScreen = (hostname == "utol");
|
isSmallScreen = (hostname == "utol");
|
||||||
|
cfg = config.deprekated.waybar;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
options.deprekated.waybar = {
|
||||||
|
|
||||||
|
hostSpecificCss = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "";
|
||||||
|
example = ''
|
||||||
|
window#waybar {
|
||||||
|
padding-left: 8px;
|
||||||
|
padding-right: 8px;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
description = ''
|
||||||
|
CSS to add to our waybar config on this system.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
|
||||||
# Pull in some dependencies for our bar.
|
# Pull in some dependencies for our bar.
|
||||||
environment.systemPackages = with pkgs; [ networkmanagerapplet ];
|
environment.systemPackages = with pkgs; [ networkmanagerapplet ];
|
||||||
|
@ -165,27 +185,6 @@ in
|
||||||
#!${pkgs.bash}/bin/bash
|
#!${pkgs.bash}/bin/bash
|
||||||
niri msg --json focused-window | jq -c '{text: (if ((.title | length) > 40) then (.title[:38] + "…") else .title end), tooltip: .app_id}' | sed 's/&[ $]/\& /g'
|
niri msg --json focused-window | jq -c '{text: (if ((.title | length) > 40) then (.title[:38] + "…") else .title end), tooltip: .app_id}' | sed 's/&[ $]/\& /g'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
waybar-puck-countdown = pkgs.writeScriptBin "waybar-puck-countdown" ''
|
|
||||||
#!${pkgs.python3}/bin/python3
|
|
||||||
|
|
||||||
import json
|
|
||||||
|
|
||||||
from datetime import datetime, timezone
|
|
||||||
|
|
||||||
now = datetime.now(timezone.utc)
|
|
||||||
puck_day = "2024-12-11 13:30:00-07:00"
|
|
||||||
puck_time = datetime.fromisoformat(puck_day)
|
|
||||||
until = puck_time - now
|
|
||||||
|
|
||||||
response = {
|
|
||||||
"text": f" {until.days}d {until.seconds // 60 // 60}h",
|
|
||||||
"tooltip": f"days until {puck_day}"
|
|
||||||
}
|
|
||||||
|
|
||||||
print(json.dumps(response))
|
|
||||||
'';
|
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
#
|
#
|
||||||
|
@ -196,13 +195,13 @@ in
|
||||||
#systemd.enable = true;
|
#systemd.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.waybar.settings.mainBar = {
|
programs.waybar.settings.mainBar =
|
||||||
|
{
|
||||||
layer = "top";
|
layer = "top";
|
||||||
#mode = "overlay";
|
#mode = "overlay";
|
||||||
|
|
||||||
modules-left = [
|
modules-left = [
|
||||||
"clock"
|
"clock"
|
||||||
"clock#otherzone"
|
|
||||||
"mpris"
|
"mpris"
|
||||||
];
|
];
|
||||||
modules-center = [
|
modules-center = [
|
||||||
|
@ -216,7 +215,7 @@ in
|
||||||
"custom/yubikey"
|
"custom/yubikey"
|
||||||
"wireplumber"
|
"wireplumber"
|
||||||
"battery"
|
"battery"
|
||||||
];
|
] ++ (if isAmd then [ "power-profiles-daemon" ] else [ ]);
|
||||||
|
|
||||||
battery = {
|
battery = {
|
||||||
interval = 5;
|
interval = 5;
|
||||||
|
@ -253,18 +252,6 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
"clock#otherzone" = {
|
|
||||||
interval = 1;
|
|
||||||
format = "${icons.puclock} {:%H:%M %Z}";
|
|
||||||
timezone = "America/Denver";
|
|
||||||
tooltip-format = ''
|
|
||||||
<b><u>Homosexuality Statistics</u></b>
|
|
||||||
|
|
||||||
Homosexuality is <b><span color='#${colors.green}'>online</span></b>.
|
|
||||||
Homosexuality levels are <b><span color='#${colors.red}'>CRITICAL</span></b>.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
network = {
|
network = {
|
||||||
on-click = "${pkgs.networkmanagerapplet}/bin/nm-connection-editor";
|
on-click = "${pkgs.networkmanagerapplet}/bin/nm-connection-editor";
|
||||||
tooltip = false;
|
tooltip = false;
|
||||||
|
@ -320,14 +307,6 @@ in
|
||||||
interval = 1;
|
interval = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
"custom/puckdown" = {
|
|
||||||
exec = "${waybar-puck-countdown}/bin/waybar-puck-countdown";
|
|
||||||
format = "{}";
|
|
||||||
tooltip = true;
|
|
||||||
return-type = "json";
|
|
||||||
interval = 60 * 5;
|
|
||||||
};
|
|
||||||
|
|
||||||
"wlr/taskbar" = {
|
"wlr/taskbar" = {
|
||||||
format = "{icon}";
|
format = "{icon}";
|
||||||
tooltip-format = "{app_id}";
|
tooltip-format = "{app_id}";
|
||||||
|
@ -383,7 +362,26 @@ in
|
||||||
tooltip-format-activated = "System <span color='#${colors.orange}'><b>blocked</b></span> from going idle.";
|
tooltip-format-activated = "System <span color='#${colors.orange}'><b>blocked</b></span> from going idle.";
|
||||||
tooltip-format-deactivated = "System <span color='#${colors.green}'><b>allowed</b></span> to go idle.";
|
tooltip-format-deactivated = "System <span color='#${colors.green}'><b>allowed</b></span> to go idle.";
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
// (
|
||||||
|
# Support PPD on AMD.
|
||||||
|
if isAmd then
|
||||||
|
{
|
||||||
|
power-profiles-daemon = {
|
||||||
|
format = "{icon} ";
|
||||||
|
tooltip-format = "Power profile: {profile}nDriver: {driver}";
|
||||||
|
tooltip = true;
|
||||||
|
format-icons = {
|
||||||
|
default = "";
|
||||||
|
performance = "";
|
||||||
|
balanced = "";
|
||||||
|
power-saver = "";
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ }
|
||||||
|
);
|
||||||
stylix.targets.waybar.enable = false;
|
stylix.targets.waybar.enable = false;
|
||||||
programs.waybar.style =
|
programs.waybar.style =
|
||||||
let
|
let
|
||||||
|
@ -400,6 +398,8 @@ in
|
||||||
color: #${colors.base06};
|
color: #${colors.base06};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
${cfg.hostSpecificCss}
|
||||||
|
|
||||||
window#waybar {
|
window#waybar {
|
||||||
background: #${colors.base00};
|
background: #${colors.base00};
|
||||||
}
|
}
|
||||||
|
@ -471,4 +471,5 @@ in
|
||||||
{ command = [ "nm-applet" ]; }
|
{ command = [ "nm-applet" ]; }
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
22
nixos/configs/power-saving-amd.nix
Normal file
22
nixos/configs/power-saving-amd.nix
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
#
|
||||||
|
# Laptop power-saving configuration.
|
||||||
|
#
|
||||||
|
# vim: et:ts=2:sw=2:
|
||||||
|
#
|
||||||
|
{ lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
powerprofilesctl = "${pkgs.power-profiles-daemon}/bin/powerprofilesctl";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# Set up a power saving policy manager.
|
||||||
|
services.power-profiles-daemon.enable = lib.mkForce true;
|
||||||
|
|
||||||
|
# Profile its CLI.
|
||||||
|
environment.systemPackages = [ pkgs.power-profiles-daemon ];
|
||||||
|
|
||||||
|
# Automatically switch power profile on AC plug/unplug.
|
||||||
|
services.udev.extraRules = ''
|
||||||
|
SUBSYSTEM=="power_supply", ATTR{online}=="1", RUN+="${powerprofilesctl} set performance"
|
||||||
|
SUBSYSTEM=="power_supply", ATTR{online}=="0", RUN+="${powerprofilesctl} set power-saver"
|
||||||
|
'';
|
||||||
|
}
|
|
@ -9,6 +9,7 @@
|
||||||
services.thermald.enable = !pkgs.stdenv.isAarch64;
|
services.thermald.enable = !pkgs.stdenv.isAarch64;
|
||||||
|
|
||||||
# Set up a power saving policy manager.
|
# Set up a power saving policy manager.
|
||||||
|
# We use TLP on intel...
|
||||||
services.tlp = {
|
services.tlp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
@ -17,6 +17,9 @@
|
||||||
# xonsh
|
# xonsh
|
||||||
xdg.configFile.xonsh.source = ../../xonsh;
|
xdg.configFile.xonsh.source = ../../xonsh;
|
||||||
|
|
||||||
|
# XCompose
|
||||||
|
xdg.configFile."XCompose".source = ../../XCompose;
|
||||||
|
|
||||||
# zellij
|
# zellij
|
||||||
xdg.configFile.zellij.source = ../../zellij;
|
xdg.configFile.zellij.source = ../../zellij;
|
||||||
|
|
||||||
|
|
391
nixos/hosts/chrysalis/audio.nix
Normal file
391
nixos/hosts/chrysalis/audio.nix
Normal file
|
@ -0,0 +1,391 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.hardware.framework.laptop13.audioEnhancement;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
hardware.framework.laptop13.audioEnhancement = {
|
||||||
|
enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Create a new audio device called "Framework Speakers",
|
||||||
|
which applies sound tuning before sending the audio out to the speakers.
|
||||||
|
This option requires PipeWire and WirePlumber.
|
||||||
|
|
||||||
|
The filter chain includes the following:
|
||||||
|
- Psychoacoustic bass enhancement
|
||||||
|
- Loudness compensation
|
||||||
|
- Equalizer
|
||||||
|
- Slight compression
|
||||||
|
|
||||||
|
This option has been optimised for the Framework Laptop 13 AMD 7040 series, but should work on all models.
|
||||||
|
|
||||||
|
Before applying, ensure the speakers are set to 100%,
|
||||||
|
because the volumes compound and the raw speaker device will be hidden by default.
|
||||||
|
|
||||||
|
You might also need to re-select the default output device.
|
||||||
|
|
||||||
|
In some cases, the added bass will vibrate the keyboard cable leading to a rattling sound,
|
||||||
|
a piece of foam can be used to mitigate this.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
hideRawDevice = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = true;
|
||||||
|
description = ''
|
||||||
|
Hide the raw speaker device.
|
||||||
|
This option is enabled by default, because keeping the raw speaker device can lead to volume conflicts.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
rawDeviceName = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
example = "alsa_output.pci-0000_c1_00.6.analog-stereo";
|
||||||
|
description = ''
|
||||||
|
The name of the raw speaker device. This will vary by device.
|
||||||
|
You can get this by running `pw-dump | grep -C 20 pci-0000`.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable (
|
||||||
|
let
|
||||||
|
outputName = cfg.rawDeviceName;
|
||||||
|
prettyName = "Framework Speakers";
|
||||||
|
|
||||||
|
# These are pre-made decibel to linear value conversions, since Nix doesn't have pow().
|
||||||
|
# Use the formula `10 ** (db / 20)` to calculate.
|
||||||
|
db = {
|
||||||
|
"-18.1" = 0.1244514611771385;
|
||||||
|
"-5.48" = 0.5321082592667942;
|
||||||
|
"-4.76" = 0.5780960474057181;
|
||||||
|
"8.1" = 2.5409727055493048;
|
||||||
|
"-36" = 1.5848931924611134e-2;
|
||||||
|
};
|
||||||
|
|
||||||
|
json = pkgs.formats.json { };
|
||||||
|
|
||||||
|
# The filter chain, heavily inspired by the asahi-audio project: https://github.com/AsahiLinux/asahi-audio
|
||||||
|
filter-chain = json.generate "filter-chain.json" {
|
||||||
|
"node.description" = prettyName;
|
||||||
|
"media.name" = prettyName;
|
||||||
|
"filter.graph" = {
|
||||||
|
nodes = [
|
||||||
|
# Psychoacoustic bass extension,
|
||||||
|
# it creates harmonics of the missing bass to fool our ears into hearing it.
|
||||||
|
{
|
||||||
|
type = "lv2";
|
||||||
|
plugin = "https://chadmed.au/bankstown";
|
||||||
|
name = "bassex";
|
||||||
|
control = {
|
||||||
|
bypass = 0;
|
||||||
|
amt = 1.2;
|
||||||
|
sat_second = 1.3;
|
||||||
|
sat_third = 2.5;
|
||||||
|
blend = 1.0;
|
||||||
|
ceil = 200.0;
|
||||||
|
floor = 20.0;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
# Loudness compensation,
|
||||||
|
# it ensures that the sound profile stays consistent across different volumes.
|
||||||
|
{
|
||||||
|
type = "lv2";
|
||||||
|
plugin = "http://lsp-plug.in/plugins/lv2/loud_comp_stereo";
|
||||||
|
name = "el";
|
||||||
|
control = {
|
||||||
|
enabled = 1;
|
||||||
|
input = 1.0;
|
||||||
|
fft = 4;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
# 8-band equalizer,
|
||||||
|
# it tries to lessen frequencies where the laptop might resonate,
|
||||||
|
# and tries to make the frequency curve more pleasing;
|
||||||
|
# this is the "Lappy McTopface" profile (https://github.com/ceiphr/ee-framework-presets)
|
||||||
|
# further tuned for the Framework Laptop 13 AMD 7040 series
|
||||||
|
# and might need some tuning on other models.
|
||||||
|
{
|
||||||
|
type = "lv2";
|
||||||
|
plugin = "http://lsp-plug.in/plugins/lv2/para_equalizer_x8_lr";
|
||||||
|
name = "fw13eq";
|
||||||
|
control = {
|
||||||
|
mode = 0;
|
||||||
|
react = 0.2;
|
||||||
|
zoom = db."-36";
|
||||||
|
|
||||||
|
fl_0 = 101.0;
|
||||||
|
fml_0 = 0;
|
||||||
|
ftl_0 = 5;
|
||||||
|
gl_0 = db."-18.1";
|
||||||
|
huel_0 = 0.0;
|
||||||
|
ql_0 = 4.36;
|
||||||
|
sl_0 = 0;
|
||||||
|
wl_0 = 4.0;
|
||||||
|
|
||||||
|
fl_1 = 451.0;
|
||||||
|
fml_1 = 0;
|
||||||
|
ftl_1 = 1;
|
||||||
|
gl_1 = db."-5.48";
|
||||||
|
huel_1 = 3.125e-2;
|
||||||
|
ql_1 = 2.46;
|
||||||
|
sl_1 = 0;
|
||||||
|
wl_1 = 4.0;
|
||||||
|
|
||||||
|
fl_2 = 918.0;
|
||||||
|
fml_2 = 0;
|
||||||
|
ftl_2 = 1;
|
||||||
|
gl_2 = db."-4.76";
|
||||||
|
huel_2 = 6.25e-2;
|
||||||
|
ql_2 = 2.44;
|
||||||
|
sl_2 = 0;
|
||||||
|
wl_2 = 4.0;
|
||||||
|
|
||||||
|
fl_3 = 9700.0;
|
||||||
|
fml_3 = 0;
|
||||||
|
ftl_3 = 1;
|
||||||
|
gl_3 = db."8.1";
|
||||||
|
huel_3 = 9.375e-2;
|
||||||
|
ql_3 = 2.0;
|
||||||
|
sl_3 = 0;
|
||||||
|
wl_3 = 4.0;
|
||||||
|
|
||||||
|
fr_0 = 101.0;
|
||||||
|
fmr_0 = 0;
|
||||||
|
ftr_0 = 5;
|
||||||
|
gr_0 = db."-18.1";
|
||||||
|
huer_0 = 0.0;
|
||||||
|
qr_0 = 4.36;
|
||||||
|
sr_0 = 0;
|
||||||
|
wr_0 = 4.0;
|
||||||
|
|
||||||
|
fr_1 = 451.0;
|
||||||
|
fmr_1 = 0;
|
||||||
|
ftr_1 = 1;
|
||||||
|
gr_1 = db."-5.48";
|
||||||
|
huer_1 = 3.125e-2;
|
||||||
|
qr_1 = 2.46;
|
||||||
|
sr_1 = 0;
|
||||||
|
wr_1 = 4.0;
|
||||||
|
|
||||||
|
fr_2 = 918.0;
|
||||||
|
fmr_2 = 0;
|
||||||
|
ftr_2 = 1;
|
||||||
|
gr_2 = db."-4.76";
|
||||||
|
huer_2 = 6.25e-2;
|
||||||
|
qr_2 = 2.44;
|
||||||
|
sr_2 = 0;
|
||||||
|
wr_2 = 4.0;
|
||||||
|
|
||||||
|
fr_3 = 9700.0;
|
||||||
|
fmr_3 = 0;
|
||||||
|
ftr_3 = 1;
|
||||||
|
gr_3 = db."8.1";
|
||||||
|
huer_3 = 9.375e-2;
|
||||||
|
qr_3 = 2.0;
|
||||||
|
sr_3 = 0;
|
||||||
|
wr_3 = 4.0;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
# Compressors. The settings were taken from the asahi-audio project.
|
||||||
|
{
|
||||||
|
type = "lv2";
|
||||||
|
plugin = "http://lsp-plug.in/plugins/lv2/mb_compressor_stereo";
|
||||||
|
name = "woofer_bp";
|
||||||
|
control = {
|
||||||
|
mode = 0;
|
||||||
|
ce_0 = 1;
|
||||||
|
sla_0 = 5.0;
|
||||||
|
cr_0 = 1.75;
|
||||||
|
al_0 = 0.725;
|
||||||
|
at_0 = 1.0;
|
||||||
|
rt_0 = 100;
|
||||||
|
kn_0 = 0.125;
|
||||||
|
cbe_1 = 1;
|
||||||
|
sf_1 = 200.0;
|
||||||
|
ce_1 = 0;
|
||||||
|
cbe_2 = 0;
|
||||||
|
ce_2 = 0;
|
||||||
|
cbe_3 = 0;
|
||||||
|
ce_3 = 0;
|
||||||
|
cbe_4 = 0;
|
||||||
|
ce_4 = 0;
|
||||||
|
cbe_5 = 0;
|
||||||
|
ce_5 = 0;
|
||||||
|
cbe_6 = 0;
|
||||||
|
ce_6 = 0;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "lv2";
|
||||||
|
plugin = "http://lsp-plug.in/plugins/lv2/compressor_stereo";
|
||||||
|
name = "woofer_lim";
|
||||||
|
control = {
|
||||||
|
sla = 5.0;
|
||||||
|
al = 1.0;
|
||||||
|
at = 1.0;
|
||||||
|
rt = 100.0;
|
||||||
|
cr = 15.0;
|
||||||
|
kn = 0.5;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
# Now, we're chaining together the modules instantiated above.
|
||||||
|
links = [
|
||||||
|
{
|
||||||
|
output = "bassex:out_l";
|
||||||
|
input = "el:in_l";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
output = "bassex:out_r";
|
||||||
|
input = "el:in_r";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
output = "el:out_l";
|
||||||
|
input = "fw13eq:in_l";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
output = "el:out_r";
|
||||||
|
input = "fw13eq:in_r";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
output = "fw13eq:out_l";
|
||||||
|
input = "woofer_bp:in_l";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
output = "fw13eq:out_r";
|
||||||
|
input = "woofer_bp:in_r";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
output = "woofer_bp:out_l";
|
||||||
|
input = "woofer_lim:in_l";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
output = "woofer_bp:out_r";
|
||||||
|
input = "woofer_lim:in_r";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
inputs = [
|
||||||
|
"bassex:in_l"
|
||||||
|
"bassex:in_r"
|
||||||
|
];
|
||||||
|
outputs = [
|
||||||
|
"woofer_lim:out_l"
|
||||||
|
"woofer_lim:out_r"
|
||||||
|
];
|
||||||
|
|
||||||
|
# This makes pipewire's volume control actually control the loudness comp module
|
||||||
|
"capture.volumes" = [
|
||||||
|
{
|
||||||
|
control = "el:volume";
|
||||||
|
min = -47.5;
|
||||||
|
max = 0.0;
|
||||||
|
scale = "cubic";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
"capture.props" = {
|
||||||
|
"node.name" = "audio_effect.laptop-convolver";
|
||||||
|
"media.class" = "Audio/Sink";
|
||||||
|
"audio.channels" = "2";
|
||||||
|
"audio.position" = [
|
||||||
|
"FL"
|
||||||
|
"FR"
|
||||||
|
];
|
||||||
|
"audio.allowed-rates" = [
|
||||||
|
44100
|
||||||
|
48000
|
||||||
|
88200
|
||||||
|
96000
|
||||||
|
176400
|
||||||
|
192000
|
||||||
|
];
|
||||||
|
"device.api" = "dsp";
|
||||||
|
"node.virtual" = "false";
|
||||||
|
|
||||||
|
# Lower seems to mean "more preferred",
|
||||||
|
# bluetooth devices seem to be ~1000, speakers seem to be ~2000
|
||||||
|
# since this is between the two, bluetooth devices take over when they connect,
|
||||||
|
# and hand over to this instead of the speakers when they disconnect.
|
||||||
|
"priority.session" = 1500;
|
||||||
|
"priority.driver" = 1500;
|
||||||
|
"state.default-volume" = 0.343;
|
||||||
|
"device.icon-name" = "audio-card-analog-pci";
|
||||||
|
};
|
||||||
|
"playback.props" = {
|
||||||
|
"node.name" = "audio_effect.laptop-convolver";
|
||||||
|
"target.object" = outputName;
|
||||||
|
"node.passive" = "true";
|
||||||
|
"audio.channels" = "2";
|
||||||
|
"audio.allowed-rates" = [
|
||||||
|
44100
|
||||||
|
48000
|
||||||
|
88200
|
||||||
|
96000
|
||||||
|
176400
|
||||||
|
192000
|
||||||
|
];
|
||||||
|
"audio.position" = [
|
||||||
|
"FL"
|
||||||
|
"FR"
|
||||||
|
];
|
||||||
|
"device.icon-name" = "audio-card-analog-pci";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
configPackage =
|
||||||
|
(pkgs.writeTextDir "share/wireplumber/wireplumber.conf.d/99-laptop.conf" ''
|
||||||
|
monitor.alsa.rules = [
|
||||||
|
{
|
||||||
|
matches = [{ node.name = "${outputName}" }]
|
||||||
|
actions = {
|
||||||
|
update-props = {
|
||||||
|
audio.allowed-rates = [44100, 48000, 88200, 96000, 176400, 192000]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
node.software-dsp.rules = [
|
||||||
|
{
|
||||||
|
matches = [{ node.name = "${outputName}" }]
|
||||||
|
actions = {
|
||||||
|
create-filter = {
|
||||||
|
filter-path = "${filter-chain}"
|
||||||
|
hide-parent = ${lib.boolToString cfg.hideRawDevice}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
wireplumber.profiles = {
|
||||||
|
main = { node.software-dsp = "required" }
|
||||||
|
}
|
||||||
|
'')
|
||||||
|
// {
|
||||||
|
passthru.requiredLv2Packages = with pkgs; [
|
||||||
|
lsp-plugins
|
||||||
|
bankstown-lv2
|
||||||
|
];
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services.pipewire.wireplumber.configPackages = [ configPackage ];
|
||||||
|
|
||||||
|
# Pipewire is needed for this.
|
||||||
|
services.pipewire.enable = lib.mkDefault true;
|
||||||
|
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
176
nixos/hosts/chrysalis/default.nix
Normal file
176
nixos/hosts/chrysalis/default.nix
Normal file
|
@ -0,0 +1,176 @@
|
||||||
|
#
|
||||||
|
# Per-system configuration.
|
||||||
|
#
|
||||||
|
# vim: et:ts=2:sw=2:
|
||||||
|
#
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
deprekages,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
./audio.nix
|
||||||
|
./ec_kmod.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Bootloader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
# Networking.
|
||||||
|
networking.hostName = "chrysalis";
|
||||||
|
networking.networkmanager = {
|
||||||
|
enable = true;
|
||||||
|
wifi.backend = "iwd";
|
||||||
|
};
|
||||||
|
networking.firewall.enable = false;
|
||||||
|
|
||||||
|
# This is a local machine, rather than our typical network-accesed ones.
|
||||||
|
# Run an ssh-agent locally.
|
||||||
|
programs.ssh.startAgent = true;
|
||||||
|
|
||||||
|
# Support our fingerprint reader.
|
||||||
|
services.fprintd.enable = true;
|
||||||
|
|
||||||
|
# Support framework updates.
|
||||||
|
services.fwupd.enable = true;
|
||||||
|
|
||||||
|
# Tools for the framework EC.
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.framework-tool
|
||||||
|
deprekages.framework-13-icm
|
||||||
|
];
|
||||||
|
|
||||||
|
#
|
||||||
|
# Niri configuration for our monitors.
|
||||||
|
#
|
||||||
|
home-manager.users.deprekated.programs.niri.settings = {
|
||||||
|
outputs."eDP-1".scale = 1.5;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Override stylix font sizes.
|
||||||
|
stylix.fonts.sizes.desktop = lib.mkForce 16;
|
||||||
|
|
||||||
|
# Accomodate the curved screen top by moving things in just a little.
|
||||||
|
deprekated.waybar.hostSpecificCss = ''
|
||||||
|
.modules-left > :first-child > * {
|
||||||
|
padding-left: 3ex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modules-right > :last-child > * {
|
||||||
|
padding-right: 3ex;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Provide memtest86, since that's nice.
|
||||||
|
boot.loader.systemd-boot.memtest86.enable = true;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Hardware config.
|
||||||
|
#
|
||||||
|
# Use the latest kernel, and our patches, until the Dell+Alienware stuff makes it into
|
||||||
|
# more mainline kernels. We'll include ccache so we can iterate sanely.
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
|
boot.extraModprobeConfig = ''
|
||||||
|
# Ensure we have a regulatory domain set for our wifi.
|
||||||
|
options cfg80211 ieee80211_regdom=NL
|
||||||
|
|
||||||
|
# Support microphones via the TRRS jack.
|
||||||
|
options snd-hda-intel model=dell-headset-multi
|
||||||
|
'';
|
||||||
|
boot.initrd.availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"thunderbolt"
|
||||||
|
"vmd"
|
||||||
|
"nvme"
|
||||||
|
"usbhid"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [
|
||||||
|
"thunderbolt"
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.kernelParams = [
|
||||||
|
# Bluetooth stability tweaks.
|
||||||
|
"mt7925e.disable_aspm=1"
|
||||||
|
|
||||||
|
# N.b. if we start experiencing GPU stalls, disabling PSR can help.
|
||||||
|
#"amdgpu.dcdebugmask=0x10"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Allow use of our brightness sensor for screen auto-leveling.
|
||||||
|
hardware.sensor.iio.enable = lib.mkDefault true;
|
||||||
|
|
||||||
|
# Fix suspend with the ethernet expansion card.
|
||||||
|
services.udev.extraRules = ''
|
||||||
|
# Ethernet expansion card support
|
||||||
|
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20"
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Support ICC color profiles.
|
||||||
|
services.colord.enable = true;
|
||||||
|
|
||||||
|
# Support thunderbolt.
|
||||||
|
services.hardware.bolt.enable = true;
|
||||||
|
|
||||||
|
# Enable audio DSP filtering.
|
||||||
|
hardware.framework.laptop13.audioEnhancement = {
|
||||||
|
enable = true;
|
||||||
|
rawDeviceName = "alsa_output.pci-0000_c1_00.6.analog-stereo";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Support the framework EC from sysfs.
|
||||||
|
hardware.framework.enableKmod = true;
|
||||||
|
|
||||||
|
# Support bluetooth.
|
||||||
|
hardware.bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
powerOnBoot = false;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
General = {
|
||||||
|
|
||||||
|
# Support A2DP.
|
||||||
|
Enable = "Source,Sink,Media,Socket";
|
||||||
|
|
||||||
|
# Enable experimental featurees, like reading device battery levels.
|
||||||
|
Experimental = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-uuid/bb880b80-992f-4e56-bb80-c5c4df0ddd72";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/5B37-C691";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [
|
||||||
|
"fmask=0022"
|
||||||
|
"dmask=0022"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ { device = "/dev/disk/by-uuid/50f20263-9632-439d-b57d-b9ee8f13d62b"; } ];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = true;
|
||||||
|
}
|
56
nixos/hosts/chrysalis/ec_kmod.nix
Normal file
56
nixos/hosts/chrysalis/ec_kmod.nix
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
kernel_version_compatible = lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.10";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.hardware.framework.enableKmod =
|
||||||
|
(lib.mkEnableOption "Enable the community created Framework kernel module that allows interacting with the embedded controller from sysfs.")
|
||||||
|
// {
|
||||||
|
# enable by default on NixOS >= 24.05 and kernel >= 6.10
|
||||||
|
default = lib.and (lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.05") kernel_version_compatible;
|
||||||
|
defaultText = "enabled by default on NixOS >= 24.05 and kernel >= 6.10";
|
||||||
|
};
|
||||||
|
|
||||||
|
config.boot = lib.mkIf config.hardware.framework.enableKmod {
|
||||||
|
extraModulePackages = with config.boot.kernelPackages; [
|
||||||
|
framework-laptop-kmod
|
||||||
|
];
|
||||||
|
|
||||||
|
# https://github.com/DHowett/framework-laptop-kmod?tab=readme-ov-file#usage
|
||||||
|
kernelModules = [
|
||||||
|
"cros_ec"
|
||||||
|
"cros_ec_lpcs"
|
||||||
|
];
|
||||||
|
|
||||||
|
# add required patch if enabled on kernel <6.10
|
||||||
|
kernelPatches = lib.mkIf (!kernel_version_compatible) [
|
||||||
|
rec {
|
||||||
|
name = "platform/chrome: cros_ec_lpc: add support for AMD Framework Laptops";
|
||||||
|
msgid = "20240403004713.130365-1-dustin@howett.net";
|
||||||
|
version = "3";
|
||||||
|
hash = "sha256-aQSyys8CMzlj9EdNhg8vtp76fg1qEwUVeJL0E+8w5HU=";
|
||||||
|
patch =
|
||||||
|
pkgs.runCommandLocal "patch-${msgid}"
|
||||||
|
{
|
||||||
|
nativeBuildInputs = with pkgs; [
|
||||||
|
b4
|
||||||
|
git
|
||||||
|
cacert
|
||||||
|
];
|
||||||
|
SSL_CERT_FILE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
|
||||||
|
|
||||||
|
outputHash = hash;
|
||||||
|
}
|
||||||
|
''
|
||||||
|
export HOME="$TMP"
|
||||||
|
PYTHONHASHSEED=0 ${pkgs.b4}/bin/b4 -n am -C -T -v ${version} -o- "${msgid}" > "$out"
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -71,48 +71,6 @@
|
||||||
|
|
||||||
services.blueman.enable = true;
|
services.blueman.enable = true;
|
||||||
|
|
||||||
# Allow the NFC reader on the trackpoint to be used as a smartcard reader.
|
|
||||||
hardware.nfc-nci.enable = true;
|
|
||||||
|
|
||||||
#
|
|
||||||
# Niri configuration for our monitors.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
home-manager.users.deprekated = {
|
|
||||||
programs.niri.settings = {
|
|
||||||
|
|
||||||
# Left monitor.
|
|
||||||
outputs."DP-3" = {
|
|
||||||
position = {
|
|
||||||
x = 0;
|
|
||||||
y = 0;
|
|
||||||
};
|
|
||||||
scale = 1.0;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Laptop screen.
|
|
||||||
outputs."eDP-1" = {
|
|
||||||
position = {
|
|
||||||
x = 1920;
|
|
||||||
y = 0;
|
|
||||||
};
|
|
||||||
scale = 1.0;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Right monitor.
|
|
||||||
outputs."DP-1" = {
|
|
||||||
position = {
|
|
||||||
x = 1920 * 2;
|
|
||||||
y = 0;
|
|
||||||
};
|
|
||||||
scale = 1.0;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Also position waybar on only one monitor.
|
|
||||||
programs.waybar.settings.mainBar.output = "eDP-1";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Override stylix font sizes.
|
# Override stylix font sizes.
|
||||||
stylix.fonts.sizes.desktop = lib.mkForce 16;
|
stylix.fonts.sizes.desktop = lib.mkForce 16;
|
||||||
|
|
||||||
|
@ -163,5 +121,5 @@
|
||||||
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
|
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,6 +111,9 @@ flake-utils.lib.eachDefaultSystem (
|
||||||
hantek-udev-rules = callPackage ./hantek-udev-rules { };
|
hantek-udev-rules = callPackage ./hantek-udev-rules { };
|
||||||
linux-nfc-lenovo-udev-rules = callPackage ./linux-nfc-lenovo/udev.nix { };
|
linux-nfc-lenovo-udev-rules = callPackage ./linux-nfc-lenovo/udev.nix { };
|
||||||
|
|
||||||
|
# color profiles
|
||||||
|
framework-13-icm = callPackage ./framework-13-icm { };
|
||||||
|
|
||||||
# weechat
|
# weechat
|
||||||
weechat-discord = callPackage ./weechat-discord { };
|
weechat-discord = callPackage ./weechat-discord { };
|
||||||
|
|
||||||
|
|
BIN
packages/framework-13-icm/color-profile.icm
Normal file
BIN
packages/framework-13-icm/color-profile.icm
Normal file
Binary file not shown.
13
packages/framework-13-icm/default.nix
Normal file
13
packages/framework-13-icm/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{ stdenv, ... }:
|
||||||
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
|
pname = "framework-13-icm";
|
||||||
|
version = "0.0.1";
|
||||||
|
|
||||||
|
src = ./color-profile.icm;
|
||||||
|
dontUnpack = true;
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/share/color/icc/colord/
|
||||||
|
cp ${finalAttrs.src} $out/share/color/icc/colord/framework-13.icm
|
||||||
|
'';
|
||||||
|
})
|
|
@ -89,7 +89,7 @@ config = {
|
||||||
font_overrides = {
|
font_overrides = {
|
||||||
miko = 10,
|
miko = 10,
|
||||||
hinata = 15,
|
hinata = 15,
|
||||||
valere = 12,
|
chrysalis = 12,
|
||||||
utol = 13,
|
utol = 13,
|
||||||
trailblazer = 11,
|
trailblazer = 11,
|
||||||
kanbaru = 12,
|
kanbaru = 12,
|
||||||
|
|
16
xonsh/chrysalis.xsh
Normal file
16
xonsh/chrysalis.xsh
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#
|
||||||
|
# Dotfile specifics for this host.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Path
|
||||||
|
# Note: lower in the list = higher priority
|
||||||
|
PATH_ADDS = [
|
||||||
|
"/run/current-system/sw/bin"
|
||||||
|
"/run/wrappers/bin"
|
||||||
|
]
|
||||||
|
|
||||||
|
# SSH key management.
|
||||||
|
try_source("includes/add-ssh-keys")
|
||||||
|
|
||||||
|
# NixOS compatibility.
|
||||||
|
try_source("includes/nixos")
|
Loading…
Add table
Reference in a new issue