nix machine / user configurations

add niri module

ptr.pet 8d37ea1f 8b501186

verified
Changed files
+405 -18
_sources
dns
hosts
chernobog
wolumonde
modules
users
mayer
modules
+4 -4
_sources/generated.json
···
},
"nucleus": {
"cargoLocks": null,
-
"date": "2025-11-05",
+
"date": "2025-11-11",
"extract": null,
"name": "nucleus",
"passthru": null,
···
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
-
"rev": "1288cb9847122b8c17375f9b7bd2947e771fd433",
-
"sha256": "sha256-BgLZW4KhzQqNVoeBMbyfFduSqVuzkJPSVutU/pCWzoo=",
+
"rev": "a4f73517c1a76ed20b55f21618148b8afe0fa838",
+
"sha256": "sha256-8WrGAr+aCIFCFuixtH1BSB5lMn+d/FqXsEFAmXY3HkU=",
"sparseCheckout": [],
"type": "git",
"url": "https://tangled.org/@ptr.pet/nucleus"
},
-
"version": "1288cb9847122b8c17375f9b7bd2947e771fd433"
+
"version": "a4f73517c1a76ed20b55f21618148b8afe0fa838"
},
"stylix": {
"cargoLocks": null,
+4 -4
_sources/generated.nix
···
};
nucleus = {
pname = "nucleus";
-
version = "1288cb9847122b8c17375f9b7bd2947e771fd433";
+
version = "a4f73517c1a76ed20b55f21618148b8afe0fa838";
src = fetchgit {
url = "https://tangled.org/@ptr.pet/nucleus";
-
rev = "1288cb9847122b8c17375f9b7bd2947e771fd433";
+
rev = "a4f73517c1a76ed20b55f21618148b8afe0fa838";
fetchSubmodules = false;
deepClone = false;
leaveDotGit = false;
sparseCheckout = [ ];
-
sha256 = "sha256-BgLZW4KhzQqNVoeBMbyfFduSqVuzkJPSVutU/pCWzoo=";
+
sha256 = "sha256-8WrGAr+aCIFCFuixtH1BSB5lMn+d/FqXsEFAmXY3HkU=";
};
-
date = "2025-11-05";
+
date = "2025-11-11";
};
stylix = {
pname = "stylix";
+1 -1
dns/dnsconfig.js
···
// atproto
TXT("_atproto", "did=did:plc:dfl62fgb7wtjj3fcbb72naae"),
A("nil", WOLUMONDE_IP, CF_PROXY_OFF),
-
TXT("_atproto.nil", "did=did:plc:dumbmutttrskde4ibwbnbike"),
+
TXT("_atproto.nil", "did=did:plc:dumbmutt4po52ept2tczimje"),
TXT("_atproto.june", "did=did:plc:y3z2rr7q5rywu4fjn3fmfyop"),
// june
CNAME("june", "girlboss.ceo."),
+2
hosts/chernobog/default.nix
···
];
monospace = [ "Comic Mono" ];
};
+
# fontconfig.hinting.style = "full";
+
# fontconfig.subpixel.rgba = "rgb";
};
services.earlyoom.enable = true;
+1 -1
hosts/chernobog/modules/greetd.nix
···
settings = {
terminal.vt = 1;
default_session = {
-
command = "${pkgs.tuigreet}/bin/tuigreet --issue --time --cmd sway";
+
command = "${pkgs.tuigreet}/bin/tuigreet --issue --time --cmd niri-session";
user = "greeter";
};
};
+3 -3
hosts/chernobog/modules/lact.nix/config.yaml
···
target_temperature: 88
zero_rpm: false
zero_rpm_threshold: 40
-
power_cap: 198.0
+
power_cap: 190.0
performance_level: auto
-
max_core_clock: 3200
+
max_core_clock: 2600
max_memory_clock: 1250
-
voltage_offset: -25
+
voltage_offset: -10
current_profile: oc
auto_switch_profiles: false
+1 -1
hosts/wolumonde/modules/atproto.nix
···
"test.gaze.systems" = mkHandleCfg "gaze.systems" "did:web:dawn.gaze.systems";
"poor.dog" = mkHandleCfg "poor.dog" "did:plc:dfl62fgb7wtjj3fcbb72naae";
"ptr.pet" = mkHandleCfg "ptr.pet" "did:plc:dfl62fgb7wtjj3fcbb72naae";
-
"nil.ptr.pet" = mkHandleCfg "ptr.pet" "did:plc:dumbmutttrskde4ibwbnbike";
+
"nil.ptr.pet" = mkHandleCfg "ptr.pet" "did:plc:dumbmutt4po52ept2tczimje";
"june.ptr.pet" = mkHandleCfg "ptr.pet" "did:plc:y3z2rr7q5rywu4fjn3fmfyop";
"drew.gaze.systems" = mkHandleCfg "gaze.systems" "did:plc:vo6ie3kd6xvpjlof4pnb2zzp";
"eris.gaze.systems" = mkHandleCfg "gaze.systems" "did:plc:bxjnsrfzozl365rsdo5yvuz5";
+3 -3
users/mayer/default.nix
···
enable = true;
binfmt = true;
};
-
sway.enable = true;
+
niri.enable = true;
};
systemd = {
targets.network-online.enable = false;
···
modulesToEnable = l.flatten [
[
"settings"
-
"sway"
-
"wayland"
+
"niri"
"foot"
]
# cli stuff
···
xdg-utils
transmission_4-gtk
prismlauncher
+
lutris
gearlever
signal-desktop
bs-manager
+360
users/modules/niri/config.kdl
···
+
// This config is in the KDL format: https://kdl.dev
+
// "/-" comments out the following node.
+
// Check the wiki for a full description of the configuration:
+
// https://yalter.github.io/niri/Configuration:-Introduction
+
+
// Input device configuration.
+
// Find the full list of options on the wiki:
+
// https://yalter.github.io/niri/Configuration:-Input
+
input {
+
keyboard {
+
xkb {
+
// You can set rules, model, layout, variant and options.
+
// For more information, see xkeyboard-config(7).
+
+
// For example:
+
// layout "us,ru"
+
// options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"
+
options "compose:ralt"
+
+
// If this section is empty, niri will fetch xkb settings
+
// from org.freedesktop.locale1. You can control these using
+
// localectl set-x11-keymap.
+
}
+
+
// Enable numlock on startup, omitting this setting disables it.
+
// numlock
+
}
+
+
touchpad {
+
// off
+
tap
+
// dwt
+
// dwtp
+
// drag false
+
// drag-lock
+
natural-scroll
+
// accel-speed 0.2
+
accel-profile "flat"
+
// scroll-method "two-finger"
+
// disabled-on-external-mouse
+
}
+
+
mouse {
+
// off
+
// natural-scroll
+
// accel-speed 0.2
+
accel-profile "flat"
+
// scroll-method "no-scroll"
+
}
+
+
trackpoint {
+
// off
+
// natural-scroll
+
// accel-speed 0.2
+
accel-profile "flat"
+
// scroll-method "on-button-down"
+
// scroll-button 273
+
// scroll-button-lock
+
// middle-emulation
+
}
+
+
warp-mouse-to-focus
+
focus-follows-mouse
+
+
mod-key "Super"
+
mod-key-nested "Alt"
+
}
+
+
output "HDMI-A-2" {
+
mode "1920x1080@74.973"
+
scale 1
+
}
+
+
output "DP-1" {
+
mode "1920x1080@165.009"
+
scale 1
+
}
+
+
// Settings that influence how windows are positioned and sized.
+
// Find more information on the wiki:
+
// https://yalter.github.io/niri/Configuration:-Layout
+
layout {
+
// Set gaps around windows in logical pixels.
+
gaps 0
+
+
// When to center a column when changing focus, options are:
+
// - "never", default behavior, focusing an off-screen column will keep at the left
+
// or right edge of the screen.
+
// - "always", the focused column will always be centered.
+
// - "on-overflow", focusing a column will center it if it doesn't fit
+
// together with the previously focused column.
+
center-focused-column "never"
+
+
// You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between.
+
preset-column-widths {
+
// Proportion sets the width as a fraction of the output width, taking gaps into account.
+
// For example, you can perfectly fit four windows sized "proportion 0.25" on an output.
+
// The default preset widths are 1/3, 1/2 and 2/3 of the output.
+
proportion 0.33333
+
proportion 0.5
+
proportion 0.66667
+
+
// Fixed sets the width in logical pixels exactly.
+
// fixed 1920
+
}
+
+
// default-column-width { proportion 1.0; }
+
+
focus-ring { off; }
+
border { off; }
+
// shadow { off; }
+
+
struts { }
+
}
+
+
spawn-at-startup "swaybg" "-c" "000000"
+
+
hotkey-overlay {
+
// skip-at-startup
+
}
+
+
prefer-no-csd
+
+
screenshot-path "~/shots/%Y-%m-%d_%H-%M-%S.png"
+
+
environment {
+
ELECTRON_OZONE_PLATFORM_HINT "auto"
+
}
+
+
animations {
+
// off
+
+
// Slow down all animations by this factor. Values below 1 speed them up instead.
+
slowdown 1.4
+
}
+
+
// Open the Firefox picture-in-picture player as floating by default.
+
window-rule {
+
// This app-id regular expression will work for both:
+
// - host Firefox (app-id is "firefox")
+
// - Flatpak Firefox (app-id is "org.mozilla.firefox")
+
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
+
match app-id=r#"^tofi"#
+
+
open-floating true
+
}
+
+
window-rule {
+
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
+
match app-id=r#"^org\.gnome\.World\.Secrets$"#
+
// match namespace="^notifications$"
+
+
block-out-from "screen-capture"
+
}
+
+
window-rule {
+
geometry-corner-radius 0
+
clip-to-geometry true
+
}
+
+
binds {
+
Mod+Shift+Slash { show-hotkey-overlay; }
+
+
Mod+Return hotkey-overlay-title="terminal: foot" { spawn "footclient"; }
+
Mod+D hotkey-overlay-title="launcher: wofi" { spawn "tofi-drun"; }
+
+
Alt+S hotkey-overlay-title="screenshot screen" { screenshot-screen; }
+
Alt+Shift+S hotkey-overlay-title="screenshot" { screenshot; }
+
+
XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+"; }
+
XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-"; }
+
XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; }
+
XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; }
+
+
XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "+10%"; }
+
XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "10%-"; }
+
+
Mod+O repeat=false { toggle-overview; }
+
Mod+Q cooldown-ms=50 { close-window; }
+
+
Mod+Left { focus-column-left; }
+
Mod+Down { focus-window-down; }
+
Mod+Up { focus-window-up; }
+
Mod+Right { focus-column-right; }
+
Mod+H { focus-column-left; }
+
Mod+J { focus-window-down; }
+
Mod+K { focus-window-up; }
+
Mod+L { focus-column-right; }
+
+
Mod+Shift+Left { move-column-left; }
+
Mod+Shift+Down { move-window-down; }
+
Mod+Shift+Up { move-window-up; }
+
Mod+Shift+Right { move-column-right; }
+
Mod+Shift+H { move-column-left; }
+
Mod+Shift+J { move-window-down; }
+
Mod+Shift+K { move-window-up; }
+
Mod+Shift+L { move-column-right; }
+
+
// Alternative commands that move across workspaces when reaching
+
// the first or last window in a column.
+
// Mod+J { focus-window-or-workspace-down; }
+
// Mod+K { focus-window-or-workspace-up; }
+
// Mod+Ctrl+J { move-window-down-or-to-workspace-down; }
+
// Mod+Ctrl+K { move-window-up-or-to-workspace-up; }
+
+
Mod+Home { focus-column-first; }
+
Mod+End { focus-column-last; }
+
Mod+Ctrl+Home { move-column-to-first; }
+
Mod+Ctrl+End { move-column-to-last; }
+
+
Mod+Ctrl+Left { focus-monitor-left; }
+
Mod+Ctrl+Down { focus-monitor-down; }
+
Mod+Ctrl+Up { focus-monitor-up; }
+
Mod+Ctrl+Right { focus-monitor-right; }
+
Mod+Ctrl+H { focus-monitor-left; }
+
Mod+Ctrl+J { focus-monitor-down; }
+
Mod+Ctrl+K { focus-monitor-up; }
+
Mod+Ctrl+L { focus-monitor-right; }
+
+
Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
+
Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
+
Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
+
Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
+
Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
+
Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
+
Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
+
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
+
+
Mod+Page_Down { focus-workspace-down; }
+
Mod+Page_Up { focus-workspace-up; }
+
//Mod+U { focus-workspace-down; }
+
//Mod+I { focus-workspace-up; }
+
Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
+
Mod+Ctrl+Page_Up { move-column-to-workspace-up; }
+
//Mod+Ctrl+U { move-column-to-workspace-down; }
+
//Mod+Ctrl+I { move-column-to-workspace-up; }
+
+
Mod+Shift+Page_Down { move-workspace-down; }
+
Mod+Shift+Page_Up { move-workspace-up; }
+
Mod+Shift+U { move-workspace-down; }
+
Mod+Shift+I { move-workspace-up; }
+
+
// You can bind mouse wheel scroll ticks using the following syntax.
+
// These binds will change direction based on the natural-scroll setting.
+
//
+
// To avoid scrolling through workspaces really fast, you can use
+
// the cooldown-ms property. The bind will be rate-limited to this value.
+
// You can set a cooldown on any bind, but it's most useful for the wheel.
+
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
+
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
+
Mod+Shift+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
+
Mod+Shift+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
+
+
// Usually scrolling up and down with Shift in applications results in
+
// horizontal scrolling; these binds replicate that.
+
Alt+WheelScrollDown { focus-column-right; }
+
Alt+WheelScrollUp { focus-column-left; }
+
Alt+Shift+WheelScrollDown { move-column-right; }
+
Alt+Shift+WheelScrollUp { move-column-left; }
+
+
Mod+1 { focus-workspace 1; }
+
Mod+2 { focus-workspace 2; }
+
Mod+3 { focus-workspace 3; }
+
Mod+4 { focus-workspace 4; }
+
Mod+5 { focus-workspace 5; }
+
Mod+6 { focus-workspace 6; }
+
Mod+7 { focus-workspace 7; }
+
Mod+8 { focus-workspace 8; }
+
Mod+9 { focus-workspace 9; }
+
Mod+Ctrl+1 { move-column-to-workspace 1; }
+
Mod+Ctrl+2 { move-column-to-workspace 2; }
+
Mod+Ctrl+3 { move-column-to-workspace 3; }
+
Mod+Ctrl+4 { move-column-to-workspace 4; }
+
Mod+Ctrl+5 { move-column-to-workspace 5; }
+
Mod+Ctrl+6 { move-column-to-workspace 6; }
+
Mod+Ctrl+7 { move-column-to-workspace 7; }
+
Mod+Ctrl+8 { move-column-to-workspace 8; }
+
Mod+Ctrl+9 { move-column-to-workspace 9; }
+
+
// Switches focus between the current and the previous workspace.
+
// Mod+Tab { focus-workspace-previous; }
+
+
// The following binds move the focused window in and out of a column.
+
// If the window is alone, they will consume it into the nearby column to the side.
+
// If the window is already in a column, they will expel it out.
+
Mod+BracketLeft { consume-or-expel-window-left; }
+
Mod+BracketRight { consume-or-expel-window-right; }
+
+
// Consume one window from the right to the bottom of the focused column.
+
Mod+Comma { consume-window-into-column; }
+
// Expel the bottom window from the focused column to the right.
+
Mod+Period { expel-window-from-column; }
+
+
Mod+R { switch-preset-column-width; }
+
// Cycling through the presets in reverse order is also possible.
+
// Mod+R { switch-preset-column-width-back; }
+
Mod+Shift+R { switch-preset-window-height; }
+
Mod+Ctrl+R { reset-window-height; }
+
Mod+F { maximize-column; }
+
Mod+Shift+F { fullscreen-window; }
+
+
// Expand the focused column to space not taken up by other fully visible columns.
+
// Makes the column "fill the rest of the space".
+
Mod+Ctrl+F { expand-column-to-available-width; }
+
+
Mod+C { center-column; }
+
+
// Center all fully visible columns on screen.
+
Mod+Ctrl+C { center-visible-columns; }
+
+
// Finer width adjustments.
+
// This command can also:
+
// * set width in pixels: "1000"
+
// * adjust width in pixels: "-5" or "+5"
+
// * set width as a percentage of screen width: "25%"
+
// * adjust width as a percentage of screen width: "-10%" or "+10%"
+
// Pixel sizes use logical, or scaled, pixels. I.e. on an output with scale 2.0,
+
// set-column-width "100" will make the column occupy 200 physical screen pixels.
+
Mod+Minus { set-column-width "-10%"; }
+
Mod+Equal { set-column-width "+10%"; }
+
+
// Finer height adjustments when in column with other windows.
+
Mod+Shift+Minus { set-window-height "-10%"; }
+
Mod+Shift+Equal { set-window-height "+10%"; }
+
+
// Move the focused window between the floating and the tiling layout.
+
Mod+V { toggle-window-floating; }
+
Mod+Shift+V { switch-focus-between-floating-and-tiling; }
+
+
// Toggle tabbed column display mode.
+
// Windows in this column will appear as vertical tabs,
+
// rather than stacked on top of each other.
+
Mod+W { toggle-column-tabbed-display; }
+
+
// Actions to switch layouts.
+
// Note: if you uncomment these, make sure you do NOT have
+
// a matching layout switch hotkey configured in xkb options above.
+
// Having both at once on the same hotkey will break the switching,
+
// since it will switch twice upon pressing the hotkey (once by xkb, once by niri).
+
// Mod+Space { switch-layout "next"; }
+
// Mod+Shift+Space { switch-layout "prev"; }
+
+
// Applications such as remote-desktop clients and software KVM switches may
+
// request that niri stops processing the keyboard shortcuts defined here
+
// so they may, for example, forward the key presses as-is to a remote machine.
+
// It's a good idea to bind an escape hatch to toggle the inhibitor,
+
// so a buggy application can't hold your session hostage.
+
//
+
// The allow-inhibiting=false property can be applied to other binds as well,
+
// which ensures niri always processes them, even when an inhibitor is active.
+
Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
+
+
// The quit action will show a confirmation dialog to avoid accidental exits.
+
Mod+Shift+E { quit; }
+
Ctrl+Alt+Delete { quit; }
+
+
// Powers off the monitors. To turn them back on, do any input like
+
// moving the mouse or pressing any other key.
+
Mod+Shift+P { power-off-monitors; }
+
}
+19
users/modules/niri/default.nix
···
+
{
+
config,
+
nixosConfig,
+
pkgs,
+
lib,
+
tlib,
+
...
+
}:
+
{
+
imports = [
+
../wayland
+
../wlsunset
+
../mako
+
../tofi
+
];
+
+
home.packages = with pkgs; [niri xwayland-satellite brightnessctl swaybg];
+
xdg.configFile."niri/config.kdl".source = ./config.kdl;
+
}
+7 -1
users/modules/tofi/default.nix
···
-
{ lib, config, ... }:
+
{ pkgs, lib, config, ... }:
{
stylix.targets.tofi.enable = true;
programs.tofi = {
enable = true;
+
package = pkgs.tofi.overrideAttrs (old: {
+
patches = [(pkgs.fetchpatch2 {
+
url = "https://patch-diff.githubusercontent.com/raw/philj56/tofi/pull/189.patch";
+
hash = "sha256-qsXRyNE9x1sSDrCq/LTQY/DTEMwYAJB3U0/dPXX/jw4=";
+
})];
+
});
settings = {
outline-width = 0;
border-width = 0;