chyrysalis: customizations

This commit is contained in:
Kate 2025-08-03 11:01:34 +02:00
parent 32af15d25e
commit 6b09e9451f
8 changed files with 440 additions and 381 deletions

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,15 +5,26 @@
{ {
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 = {
extraStartupCommands = lib.mkOption {
type = lib.types.str;
default = "";
example = ''
niri msg action spawn -- xmessage hi
'';
description = "Any extra commands to be added to Niri's startup.";
};
};
config = {
# Add in some basic control utilities to our system config. # Add in some basic control utilities to our system config.
environment.systemPackages = [ environment.systemPackages = [
pkgs.wlrctl pkgs.wlrctl
@ -188,10 +199,12 @@ in
# Make anki flashcard windows modal floats. # Make anki flashcard windows modal floats.
{ {
matches = [{ matches = [
{
app-id = "^anki$"; app-id = "^anki$";
title = "Add"; title = "Add";
}]; }
];
open-floating = true; open-floating = true;
default-floating-position = { default-floating-position = {
@ -370,9 +383,13 @@ in
niri msg action spawn -- ${xwayland-satellite-loop}/bin/xwayland-satellite-loop niri msg action spawn -- ${xwayland-satellite-loop}/bin/xwayland-satellite-loop
niri msg action spawn -- home-assistant-desktop niri msg action spawn -- home-assistant-desktop
${if (sysConfig.networking.hostName != "trailblazer") then "#" else ""}niri msg action spawn -- ${pkgs.mission-center}/bin/missioncenter ${
if (sysConfig.networking.hostName != "trailblazer") then "#" else ""
}niri msg action spawn -- ${pkgs.mission-center}/bin/missioncenter
niri msg action spawn -- ${pkgs.pcloud}/bin/pcloud niri msg action spawn -- ${pkgs.pcloud}/bin/pcloud
${cfg.extraStartupCommands}
sleep 10 sleep 10
niri msg action spawn -- kdeconnect-cli -l niri msg action spawn -- kdeconnect-cli -l
@ -381,4 +398,5 @@ in
[ { command = [ "${niri-init}/bin/niri-init" ]; } ]; [ { command = [ "${niri-init}/bin/niri-init" ]; } ];
}; };
}; };
};
} }

View file

@ -27,7 +27,8 @@
# 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,7 +4,12 @@
# #
# 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
@ -40,9 +45,6 @@
# General tweaks and fixes. # General tweaks and fixes.
# #
# Make systemd not hang here forever.
systemd.extraConfig = "DefaultTimeoutStopSec=20";
# #
# Users. # Users.
# #
@ -99,11 +101,18 @@
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 [ ]
++ (
if pkgs.stdenv.isAarch64 then
[ ]
else
[
#talon.default #talon.default
]); ]
);
services.fwupd.enable = true; services.fwupd.enable = true;
@ -117,4 +126,12 @@
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,6 +9,7 @@
pkgs, pkgs,
deprekages, deprekages,
modulesPath, modulesPath,
normalizeModule,
... ...
}: }:
{ {
@ -16,6 +17,7 @@
(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.
@ -56,6 +58,9 @@
# 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 > * {
@ -73,8 +78,8 @@
# #
# Hardware config. # 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. # Use the latest kernel to try and ward off WiFi issues.
boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = pkgs.linuxPackages_latest;
boot.extraModprobeConfig = '' boot.extraModprobeConfig = ''

View file

@ -0,0 +1,5 @@
{ ... }:
{
# 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

13
wluma/chrysalis.toml Normal file
View file

@ -0,0 +1,13 @@
[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"