From c4fcb26aceb5473f68e9cc3a37dce9ec3bdfc788 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sun, 2 Nov 2025 01:19:27 +0100 Subject: [PATCH] re-enable niri, tweals, update --- flake.lock | 36 +++---- flake.nix | 15 ++- homeConfigurations/vinzenz/default.nix | 6 +- homeConfigurations/vinzenz/niri.nix | 127 ++++++++++++++++++++---- homeConfigurations/vinzenz/starship.nix | 4 +- homeConfigurations/vinzenz/swaylock.nix | 4 +- homeConfigurations/vinzenz/waybar.nix | 27 ----- nixosModules/niri.nix | 7 -- 8 files changed, 142 insertions(+), 84 deletions(-) delete mode 100644 nixosModules/niri.nix diff --git a/flake.lock b/flake.lock index 59dacee..889ab8e 100644 --- a/flake.lock +++ b/flake.lock @@ -169,11 +169,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1761187190, - "narHash": "sha256-5ln16iOeWpEX5MO7M3jzFEBNFE42gpFsCvSvPjtF6tQ=", + "lastModified": 1762026425, + "narHash": "sha256-7eDtQrr+CRZ1pLjJ6Bx7Ab9pUIowXJ7ooqEh6p3jIn8=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "77a07f5d3b775fba67550c38122ebb8d3ee3ba1c", + "rev": "342730d4f8e109f3506932d2be1c8f9ab19a7039", "type": "github" }, "original": { @@ -202,11 +202,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1760940149, - "narHash": "sha256-KbM47vD6E0cx+v4jYQZ8mD5N186AKm2CQlyh34TW58U=", + "lastModified": 1761888958, + "narHash": "sha256-YgArUHI81Esn6fOCwVSrMI2G4RI3f3BPbRbPWsJubAc=", "owner": "YaLTeR", "repo": "niri", - "rev": "b3245b81a6ed8edfaf5388a74d2e0a23c24941e5", + "rev": "e2576879216a39e5c45b9d2906531bc2065e724c", "type": "github" }, "original": { @@ -252,11 +252,11 @@ ] }, "locked": { - "lastModified": 1761240986, - "narHash": "sha256-EjePxTz1P2cdFCPG+M33CGUpBVkD2W+zllZF0Cv1uDY=", + "lastModified": 1761962287, + "narHash": "sha256-Wm9p7PpkSy6bgw9NU+NKCy1i3CQCYbTEbsHURaGnINA=", "owner": "nix-community", "repo": "nix-vscode-extensions", - "rev": "868d9f20e2d57e78cc53598f760c547a516f6ba7", + "rev": "1a37285c50e143620fad2e9fb322adff5e2df1f2", "type": "github" }, "original": { @@ -267,11 +267,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1761016216, - "narHash": "sha256-G/iC4t/9j/52i/nm+0/4ybBmAF4hzR8CNHC75qEhjHo=", + "lastModified": 1761597516, + "narHash": "sha256-wxX7u6D2rpkJLWkZ2E932SIvDJW8+ON/0Yy8+a5vsDU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "481cf557888e05d3128a76f14c76397b7d7cc869", + "rev": "daf6dc47aa4b44791372d6139ab7b25269184d55", "type": "github" }, "original": { @@ -283,11 +283,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1760965567, - "narHash": "sha256-0JDOal5P7xzzAibvD0yTE3ptyvoVOAL0rcELmDdtSKg=", + "lastModified": 1761880412, + "narHash": "sha256-QoJjGd4NstnyOG4mm4KXF+weBzA2AH/7gn1Pmpfcb0A=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cb82756ecc37fa623f8cf3e88854f9bf7f64af93", + "rev": "a7fc11be66bdfb5cdde611ee5ce381c183da8386", "type": "github" }, "original": { @@ -430,11 +430,11 @@ "xwayland-satellite-unstable": { "flake": false, "locked": { - "lastModified": 1761173223, - "narHash": "sha256-FumZh+fPRaKXkl9Y1uTh5KV7Io/AyOZso+UkqLhLArs=", + "lastModified": 1761622056, + "narHash": "sha256-fBrUszJXmB4MY+wf3QsCnqWHcz7u7fLq0QMAWCltIQg=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "bf745144acda1343934e9a094cf9458a54d57889", + "rev": "0728d59ff6463a502e001fb090f6eb92dbc04756", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index b046911..140b27e 100644 --- a/flake.nix +++ b/flake.nix @@ -139,10 +139,17 @@ }; nixosModules = (importModuleDir ./nixosModules) // { - niri = { - imports = [ niri.nixosModules.niri ]; - nixpkgs.overlays = [ niri.overlays.niri ]; - }; + niri = + { pkgs, ... }: + { + imports = [ niri.nixosModules.niri ]; + nixpkgs.overlays = [ niri.overlays.niri ]; + + programs.niri = { + enable = true; + #package = pkgs.niri-stable; + }; + }; pkgs-unstable = { nixpkgs.overlays = [ self.overlays.unstable-packages ]; }; diff --git a/homeConfigurations/vinzenz/default.nix b/homeConfigurations/vinzenz/default.nix index 4af562b..5c81477 100644 --- a/homeConfigurations/vinzenz/default.nix +++ b/homeConfigurations/vinzenz/default.nix @@ -10,9 +10,9 @@ ./zsh.nix ./starship.nix ./fonts.nix - #./niri.nix - #./swaylock.nix - #./waybar.nix + ./niri.nix + ./swaylock.nix + ./waybar.nix ]; config = { diff --git a/homeConfigurations/vinzenz/niri.nix b/homeConfigurations/vinzenz/niri.nix index 3562ae1..8e18812 100644 --- a/homeConfigurations/vinzenz/niri.nix +++ b/homeConfigurations/vinzenz/niri.nix @@ -1,6 +1,7 @@ { pkgs, config, + lib, ... }: { @@ -19,15 +20,113 @@ services.mako.enable = true; programs.niri.settings = { - input.keyboard.xkb.layout = "de"; - outputs."eDP-1" = { scale = 1.0; variable-refresh-rate = true; background-color = "#000000"; }; - layout.gaps = 8; + layout = + let + pink_light = "#d162a4"; + pink_dark = "#a30262"; + blue_light = "#5BCEFA"; + blue_dark = "#4a6bb1"; + gradient-active = { + from = pink_light; + to = blue_light; + angle = 45; + in' = "oklab"; + }; + gradient-inactive = { + from = pink_dark; + to = blue_dark; + angle = 45; + in' = "oklab"; + }; + gradient-urgent = { + from = pink_dark; + to = pink_light; + angle = 45; + in' = "oklab"; + }; + in + { + gaps = 18; + #default-column-display = "tabbed"; + border = { + enable = true; + width = 6; + active.gradient = gradient-active; + inactive.gradient = gradient-inactive; + urgent.gradient = gradient-urgent; + }; + focus-ring = { + enable = true; + active.gradient = gradient-active; + inactive.gradient = gradient-inactive; + urgent.gradient = gradient-urgent; + }; + shadow = { + enable = false; + color = "white"; + inactive-color = pink_dark; + draw-behind-window = true; + spread = 5; + softness = 10; + offset = { + x = 0; + y = 0; + }; + }; + insert-hint = { + enable = true; + display.color = pink_dark; + }; + struts = { + left = 3; + right = 3; + top = 3; + bottom = 3; + }; + tab-indicator = { + place-within-column = true; + active.gradient = gradient-inactive; + inactive.gradient = gradient-inactive; + urgent.gradient = gradient-inactive; + }; + }; + + cursor.theme = "Adwaita"; + + input = { + touchpad.tap = true; + keyboard = { + xkb = { + layout = "de"; + options = "compose:caps"; + }; + numlock = true; + }; + }; + + prefer-no-csd = true; + + window-rules = [ + { + clip-to-geometry = true; + geometry-corner-radius = + let + radius = 4.; + in + { + top-left = radius; + bottom-left = radius; + top-right = radius; + bottom-right = radius; + }; + } + ]; # defaults taken from https://github.com/sodiboo/niri-flake/issues/483 binds = { @@ -46,9 +145,9 @@ "Mod+Shift+Numbersign".action.show-hotkey-overlay = { }; # Suggested binds for running programs: terminal, app launcher, screen locker. - "Mod+T".action.spawn = "alacritty"; + "Mod+T".action.spawn = "${lib.getBin pkgs.gnome-terminal}/bin/gnome-terminal"; "Mod+D".action.spawn = "fuzzel"; - "Super+Alt+L".action.spawn = "${config.programs.swaylock.package}/bin/swaylock"; + "Super+Alt+L".action.spawn = "${lib.getBin config.programs.swaylock.package}/bin/swaylock"; # You can also use a shell. Do this if you need pipes, multiple commands, etc. # Note: the entire command goes as a single argument in the end. @@ -99,19 +198,11 @@ "Mod+Down".action.focus-window-down = { }; "Mod+Up".action.focus-window-up = { }; "Mod+Right".action.focus-column-right = { }; - "Mod+H".action.focus-column-left = { }; - "Mod+J".action.focus-window-down = { }; - "Mod+K".action.focus-window-up = { }; - "Mod+L".action.focus-column-right = { }; "Mod+Ctrl+Left".action.move-column-left = { }; "Mod+Ctrl+Down".action.move-window-down = { }; "Mod+Ctrl+Up".action.move-window-up = { }; "Mod+Ctrl+Right".action.move-column-right = { }; - "Mod+Ctrl+H".action.move-column-left = { }; - "Mod+Ctrl+J".action.move-window-down = { }; - "Mod+Ctrl+K".action.move-window-up = { }; - "Mod+Ctrl+L".action.move-column-right = { }; # Alternative commands that move across workspaces when reaching # the first or last window in a column. @@ -129,19 +220,11 @@ "Mod+Shift+Down".action.focus-monitor-down = { }; "Mod+Shift+Up".action.focus-monitor-up = { }; "Mod+Shift+Right".action.focus-monitor-right = { }; - "Mod+Shift+H".action.focus-monitor-left = { }; - "Mod+Shift+J".action.focus-monitor-down = { }; - "Mod+Shift+K".action.focus-monitor-up = { }; - "Mod+Shift+L".action.focus-monitor-right = { }; "Mod+Shift+Ctrl+Left".action.move-column-to-monitor-left = { }; "Mod+Shift+Ctrl+Down".action.move-column-to-monitor-down = { }; "Mod+Shift+Ctrl+Up".action.move-column-to-monitor-up = { }; "Mod+Shift+Ctrl+Right".action.move-column-to-monitor-right = { }; - "Mod+Shift+Ctrl+H".action.move-column-to-monitor-left = { }; - "Mod+Shift+Ctrl+J".action.move-column-to-monitor-down = { }; - "Mod+Shift+Ctrl+K".action.move-column-to-monitor-up = { }; - "Mod+Shift+Ctrl+L".action.move-column-to-monitor-right = { }; # Alternatively, there are commands to move just a single window: # Mod+Shift+Ctrl+Left { move-window-to-monitor-left; } @@ -292,6 +375,8 @@ # Powers off the monitors. To turn them back on, do any input like # moving the mouse or pressing any other key. "Mod+Shift+P".action.power-off-monitors = { }; + + "Mod+W".action.toggle-column-tabbed-display = { }; }; }; }; diff --git a/homeConfigurations/vinzenz/starship.nix b/homeConfigurations/vinzenz/starship.nix index 480c748..003e022 100644 --- a/homeConfigurations/vinzenz/starship.nix +++ b/homeConfigurations/vinzenz/starship.nix @@ -20,11 +20,11 @@ "color_r" = "#a30262"; "color_g" = "#d162a4"; "color_b" = "#5BCEFA"; - "color_y" = "white"; + "color_y" = "#4a6bb1"; "text_r" = "white"; "text_g" = "black"; "text_b" = "black"; - "text_y" = "black"; + "text_y" = "white"; }; username = { diff --git a/homeConfigurations/vinzenz/swaylock.nix b/homeConfigurations/vinzenz/swaylock.nix index 9255f04..2e298a6 100644 --- a/homeConfigurations/vinzenz/swaylock.nix +++ b/homeConfigurations/vinzenz/swaylock.nix @@ -17,7 +17,7 @@ indicator-radius = 400; show-failed-attempts = true; ignore-empty-password = true; - grace = 2; + grace = 3.5; color = "000000"; indicator-thickness = 20; }; @@ -28,7 +28,7 @@ systemdTarget = "graphical-session.target"; timeouts = [ { - timeout = 30; + timeout = 60; command = "${config.programs.swaylock.package}/bin/swaylock"; } { diff --git a/homeConfigurations/vinzenz/waybar.nix b/homeConfigurations/vinzenz/waybar.nix index af276ac..26112fd 100644 --- a/homeConfigurations/vinzenz/waybar.nix +++ b/homeConfigurations/vinzenz/waybar.nix @@ -1,13 +1,11 @@ { pkgs, device, - config, ... }: { home.packages = with pkgs; [ playerctl - cava ]; programs.waybar = { @@ -36,7 +34,6 @@ modules-right = [ "mpris" "image" - "cava" "gamemode" "temperature" @@ -136,30 +133,6 @@ "" ]; }; - cava = { - framerate = 15; - autosens = 1; - method = "pipewire"; - sleep_timer = 3; - source = "auto"; - bar_delimiter = 0; - bars = 12; - input_delay = 2; - hide_on_silence = true; - format-icons = [ - "" - "" - "" - "" - "" - "" - "" - "" - ]; - actions = { - "on-click-right" = "mode"; - }; - }; disk = { format = "{free}/{total}"; }; diff --git a/nixosModules/niri.nix b/nixosModules/niri.nix deleted file mode 100644 index 42af734..0000000 --- a/nixosModules/niri.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ pkgs, ... }: -{ - programs.niri = { - enable = true; - package = pkgs.niri-stable; - }; -}