update system

This commit is contained in:
2025-11-05 14:13:32 +01:00
parent 69eafb5594
commit d5eb686f7f
18 changed files with 350 additions and 212 deletions

View File

@@ -22,8 +22,8 @@ in
home = {
sessionVariables = {
NIXOS_OZONE_WL = "1";
GDK_BACKEND = "wayland,x11,*";
QT_QPA_PLATFORM = "wayland;xcb";
GDK_BACKEND = "wayland";
QT_QPA_PLATFORM = "wayland";
SDL_VIDEODRIVER = "wayland";
};
@@ -32,6 +32,7 @@ in
# fonts
noto-fonts
# gnome packages
qalculate-gtk
evince
baobab
gnome.gvfs
@@ -52,13 +53,6 @@ in
};
programs = {
dankMaterialShell = {
enable = true;
niri = {
enableSpawn = true;
enableKeybinds = false;
};
};
niri.settings = {
binds = {
"Mod+Left".action.focus-column-left = [ ];
@@ -75,29 +69,30 @@ in
"Mod+Shift+Down".action.move-window-down-or-to-workspace-down = [ ];
"Mod+C".action.close-window = [ ];
"Mod+M".action.center-window = [ ];
/*
"Mod+M".action.spawn = [
(pkgs.writeShellScript "qalculate" ''
if niri msg --json windows | jq -e 'any(.[]; .app_id == "qalculate-gtk")'; then
pkill qalculate-gtk
else
qalculate-gtk &
fi
'')
];
*/
"Mod+T".action.spawn = [ "kitty" ];
"Mod+V".action.maximize-column = [ ];
"Mod+P".action.fullscreen-window = [ ];
"Mod+D".action.fullscreen-window = [ ];
"Mod+P".action.toggle-window-floating = [ ];
"Mod+Space".action.spawn = [
"dms"
"ipc"
"spotlight"
"toggle"
];
"Mod+MouseMiddle".action.toggle-overview = [ ];
"Mod+Shift+V".action.screenshot = [ ];
# "Mod+Shift+C".action.pick-color = [ ];
};
overview.zoom = 0.8;
window-rules = [
{
geometry-corner-radius = {
top-left = 24.0;
top-right = 24.0;
bottom-left = 24.0;
bottom-right = 24.0;
};
clip-to-geometry = true;
tiled-state = true;
}
@@ -109,6 +104,17 @@ in
matches = [ { app-id = "firefox"; } ];
default-column-width.fixed = 1500;
}
{
matches = [ { app-id = "qalculate-gtk"; } ];
open-floating = true;
default-column-width.fixed = 1000;
default-window-height.fixed = 800;
default-floating-position = {
x = 0;
y = 0;
relative-to = "bottom";
};
}
];
layout = {
always-center-single-column = true;
@@ -128,17 +134,31 @@ in
};
};
programs.dankMaterialShell.greeter = {
enable = true;
compositor.name = "niri";
configHome = "/home/${username}";
};
services = {
kmscon = {
enable = true;
hwRender = true;
};
greetd = {
enable = true;
greeterManagesPlymouth = false;
settings = {
initial_session = {
command = "${pkgs.niri}/bin/niri-session";
user = username;
};
default_session = {
command = "${lib.getExe pkgs.tuigreet} --asterisks --remember --user-menu --cmd '${pkgs.niri}/bin/niri-session'";
user = username;
};
};
};
dbus = {
enable = true;
implementation = "broker";
};
pcscd.enable = true;
gvfs.enable = true;
};
};
}

View File

@@ -36,6 +36,23 @@ in
"move ${pipPadding} ${pipPadding},${firefoxPipInitial}"
];
};
programs.niri.settings.window-rules = [
{
matches = [
{
app-id = "firefox";
title = "Picture-in-Picture";
}
];
open-focused = false;
open-floating = true;
default-floating-position = {
x = homeConfig.theme.md3-evo.padding;
y = homeConfig.theme.md3-evo.padding;
relative-to = "top-left";
};
}
];
};
};
}

View File

@@ -25,6 +25,7 @@ in
"ignorealpha 0.3, anyrun"
];
};
programs.niri.settings.binds."Mod+Space".action.spawn = [ (lib.getExe pkgs.walker) ];
home.packages = with pkgs; [
walker
wl-clipboard

View File

@@ -20,6 +20,8 @@ in
enable = true;
settings = {
mainBar = {
layer = "top";
height = 24;
reload_style_on_change = true;
exclusive = true;
@@ -35,25 +37,24 @@ in
modules-center = [
"clock"
];
modules-right =
[
"privacy"
"gamemode"
"tray"
"pulseaudio"
]
++ (
if cfg.mobile then
[ "backlight" ]
else
[
"custom/brightness"
]
)
++ [
# "custom/theme"
# "network"
];
modules-right = [
"privacy"
"gamemode"
"tray"
"pulseaudio"
]
++ (
if cfg.mobile then
[ "backlight" ]
else
[
"custom/brightness"
]
)
++ [
# "custom/theme"
# "network"
];
"pulseaudio" = {
format = "{icon} {volume}%";

View File

@@ -28,6 +28,19 @@ in
];
};
# WARN: sometimes the VM will place hard-coded/hashed paths in the config,
# which breaks after NixOS updates because hashes change.
# The error might look something like
# "Unable to find efi firmware that is compatible with the current configuration".
# To fix this, manually edit the VM config in the VM manager in the XML tab of the Boot Options.
# Replace
# <loader readonly="yes" secure="yes" type="pflash" format="raw">/nix/store/yd1rlziy0cnjjp78zc7wr9dcv5hah16w-qemu-10.1.0/share/qemu/edk2-x86_64-secure-code.fd</loader>
# <nvram template="/nix/store/yd1rlziy0cnjjp78zc7wr9dcv5hah16w-qemu-10.1.0/share/qemu/edk2-i386-vars.fd" templateFormat="raw" format="raw">/var/lib/libvirt/qemu/nvram/win11_VARS.fd</nvram>
# with
# <loader readonly="yes" secure="yes" type="pflash" format="raw">/run/libvirt/nix-ovmf/edk2-x86_64-secure-code.fd</loader>
# <nvram template="/run/libvirt/nix-ovmf/edk2-i386-vars.fd" templateFormat="raw" format="raw">/var/lib/libvirt/qemu/nvram/win11_VARS.fd</nvram>
environment.systemPackages = with pkgs; [
virt-manager
virt-viewer
@@ -37,16 +50,13 @@ in
win-virtio
win-spice
adwaita-icon-theme
qemu
];
virtualisation = {
libvirtd = {
enable = true;
qemu = {
swtpm.enable = true;
ovmf.enable = true;
ovmf.packages = [ pkgs.OVMFFull.fd ];
};
qemu.swtpm.enable = true;
};
spiceUSBRedirection.enable = true;
};