Compare commits

..

No commits in common. "6b09e9451f2c26a3f394611b77f3447a6c223b2e" and "771b662dd71a2bec39ba71226552b9e40b9ef745" have entirely different histories.

9 changed files with 380 additions and 439 deletions

56
flake.lock generated
View file

@ -395,11 +395,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1754060289, "lastModified": 1753595562,
"narHash": "sha256-rWc9WUHtDCnHhnKEbiyLwBmvsXxHgBf56jvmmHPMUCk=", "narHash": "sha256-Ci88mAdtiP5RQkYmVhRUq69iYPMM7/lS9/mw+FnC7DE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "19f94a3e0e6c8573ea58dac685e96c36e2526cfa", "rev": "710771af3d1c8c3f86a9e5d562616973ed5f3f21",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -419,11 +419,11 @@
"pre-commit-hooks": "pre-commit-hooks" "pre-commit-hooks": "pre-commit-hooks"
}, },
"locked": { "locked": {
"lastModified": 1754068667, "lastModified": 1753573361,
"narHash": "sha256-qamvSPq9vPqcNe+gje61FMplCC+twHbSkkS+RNYA8z8=", "narHash": "sha256-fCaJ29ZqevsIT1yqbpgdKeYr5GHF6sDhHlcXo2m+VuI=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "52872026fb77054c51a9b79c6ae93a17ecec8d89", "rev": "ef94901156c0c688ffffaa2c5caf1498119f01d4",
"revCount": 18234, "revCount": 18200,
"type": "git", "type": "git",
"url": "https://git@git.lix.systems/lix-project/lix" "url": "https://git@git.lix.systems/lix-project/lix"
}, },
@ -453,11 +453,11 @@
"nixpkgs": "nixpkgs_5" "nixpkgs": "nixpkgs_5"
}, },
"locked": { "locked": {
"lastModified": 1753661392, "lastModified": 1752799399,
"narHash": "sha256-fK4INnIJQNAA8cyjcDRZSPleA+N/STI6I0oBDMZ2r+E=", "narHash": "sha256-Uy2qzd+fMoBcp4NPSO7DavEC1pGMegmAqoEMvmXbIQU=",
"owner": "oxalica", "owner": "oxalica",
"repo": "nil", "repo": "nil",
"rev": "cd7a6f6d5dc58484e62a8e85677e06e47cf2bd4d", "rev": "524ae2d67dd84d99a10f409ed6cd8e4e7b3cae3f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -476,11 +476,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable" "xwayland-satellite-unstable": "xwayland-satellite-unstable"
}, },
"locked": { "locked": {
"lastModified": 1754040945, "lastModified": 1753514742,
"narHash": "sha256-Tr9KNijTgyu7hkkI4caAAFs/qDwPyDfYD66AzbA5MuU=", "narHash": "sha256-OP7hZTjnOLP3X6cWldPLcxQ4vvDYid6SlOf1mw+XRCg=",
"owner": "sodiboo", "owner": "sodiboo",
"repo": "niri-flake", "repo": "niri-flake",
"rev": "861cc473b1fb92c93737d3918869cc3b084e338a", "rev": "af1af659e690b3e535d94c54a64700767bfc9544",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -509,11 +509,11 @@
"niri-unstable": { "niri-unstable": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1753983552, "lastModified": 1752870529,
"narHash": "sha256-xnPPjASWt4/u+GmRdrHADBKKSCtIhTFY53CSKM+Xtfk=", "narHash": "sha256-23DJk5EfEDCq7Xy1QELcayG0VxbbWpdQ6t7jbhae1Ok=",
"owner": "YaLTeR", "owner": "YaLTeR",
"repo": "niri", "repo": "niri",
"rev": "91b6a111cf228fadaabba706d8f4d155efc63b3a", "rev": "fefc0bc0a71556eb75352e2b611e50eb5d3bf9c2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -786,11 +786,11 @@
}, },
"nixpkgs-stable_2": { "nixpkgs-stable_2": {
"locked": { "locked": {
"lastModified": 1753749649, "lastModified": 1753345091,
"narHash": "sha256-+jkEZxs7bfOKfBIk430K+tK9IvXlwzqQQnppC2ZKFj4=", "narHash": "sha256-CdX2Rtvp5I8HGu9swBmYuq+ILwRxpXdJwlpg8jvN4tU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1f08a4df998e21f4e8be8fb6fbf61d11a1a5076a", "rev": "3ff0e34b1383648053bba8ed03f201d3466f90c9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -865,11 +865,11 @@
}, },
"nixpkgs_6": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1753939845, "lastModified": 1753429684,
"narHash": "sha256-K2ViRJfdVGE8tpJejs8Qpvvejks1+A4GQej/lBk5y7I=", "narHash": "sha256-9h7+4/53cSfQ/uA3pSvCaBepmZaz/dLlLVJnbQ+SJjk=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "94def634a20494ee057c76998843c015909d6311", "rev": "7fd36ee82c0275fb545775cc5e4d30542899511d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -881,11 +881,11 @@
}, },
"nixpkgs_7": { "nixpkgs_7": {
"locked": { "locked": {
"lastModified": 1753939845, "lastModified": 1753429684,
"narHash": "sha256-K2ViRJfdVGE8tpJejs8Qpvvejks1+A4GQej/lBk5y7I=", "narHash": "sha256-9h7+4/53cSfQ/uA3pSvCaBepmZaz/dLlLVJnbQ+SJjk=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "94def634a20494ee057c76998843c015909d6311", "rev": "7fd36ee82c0275fb545775cc5e4d30542899511d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1096,11 +1096,11 @@
"tinted-zed": "tinted-zed" "tinted-zed": "tinted-zed"
}, },
"locked": { "locked": {
"lastModified": 1753978157, "lastModified": 1753553562,
"narHash": "sha256-sVy8hb71VawSOIsLv/hMGzpvbbWszdP9aSKI5Drbt6Q=", "narHash": "sha256-CpTwdsrPU3UFy95Btg56RcVMgNpnw3C0DYTznE5aRq4=",
"owner": "danth", "owner": "danth",
"repo": "stylix", "repo": "stylix",
"rev": "ded4f29a023e0f14506ec16b0e32d129e56341cc", "rev": "af85565aba0f4749cb18b118a7333a0745920950",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -284,8 +284,8 @@
modules = linuxOfflineGuiModules [ modules = linuxOfflineGuiModules [
./nixos/hosts/chrysalis ./nixos/hosts/chrysalis
./nixos/configs/virtualbox.nix
./nixos/configs/power-saving-amd.nix ./nixos/configs/power-saving-amd.nix
#./nixos/configs/vmware.nix
]; ];
}; };

View file

@ -5,398 +5,380 @@
{ {
lib, lib,
pkgs, pkgs,
niri,
config, config,
... ...
}: }:
let let
niri-flake = niri;
sysConfig = config; sysConfig = config;
cfg = config.deprekated.niri;
in in
{ {
options.deprekated.niri = { # Add in some basic control utilities to our system config.
extraStartupCommands = lib.mkOption { environment.systemPackages = [
type = lib.types.str; pkgs.wlrctl
default = ""; ];
example = ''
niri msg action spawn -- xmessage hi # Don't let the niri-flake fuck with our secret provider, kwallet.
services.gnome.gnome-keyring.enable = lib.mkForce false;
#
# Niri configuration.
#
home-manager.users.deprekated =
{
pkgs,
config,
niri,
...
}:
with lib;
let
binds =
{
suffixes,
prefixes,
substitutions ? { },
}:
#
# This quite-useful monstrosity stolen from @sodiboo.
#
let
replacer = replaceStrings (attrNames substitutions) (attrValues substitutions);
format =
prefix: suffix:
let
actual-suffix =
if isList suffix.action then
{
action = head suffix.action;
args = tail suffix.action;
}
else
{
inherit (suffix) action;
args = [ ];
};
action = replacer "${prefix.action}-${actual-suffix.action}";
in
{
name = "${prefix.key}+${suffix.key}";
value.action.${action} = actual-suffix.args;
};
pairs =
attrs: fn:
concatMap (
key:
fn {
inherit key;
action = attrs.${key};
}
) (attrNames attrs);
in
listToAttrs (pairs prefixes (prefix: pairs suffixes (suffix: [ (format prefix suffix) ])));
xwayland-satellite-loop = pkgs.writeScriptBin "xwayland-satellite-loop" ''
#!${pkgs.bash}/bin/bash
while true; do
${pkgs.xwayland-satellite}/bin/xwayland-satellite
done
''; '';
description = "Any extra commands to be added to Niri's startup."; in
}; {
}; # Don't let the niri-flake fuck with our secret provider, kwallet.
services.gnome-keyring.enable = lib.mkForce false;
config = { #
# Add in some basic control utilities to our system config. # Core Niri settings.
environment.systemPackages = [ #
pkgs.wlrctl programs.niri.settings = {
];
# Don't let the niri-flake fuck with our secret provider, kwallet. # Use Wayland programs when possible.
services.gnome.gnome-keyring.enable = lib.mkForce false; environment = {
NIXOS_OZONE_WL = "1";
SHELL_TYPE = "prompt_toolkit";
XDG_DATA_DIRS = "/var/lib/flatpak/exports/share:/home/deprekated/.nix-profile/share:/nix/profile/share:/home/deprekated/.local/state/nix/profile/share:/etc/profiles/per-user/deprekated/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share";
# # Provided by xwayland-satellite below.
# Niri configuration. DISPLAY = ":0";
# };
home-manager.users.deprekated =
{ # Avoid client-side decorations, when possible.
pkgs, prefer-no-csd = true;
config,
niri, # Don't show our hotkeys on startup.
... hotkey-overlay.skip-at-startup = true;
}:
with lib; #
let # Adjust our layouts.
binds = #
layout = {
# No wasted space between windows.
gaps = 0;
# Default to half the screen.
default-column-width = {
proportion = 1.0 / 2.0;
};
# Set up the column widths for Meta+R.
preset-column-widths = [
{ proportion = 1.0 / 2.0; }
{ proportion = 2.0 / 3.0; }
{ proportion = 1.0 / 3.0; }
];
# Improve the color of focused windows.
border = {
active = {
color = "#268BD2";
};
};
};
#
# Keyboard, mouse, etc. settings.
#
input = {
# Moving focus with the keyboard should move the mouse.
warp-mouse-to-focus.enable = true;
touchpad = {
# No tap to click, but use the number of fingers to press
# multiple buttons.
tap = false;
tap-button-map = "left-right-middle";
click-method = "clickfinger";
# Disable while typing.
dwt = true;
# Use natural scrolling.
natural-scroll = true;
};
trackpoint = {
accel-speed = 0.2;
accel-profile = "flat";
};
keyboard.xkb = {
# Make caps lock a second escape, and ralt a compose.
options = "caps:escape,compose:ralt";
};
};
#
# Per-application settings.
#
window-rules = [
# Wezterm workaround: wezterm gets sad when it
# doesn't get to set its own width, so let it.
{ {
suffixes, matches = [ { app-id = "^org.wezfurlong.wezterm$"; } ];
prefixes, default-column-width = { };
substitutions ? { }, }
}:
# # Make anki flashcard windows modal floats.
# This quite-useful monstrosity stolen from @sodiboo. {
# matches = [{
let app-id = "^anki$";
replacer = replaceStrings (attrNames substitutions) (attrValues substitutions); title = "Add";
format = }];
prefix: suffix:
let
actual-suffix =
if isList suffix.action then
{
action = head suffix.action;
args = tail suffix.action;
}
else
{
inherit (suffix) action;
args = [ ];
};
action = replacer "${prefix.action}-${actual-suffix.action}"; open-floating = true;
in default-floating-position = {
{ x = 0;
name = "${prefix.key}+${suffix.key}"; y = 0;
value.action.${action} = actual-suffix.args; relative-to = "top-right";
}; };
pairs = }
attrs: fn:
concatMap (
key:
fn {
inherit key;
action = attrs.${key};
}
) (attrNames attrs);
in
listToAttrs (pairs prefixes (prefix: pairs suffixes (suffix: [ (format prefix suffix) ])));
xwayland-satellite-loop = pkgs.writeScriptBin "xwayland-satellite-loop" '' # Talon windows should show over other ones.
#!${pkgs.bash}/bin/bash {
matches = [ { app-id = "talon"; } ];
}
while true; do # Bitwig needs to set its own width.
${pkgs.xwayland-satellite}/bin/xwayland-satellite {
done matches = [ { app-id = "^com.bitwig.BitwigStudio$"; } ];
''; default-column-width = { };
in }
{
# Don't let the niri-flake fuck with our secret provider, kwallet.
services.gnome-keyring.enable = lib.mkForce false;
# # Let gamescope be fullscreen, by default.
# Core Niri settings. {
# matches = [ { app-id = "^gamescope$"; } ];
programs.niri.settings = {
# Use Wayland programs when possible.
environment = {
NIXOS_OZONE_WL = "1";
SHELL_TYPE = "prompt_toolkit";
XDG_DATA_DIRS = "/var/lib/flatpak/exports/share:/home/deprekated/.nix-profile/share:/nix/profile/share:/home/deprekated/.local/state/nix/profile/share:/etc/profiles/per-user/deprekated/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share";
# Provided by xwayland-satellite below.
DISPLAY = ":0";
};
# Avoid client-side decorations, when possible.
prefer-no-csd = true;
# Don't show our hotkeys on startup.
hotkey-overlay.skip-at-startup = true;
#
# Adjust our layouts.
#
layout = {
# No wasted space between windows.
gaps = 0;
# Default to half the screen.
default-column-width = { default-column-width = {
proportion = 1.0 / 2.0; proportion = 1.0;
}; };
}
{
matches = [ { app-id = "^pcloud$"; } ];
open-on-workspace = "2";
open-focused = false;
}
# Set up the column widths for Meta+R. # Keep our system monitor on the monitoring screen.
preset-column-widths = [ {
{ proportion = 1.0 / 2.0; } matches = [ { app-id = "io.missioncenter.MissionCenter"; } ];
{ proportion = 2.0 / 3.0; } open-on-output = "Shenzhen Soogeen Electronics Co., LTD. L01N8A 0x01348C5C";
{ proportion = 1.0 / 3.0; } open-fullscreen = true;
]; open-focused = false;
}
];
# Improve the color of focused windows. #
border = { # Key bindings.
active = { #
color = "#268BD2"; binds =
}; with config.lib.niri.actions;
}; let
}; sh = spawn "sh" "-c";
in
# lib.attrsets.mergeAttrsList [
# Keyboard, mouse, etc. settings.
#
input = {
# Moving focus with the keyboard should move the mouse.
warp-mouse-to-focus.enable = true;
touchpad = {
# No tap to click, but use the number of fingers to press
# multiple buttons.
tap = false;
tap-button-map = "left-right-middle";
click-method = "clickfinger";
# Disable while typing.
dwt = true;
# Use natural scrolling.
natural-scroll = true;
};
trackpoint = {
accel-speed = 0.2;
accel-profile = "flat";
};
keyboard.xkb = {
# Make caps lock a second escape, and ralt a compose.
options = "caps:escape,compose:ralt";
};
};
#
# Per-application settings.
#
window-rules = [
# Wezterm workaround: wezterm gets sad when it
# doesn't get to set its own width, so let it.
{ {
matches = [ { app-id = "^org.wezfurlong.wezterm$"; } ]; # Kate keys.
default-column-width = { }; "Mod+O".action = sh "haxtype 'O>'";
"Mod+T".action = sh "haxtype '🔵T>'";
"Mod+K".action = sh "haxtype '🟣K>'";
"Mod+W".action = sh "haxtype '🟢W>'";
"Mod+S".action = sh "haxtype '🔴S>'";
"Mod+E".action = sh "haxtype 'E>'";
# Kate keys.
"Mod+F1".action = sh "haxtype ";
"Mod+F2".action = sh "haxtype ";
"Mod+F3".action = sh "haxtype ";
"Print".action = screenshot;
"Mod+Return".action = spawn "wezterm";
"Mod+D".action = spawn "fuzzel";
"Mod+Space".action = spawn "fuzzel";
"XF86AudioRaiseVolume".action = sh "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 0.1+";
"XF86AudioLowerVolume".action = sh "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 0.1-";
"XF86Launch6".action = sh "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 0.1+";
"XF86Tools".action = sh "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 0.1-";
"XF86AudioMute".action = sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
"XF86AudioMicMute".action = sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
"XF86MonBrightnessDown".action = sh "brightnessctl set 10%-";
"XF86MonBrightnessUp".action = sh "brightnessctl set 10%+";
"XF86Messenger".action = sh "rfkill toggle bluetooth";
"XF86Go".action = sh "rfkill toggle wwan";
"Cancel".action = sh "rfkill block nfc";
"XF86Favorites".action = sh "mpc toggle";
# Lenovo buttons.
"0x47".action = sh "brightnessctl set 10%-";
"0x48".action = sh "brightnessctl set 10%+";
"Mod+Q".action = close-window;
"XF86AudioPrev".action = sh "playerctl previous";
"XF86AudioNext".action = sh "playerctl next";
"XF86AudioPlay".action = sh "playerctl play-pause";
"XF86Launch5".action = sh "playerctl play-pause";
} }
(binds {
# Make anki flashcard windows modal floats. suffixes."Left" = "column-left";
suffixes."Down" = "window-down";
suffixes."Up" = "window-up";
suffixes."Right" = "column-right";
prefixes."Mod" = "focus";
prefixes."Mod+Ctrl" = "move";
prefixes."Mod+Shift" = "focus-monitor";
prefixes."Mod+Shift+Ctrl" = "move-window-to-monitor";
substitutions."monitor-column" = "monitor";
substitutions."monitor-window" = "monitor";
})
(binds {
suffixes."Home" = "first";
suffixes."End" = "last";
prefixes."Mod" = "focus-column";
prefixes."Mod+Ctrl" = "move-column-to";
})
(binds {
suffixes."U" = "workspace-down";
suffixes."I" = "workspace-up";
prefixes."Mod" = "focus";
prefixes."Mod+Ctrl" = "move-window-to";
prefixes."Mod+Shift" = "move";
})
(binds {
suffixes = builtins.listToAttrs (
map (n: {
name = toString n;
value = [
"workspace"
n
];
}) (range 1 9)
);
prefixes."Mod" = "focus";
prefixes."Mod+Ctrl" = "move-window-to";
})
{ {
matches = [ "Mod+Comma".action = consume-window-into-column;
{ "Mod+Period".action = expel-window-from-column;
app-id = "^anki$";
title = "Add";
}
];
open-floating = true; "Mod+R".action = switch-preset-column-width;
default-floating-position = { "Mod+F".action = maximize-column;
x = 0; "Mod+Shift+F".action = fullscreen-window;
y = 0; "Mod+C".action = center-column;
relative-to = "top-right";
};
}
# Talon windows should show over other ones. "Mod+L".action = switch-focus-between-floating-and-tiling;
{ "Mod+Shift+L".action = toggle-window-floating;
matches = [ { app-id = "talon"; } ];
}
# Bitwig needs to set its own width. "Mod+Minus".action = set-column-width "-10%";
{ "Mod+Plus".action = set-column-width "+10%";
matches = [ { app-id = "^com.bitwig.BitwigStudio$"; } ]; "Mod+Shift+Minus".action = set-window-height "-10%";
default-column-width = { }; "Mod+Shift+Plus".action = set-window-height "+10%";
}
# Let gamescope be fullscreen, by default. "Mod+Print".action = screenshot-window;
{
matches = [ { app-id = "^gamescope$"; } ];
default-column-width = {
proportion = 1.0;
};
}
{
matches = [ { app-id = "^pcloud$"; } ];
open-on-workspace = "2";
open-focused = false;
}
# Keep our system monitor on the monitoring screen. "Mod+Shift+E".action = quit;
{ "Mod+Shift+P".action = power-off-monitors;
matches = [ { app-id = "io.missioncenter.MissionCenter"; } ];
open-on-output = "Shenzhen Soogeen Electronics Co., LTD. L01N8A 0x01348C5C"; "Mod+Shift+Ctrl+T".action = toggle-debug-tint;
open-fullscreen = true;
open-focused = false;
} }
]; ];
# # Startup our wallpaper and our credential manager.
# Key bindings. spawn-at-startup =
# let
binds = niri-init = pkgs.writeScriptBin "niri-init" ''
with config.lib.niri.actions; #!${pkgs.bash}/bin/bash
let systemctl --user restart swaybg
sh = spawn "sh" "-c"; sleep 2
in
lib.attrsets.mergeAttrsList [
{
# Kate keys.
"Mod+O".action = sh "haxtype 'O>'";
"Mod+T".action = sh "haxtype '🔵T>'";
"Mod+K".action = sh "haxtype '🟣K>'";
"Mod+W".action = sh "haxtype '🟢W>'";
"Mod+S".action = sh "haxtype '🔴S>'";
"Mod+E".action = sh "haxtype 'E>'";
# Kate keys. systemctl --user stop waybar
"Mod+F1".action = sh "haxtype "; niri msg action spawn -- waybar
"Mod+F2".action = sh "haxtype ";
"Mod+F3".action = sh "haxtype ";
"Print".action = screenshot; sleep 2
"Mod+Return".action = spawn "wezterm"; niri msg action spawn -- ${xwayland-satellite-loop}/bin/xwayland-satellite-loop
"Mod+D".action = spawn "fuzzel"; niri msg action spawn -- home-assistant-desktop
"Mod+Space".action = spawn "fuzzel"; ${if (sysConfig.networking.hostName != "trailblazer") then "#" else ""}niri msg action spawn -- ${pkgs.mission-center}/bin/missioncenter
niri msg action spawn -- ${pkgs.pcloud}/bin/pcloud
"XF86AudioRaiseVolume".action = sh "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 0.1+"; sleep 10
"XF86AudioLowerVolume".action = sh "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 0.1-";
"XF86Launch6".action = sh "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 0.1+";
"XF86Tools".action = sh "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 0.1-";
"XF86AudioMute".action = sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
"XF86AudioMicMute".action = sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
"XF86MonBrightnessDown".action = sh "brightnessctl set 10%-"; niri msg action spawn -- kdeconnect-cli -l
"XF86MonBrightnessUp".action = sh "brightnessctl set 10%+"; '';
in
"XF86Messenger".action = sh "rfkill toggle bluetooth"; [ { command = [ "${niri-init}/bin/niri-init" ]; } ];
"XF86Go".action = sh "rfkill toggle wwan";
"Cancel".action = sh "rfkill block nfc";
"XF86Favorites".action = sh "mpc toggle";
# Lenovo buttons.
"0x47".action = sh "brightnessctl set 10%-";
"0x48".action = sh "brightnessctl set 10%+";
"Mod+Q".action = close-window;
"XF86AudioPrev".action = sh "playerctl previous";
"XF86AudioNext".action = sh "playerctl next";
"XF86AudioPlay".action = sh "playerctl play-pause";
"XF86Launch5".action = sh "playerctl play-pause";
}
(binds {
suffixes."Left" = "column-left";
suffixes."Down" = "window-down";
suffixes."Up" = "window-up";
suffixes."Right" = "column-right";
prefixes."Mod" = "focus";
prefixes."Mod+Ctrl" = "move";
prefixes."Mod+Shift" = "focus-monitor";
prefixes."Mod+Shift+Ctrl" = "move-window-to-monitor";
substitutions."monitor-column" = "monitor";
substitutions."monitor-window" = "monitor";
})
(binds {
suffixes."Home" = "first";
suffixes."End" = "last";
prefixes."Mod" = "focus-column";
prefixes."Mod+Ctrl" = "move-column-to";
})
(binds {
suffixes."U" = "workspace-down";
suffixes."I" = "workspace-up";
prefixes."Mod" = "focus";
prefixes."Mod+Ctrl" = "move-window-to";
prefixes."Mod+Shift" = "move";
})
(binds {
suffixes = builtins.listToAttrs (
map (n: {
name = toString n;
value = [
"workspace"
n
];
}) (range 1 9)
);
prefixes."Mod" = "focus";
prefixes."Mod+Ctrl" = "move-window-to";
})
{
"Mod+Comma".action = consume-window-into-column;
"Mod+Period".action = expel-window-from-column;
"Mod+R".action = switch-preset-column-width;
"Mod+F".action = maximize-column;
"Mod+Shift+F".action = fullscreen-window;
"Mod+C".action = center-column;
"Mod+L".action = switch-focus-between-floating-and-tiling;
"Mod+Shift+L".action = toggle-window-floating;
"Mod+Minus".action = set-column-width "-10%";
"Mod+Plus".action = set-column-width "+10%";
"Mod+Shift+Minus".action = set-window-height "-10%";
"Mod+Shift+Plus".action = set-window-height "+10%";
"Mod+Print".action = screenshot-window;
"Mod+Shift+E".action = quit;
"Mod+Shift+P".action = power-off-monitors;
"Mod+Shift+Ctrl+T".action = toggle-debug-tint;
}
];
# Startup our wallpaper and our credential manager.
spawn-at-startup =
let
niri-init = pkgs.writeScriptBin "niri-init" ''
#!${pkgs.bash}/bin/bash
systemctl --user restart swaybg
sleep 2
systemctl --user stop waybar
niri msg action spawn -- waybar
sleep 2
niri msg action spawn -- ${xwayland-satellite-loop}/bin/xwayland-satellite-loop
niri msg action spawn -- home-assistant-desktop
${
if (sysConfig.networking.hostName != "trailblazer") then "#" else ""
}niri msg action spawn -- ${pkgs.mission-center}/bin/missioncenter
niri msg action spawn -- ${pkgs.pcloud}/bin/pcloud
${cfg.extraStartupCommands}
sleep 10
niri msg action spawn -- kdeconnect-cli -l
'';
in
[ { command = [ "${niri-init}/bin/niri-init" ]; } ];
};
}; };
}; };
} }

View file

@ -27,8 +27,7 @@
# For non-trailblazer machines, allow building on Trailblazer. # For non-trailblazer machines, allow building on Trailblazer.
distributedBuilds = distributedBuilds =
!(config.networking.hostName == "trailblazer") && !(config.networking.hostName == "trailblazer");
!(config.networking.hostName == "chrysalis");
buildMachines = buildMachines =
if config.nix.distributedBuilds then if config.nix.distributedBuilds then
[ [

View file

@ -4,12 +4,7 @@
# #
# vim: et:ts=2:sw=2: # vim: et:ts=2:sw=2:
# #
{ { pkgs, deprekages, talon, ... }:
pkgs,
deprekages,
talon,
...
}:
{ {
# Ensures the system state isn't changed breakingly (e.g. by updating # Ensures the system state isn't changed breakingly (e.g. by updating
@ -45,6 +40,9 @@
# General tweaks and fixes. # General tweaks and fixes.
# #
# Make systemd not hang here forever.
systemd.extraConfig = "DefaultTimeoutStopSec=20";
# #
# Users. # Users.
# #
@ -101,18 +99,11 @@
services.mullvad-vpn.enable = true; services.mullvad-vpn.enable = true;
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
services.udev.packages = services.udev.packages = [
[ pkgs.minipro
pkgs.minipro ] ++ (if pkgs.stdenv.isAarch64 then [] else [
] #talon.default
++ ( ]);
if pkgs.stdenv.isAarch64 then
[ ]
else
[
#talon.default
]
);
services.fwupd.enable = true; services.fwupd.enable = true;
@ -126,12 +117,4 @@
userServices = true; userServices = true;
}; };
}; };
# No, you haven't doxed us.
# This is just the location of Amsterdam =P.
location = {
provider = "geoclue2";
latitude = 52.377956;
longitude = 4.897070;
};
} }

View file

@ -9,7 +9,6 @@
pkgs, pkgs,
deprekages, deprekages,
modulesPath, modulesPath,
normalizeModule,
... ...
}: }:
{ {
@ -17,7 +16,6 @@
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
./audio.nix ./audio.nix
./ec_kmod.nix ./ec_kmod.nix
(normalizeModule ./wluma.hm.nix)
]; ];
# Bootloader. # Bootloader.
@ -58,9 +56,6 @@
# Override stylix font sizes. # Override stylix font sizes.
stylix.fonts.sizes.desktop = lib.mkForce 16; stylix.fonts.sizes.desktop = lib.mkForce 16;
# Use wluma to manage backlight with the ALS and screen content.
deprekated.niri.extraStartupCommands = "niri msg action spawn -- ${lib.getExe pkgs.wluma}";
# Accomodate the curved screen top by moving things in just a little. # Accomodate the curved screen top by moving things in just a little.
deprekated.waybar.hostSpecificCss = '' deprekated.waybar.hostSpecificCss = ''
.modules-left > :first-child > * { .modules-left > :first-child > * {
@ -78,8 +73,8 @@
# #
# Hardware config. # Hardware config.
# #
# Use the latest kernel, and our patches, until the Dell+Alienware stuff makes it into
# Use the latest kernel to try and ward off WiFi issues. # more mainline kernels. We'll include ccache so we can iterate sanely.
boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = pkgs.linuxPackages_latest;
boot.extraModprobeConfig = '' boot.extraModprobeConfig = ''

View file

@ -1,5 +0,0 @@
{ ... }:
{
# Set up wluma.
xdg.configFile."wluma/config.toml".source = ../../../wluma/chrysalis.toml;
}

View file

@ -30,7 +30,7 @@ with pkgs;
# Comms. # Comms.
dino dino
#gajim gajim
vesktop vesktop
nheko nheko

View file

@ -1,13 +0,0 @@
[als.iio]
path = "/sys/bus/iio/devices"
thresholds = { 0 = "night", 20 = "dark", 80 = "dim", 250 = "normal", 500 = "bright", 800 = "outdoors" }
[[output.backlight]]
name = "eDP-1"
path = "/sys/class/backlight/amdgpu_bl1"
capturer = "wayland"
[[keyboard]]
name = "keyboard-framework"
path = "/sys/bus/platform/devices/framework_laptop/leds/framework_laptop::kbd_backlight"