wip: more niri tweaks

This commit is contained in:
Nickolaj Jepsen 2025-04-30 15:59:52 +02:00
parent 5627b17333
commit be51b67524
5 changed files with 110 additions and 62 deletions

108
flake.lock generated
View file

@ -10,11 +10,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1736955230, "lastModified": 1745630506,
"narHash": "sha256-uenf8fv2eG5bKM8C/UvFaiJMZ4IpUFaQxk9OH5t/1gA=", "narHash": "sha256-bHCFgGeu8XjWlVuaWzi3QONjDW3coZDqSHvnd4l7xus=",
"owner": "ryantm", "owner": "ryantm",
"repo": "agenix", "repo": "agenix",
"rev": "e600439ec4c273cf11e06fe4d9d906fb98fa097c", "rev": "96e078c646b711aee04b82ba01aefbff87004ded",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -34,11 +34,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1742656338, "lastModified": 1745855194,
"narHash": "sha256-Vkg5dyXKwoAfEVlKPxbCbdTCF9sXmTySZBSL28Kcdmo=", "narHash": "sha256-l6ZmjOBl4KOjJ+KQEjR3GQdMP9Q+NlM+13BQ/N7vkOI=",
"owner": "oddlama", "owner": "oddlama",
"repo": "agenix-rekey", "repo": "agenix-rekey",
"rev": "b677dbe0d675c68a19dedbc771aff22de76b11ea", "rev": "7584efc530a1e3c71d20fe07ce33c0ce96ca2afe",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -120,11 +120,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1700795494, "lastModified": 1744478979,
"narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=", "narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d", "rev": "43975d782b418ebf4969e9ccba82466728c2851b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -162,11 +162,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1745502102, "lastModified": 1745812220,
"narHash": "sha256-LqhRwzvIVPEjH0TaPgwzqpyhW6DtCrvz7FnUJDoUZh8=", "narHash": "sha256-hotBG0EJ9VmAHJYF0yhWuTVZpENHvwcJ2SxvIPrXm+g=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "ca27b88c88948d96feeee9ed814cbd34f53d0d70", "rev": "d0c543d740fad42fe2c035b43c9d41127e073c78",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -396,11 +396,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1703113217, "lastModified": 1745494811,
"narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=", "narHash": "sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1", "rev": "abfad3d2958c9e6300a883bd443512c55dfeb1be",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -432,11 +432,11 @@
}, },
"mnw": { "mnw": {
"locked": { "locked": {
"lastModified": 1744597985, "lastModified": 1745705214,
"narHash": "sha256-lLYB9/tQ0OAKonL0Ku963nqOm0aE1TmLavrzmXAr5Zc=", "narHash": "sha256-XGfaHbFI4vvDuaoVO3IFYZKezXIO8rhUaMCGcjY71Ac=",
"owner": "Gerg-L", "owner": "Gerg-L",
"repo": "mnw", "repo": "mnw",
"rev": "cbdcbb5f8eb24e25b932bbc87e29299a72e34b64", "rev": "c1f4587db4c53dcefa432c46c7a899a116d8e924",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -483,11 +483,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable" "xwayland-satellite-unstable": "xwayland-satellite-unstable"
}, },
"locked": { "locked": {
"lastModified": 1745668007, "lastModified": 1745917205,
"narHash": "sha256-xYf6xz8WOW9ztBi356dHdqLsTCoxVS8Iapfpwosrn7Q=", "narHash": "sha256-o31wA3qHEf5KrVeKpoOZnDuaW3F5/BhFimZaA5V7wmI=",
"owner": "sodiboo", "owner": "sodiboo",
"repo": "niri-flake", "repo": "niri-flake",
"rev": "8fdaf610c455d0b5b70374a21392a717be513b0f", "rev": "93f94e630a61b2b8c2d50c64ac213bfe7fc1775a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -516,11 +516,11 @@
"niri-unstable": { "niri-unstable": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1745663376, "lastModified": 1745913113,
"narHash": "sha256-mGQyB+Epl87ZCZZCcBkjUrdR1aJt8Ybiqr4h0yUkgQI=", "narHash": "sha256-/Iph65fWHox7tVyfzw0+AGyCqL2FGuHSt+xjFUsxbOk=",
"owner": "YaLTeR", "owner": "YaLTeR",
"repo": "niri", "repo": "niri",
"rev": "78e3daf5f82b5870e998faf0e1efeaa048730976", "rev": "5f117c61dc4dd91564e02b32836e98dd0e648246",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -536,11 +536,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1745120797, "lastModified": 1745725746,
"narHash": "sha256-owQ0VQ+7cSanTVPxaZMWEzI22Q4bGnuvhVjLAJBNQ3E=", "narHash": "sha256-iR+idGZJ191cY6NBXyVjh9QH8GVWTkvZw/w+1Igy45A=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "69716041f881a2af935021c1182ed5b0cc04d40e", "rev": "187524713d0d9b2d2c6f688b81835114d4c2a7c6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -555,11 +555,11 @@
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1745546092, "lastModified": 1745891836,
"narHash": "sha256-Q4vPpbuoJOBXRdGW7ZRqlFq1x4FfWKmfyxSVRQZFNCM=", "narHash": "sha256-UJpwh09VKotfAoZRz6NNYZ1mepbhlkvYuoUSnMdUXCs=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-vscode-extensions", "repo": "nix-vscode-extensions",
"rev": "baeaec5a10fb8626bea64ebabdfaecdf64832bf3", "rev": "7387c46187fb2bbeb8bd1c94368a666e7bbd60c6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -664,11 +664,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1745487689, "lastModified": 1745742390,
"narHash": "sha256-FQoi3R0NjQeBAsEOo49b5tbDPcJSMWc3QhhaIi9eddw=", "narHash": "sha256-1rqa/XPSJqJg21BKWjzJZC7yU0l/YTVtjRi0RJmipus=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5630cf13cceac06cefe9fc607e8dfa8fb342dde3", "rev": "26245db0cb552047418cfcef9a25da91b222d6c7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -680,11 +680,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1745391562, "lastModified": 1745794561,
"narHash": "sha256-sPwcCYuiEopaafePqlG826tBhctuJsLx/mhKKM5Fmjo=", "narHash": "sha256-T36rUZHUART00h3dW4sV5tv4MrXKT7aWjNfHiZz7OHg=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8a2f738d9d1f1d986b5a4cd2fd2061a7127237d7", "rev": "5461b7fa65f3ca74cef60be837fd559a8918eaa0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -712,11 +712,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1745487689, "lastModified": 1745868005,
"narHash": "sha256-FQoi3R0NjQeBAsEOo49b5tbDPcJSMWc3QhhaIi9eddw=", "narHash": "sha256-hZScOyQphT4RUmSEJX+2OxjIlGgLwSd8iW1LNtAWIOs=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5630cf13cceac06cefe9fc607e8dfa8fb342dde3", "rev": "330d0a4167924b43f31cc9406df363f71b768a02",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -728,11 +728,11 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1735554305, "lastModified": 1745377448,
"narHash": "sha256-zExSA1i/b+1NMRhGGLtNfFGXgLtgo+dcuzHzaWA6w3Q=", "narHash": "sha256-jhZDfXVKdD7TSEGgzFJQvEEZ2K65UMiqW5YJ2aIqxMA=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "0e82ab234249d8eee3e8c91437802b32c74bb3fd", "rev": "507b63021ada5fee621b6ca371c4fca9ca46f52c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -751,11 +751,11 @@
"treefmt-nix": "treefmt-nix_3" "treefmt-nix": "treefmt-nix_3"
}, },
"locked": { "locked": {
"lastModified": 1745562604, "lastModified": 1745923935,
"narHash": "sha256-GE8J9kDnCT9rmRLNS1nQMMsViDM3NE4OdE1VcUZju4w=", "narHash": "sha256-O+lastqhhCh3tkB/9qS6VxBz0FLHLe5kOCyZKPqSQNY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "92404d658b85663c9ab10446b04cfde47bf5b8ae", "rev": "6d43c068f3ec3991c0bec154dd44f98ec9d4660f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -776,11 +776,11 @@
"systems": "systems_5" "systems": "systems_5"
}, },
"locked": { "locked": {
"lastModified": 1745533630, "lastModified": 1745819184,
"narHash": "sha256-6KSUHpEON1blNkSGsbJQgNpMEE0/UQqNyROaAY9C8yw=", "narHash": "sha256-+v+MOVFYDQCJdP67gLrIdrLGKqBUp37KGhvcqd9ZFqA=",
"owner": "notashelf", "owner": "notashelf",
"repo": "nvf", "repo": "nvf",
"rev": "fc6c11631be694d0563464c6086f3b8b5a982e9f", "rev": "efa859381f60132db976d2501bfdb4e6f8d5a8c5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -995,11 +995,11 @@
"nixpkgs": "nixpkgs_4" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
"lastModified": 1744961264, "lastModified": 1745848521,
"narHash": "sha256-aRmUh0AMwcbdjJHnytg1e5h5ECcaWtIFQa6d9gI85AI=", "narHash": "sha256-gNrTO3pEjmu3WiuYrUHJrTGCFw9v+qZXCFmX/Vjf5WI=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "8d404a69efe76146368885110f29a2ca3700bee6", "rev": "763f1ce0dd12fe44ce6a5c6ea3f159d438571874",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1028,11 +1028,11 @@
"xwayland-satellite-unstable": { "xwayland-satellite-unstable": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1745372360, "lastModified": 1745730655,
"narHash": "sha256-5DX9lYmEbkdANCzME2v3coV0EnWOhS7NsTlGBQuqmjM=", "narHash": "sha256-Tdsw5lD/XM8i1GnQr7ombqnEaCpt/voPs2AbjuYBbjI=",
"owner": "Supreeeme", "owner": "Supreeeme",
"repo": "xwayland-satellite", "repo": "xwayland-satellite",
"rev": "c31679aa41966ee9272bb240703755cb1e7c72e3", "rev": "56a681bfecc5831f41f8eb0ec8c7e96c6b277153",
"type": "github" "type": "github"
}, },
"original": { "original": {

23
hosts/work/niri.nix Normal file
View file

@ -0,0 +1,23 @@
_: {
fireproof.home-manager.programs.niri.settings.outputs = {
"DP-5" = {
position = {
x = 1920;
y = 0;
};
};
"HDMI-A-5" = {
position = {
x = 0;
y = 0;
};
};
"DP-4" = {
position = {
x = 3840;
y = 0;
};
transform.rotation = 90;
};
};
}

View file

@ -48,6 +48,10 @@ in {
# Editor # Editor
"editor.linkedEditing" = true; "editor.linkedEditing" = true;
"files.exclude" = {
"**/*.egg-info" = true;
"**/__pycache__" = true;
};
# Files # Files
"files.autoSave" = "afterDelay"; "files.autoSave" = "afterDelay";
@ -58,7 +62,12 @@ in {
# AI # AI
"github.copilot.editor.enableAutoCompletions" = true; "github.copilot.editor.enableAutoCompletions" = true;
"github.copilot.enable" = {"*" = true;}; "github.copilot.enable" = {
"*" = true;
"plaintext" = true;
"markdown" = true;
"scminput" = true;
};
"chat.agent.enabled" = true; "chat.agent.enabled" = true;
"github.copilot.chat.agent.thinkingTool" = true; "github.copilot.chat.agent.thinkingTool" = true;
"github.copilot.chat.codesearch.enabled" = true; "github.copilot.chat.codesearch.enabled" = true;

View file

@ -25,6 +25,8 @@ in {
programs.ssh = { programs.ssh = {
enable = true; enable = true;
forwardAgent = true; forwardAgent = true;
serverAliveInterval = 60;
serverAliveCountMax = 10;
matchBlocks = { matchBlocks = {
"*" = { "*" = {
identityFile = "${config.age.secrets.ssh-key.path}"; identityFile = "${config.age.secrets.ssh-key.path}";

View file

@ -1,4 +1,18 @@
{pkgsUnstable, ...}: { {pkgsUnstable, pkgs, lib, inputs, ...}:
let
mesa-nixpkgs =
import
(fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/d3c42f187194c26d9f0309a8ecc469d6c878ce33.tar.gz";
sha256 = "sha256:0bmnxsn9r4qfslg4mahsl9y9719ykifbazpxxn1fqf47zbbanxkh";
}
)
{
inherit (pkgs.stdenv.hostPlatform) system;
config = { };
overlays = [ ];
};
in {
# TODO: Move these to a separate module # TODO: Move these to a separate module
fireproof.home-manager.programs.waybar = { fireproof.home-manager.programs.waybar = {
enable = true; enable = true;
@ -87,16 +101,14 @@
#tray > .needs-attention { #tray > .needs-attention {
-gtk-icon-effect: highlight; -gtk-icon-effect: highlight;
background-color: #eb4d4b; background-color: #eb4d4b;
}
#tray > .active {
-gtk-icon-effect: highlight;
background-color: #eb4d4b;
}''; }'';
}; };
programs.niri = { programs.niri = {
enable = true; enable = true;
package = pkgsUnstable.niri; # package = (pkgsUnstable.niri.override { inherit (mesa-nixpkgs) libgbm; });
# package = pkgsUnstable.niri;
package = inputs.niri.packages."${pkgs.system}".niri-unstable;
}; };
fireproof.home-manager.programs.niri.settings = { fireproof.home-manager.programs.niri.settings = {
prefer-no-csd = true; prefer-no-csd = true;
@ -127,6 +139,7 @@
input = { input = {
focus-follows-mouse.enable = true; focus-follows-mouse.enable = true;
mouse.accel-profile = "flat"; mouse.accel-profile = "flat";
keyboard.xkb.layout = "eu";
}; };
window-rules = [ window-rules = [
{ {
@ -212,8 +225,9 @@
"Mod+F".action.maximize-column = {}; "Mod+F".action.maximize-column = {};
"Mod+Shift+F".action.fullscreen-window = {}; "Mod+Shift+F".action.fullscreen-window = {};
"Mod+A".action.toggle-column-tabbed-display = {}; "Mod+A".action.toggle-column-tabbed-display = {};
"Mod+C".action.center-column = {}; "Mod+D".action.toggle-overview = {};
"Mod+S".action.toggle-window-floating = {}; "Mod+S".action.toggle-window-floating = {};
"Mod+C".action.switch-preset-column-width = {};
"Mod+Z".action.set-column-width = "-5%"; "Mod+Z".action.set-column-width = "-5%";
"Mod+X".action.set-column-width = "+5%"; "Mod+X".action.set-column-width = "+5%";