From 3f8deb5859daadace55169d4a9e25fb8fc39a970 Mon Sep 17 00:00:00 2001 From: adam Date: Wed, 22 Oct 2025 23:29:57 +0200 Subject: [PATCH 01/17] refact!: switch to niri --- external/config/niri/config.kdl | 207 ++++++++++++++++++++++++++++++ external/zsh/profile.zsh | 2 +- home/modules/packages.nix | 2 - home/modules/programs/default.nix | 1 + home/modules/programs/kitty.nix | 1 + home/modules/programs/swww.nix | 3 + home/modules/programs/waybar.nix | 11 +- modules/base.nix | 23 ++-- 8 files changed, 234 insertions(+), 16 deletions(-) create mode 100644 external/config/niri/config.kdl create mode 100644 home/modules/programs/swww.nix diff --git a/external/config/niri/config.kdl b/external/config/niri/config.kdl new file mode 100644 index 0000000..4d4dd9c --- /dev/null +++ b/external/config/niri/config.kdl @@ -0,0 +1,207 @@ +input { + keyboard { + xkb { + layout "pl" + } + + repeat-delay 180 + repeat-rate 60 + + numlock + } + + // TODO: laptop + touchpad { + off + } + + mouse { + accel-profile "flat" + } + + // Focus windows and outputs automatically when moving the mouse into them. + // Setting max-scroll-amount="0%" makes it work only on windows already fully on screen. + focus-follows-mouse max-scroll-amount="0%" +} + +output "HDMI-A-1" { + mode "1920x1080@60" + scale 1 + transform "normal" + backdrop-color "#11111b" + + // TODO: wait for next release and uncomment + /-hot-corners { + off + } +} + +layout { + gaps 8 + center-focused-column "never" + background-color "transparent" + + focus-ring { + off + } + + border { + width 2 + active-color "#b4befe" + inactive-color "#313244" + urgent-color "#cba6f7" + } +} + +overview { + workspace-shadow { + off + } +} + +spawn-at-startup "swww img ~/.wallpaper.jpg" +spawn-at-startup "waybar" +spawn-at-startup "vesktop" + +prefer-no-csd + +screenshot-path "~/screenshot_%Y-%m-%d_%H-%M-%S.png" + +cursor { + xcursor-theme "catppuccin-mocha-dark-cursors" + xcursor-size 24 +} + +animations { + // Uncomment to turn off all animations. + // off + + // Slow down all animations by this factor. Values below 1 speed them up instead. + // slowdown 3.0 +} + +window-rule { + clip-to-geometry true +} + +window-rule { + match title=r#"^(Picture-in-Picture|Discord Popout)$"# + default-column-width { fixed 800; } + default-window-height { fixed 450; } + default-floating-position x=0 y=0 relative-to="bottom-right" + open-floating true +} + +layer-rule { + match namespace="^wallpaper$" + place-within-backdrop true +} + +layer-rule { + match namespace="rofi" +} + +binds { + Mod+Shift+Slash { show-hotkey-overlay; } + + Mod+Return { spawn "kitty"; } + Mod+Shift+Return { spawn "rofi -show drun"; } + Super+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; } + + Mod+Tab repeat=false { toggle-overview; } + + Mod+Shift+C repeat=false { 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; } + + Mod+Home { focus-column-first; } + Mod+End { focus-column-last; } + Mod+Shift+Home { move-column-to-first; } + Mod+Shift+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+Shift+Page_Down { move-column-to-workspace-down; } + Mod+Shift+Page_Up { move-column-to-workspace-up; } + Mod+Shift+U { move-column-to-workspace-down; } + Mod+Shift+I { move-column-to-workspace-up; } + + 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+Shift+1 { move-column-to-workspace 1; } + Mod+Shift+2 { move-column-to-workspace 2; } + Mod+Shift+3 { move-column-to-workspace 3; } + Mod+Shift+4 { move-column-to-workspace 4; } + Mod+Shift+5 { move-column-to-workspace 5; } + Mod+Shift+6 { move-column-to-workspace 6; } + Mod+Shift+7 { move-column-to-workspace 7; } + Mod+Shift+8 { move-column-to-workspace 8; } + Mod+Shift+9 { move-column-to-workspace 9; } + + Mod+BracketLeft { consume-or-expel-window-left; } + Mod+BracketRight { consume-or-expel-window-right; } + + Mod+R { switch-preset-column-width; } + Mod+F { maximize-column; } + Mod+Shift+F { fullscreen-window; } + + Mod+Ctrl+F { expand-column-to-available-width; } + + Mod+Minus { set-column-width "-10%"; } + Mod+Equal { set-column-width "+10%"; } + + Mod+Shift+Minus { set-window-height "-10%"; } + Mod+Shift+Equal { set-window-height "+10%"; } + + Mod+Space { toggle-window-floating; } + Mod+Shift+Space { switch-focus-between-floating-and-tiling; } + + Print { screenshot; } + Ctrl+Print { screenshot-screen; } + Shift+Print { screenshot-window; } + + Mod+Shift+Q { quit; } +} diff --git a/external/zsh/profile.zsh b/external/zsh/profile.zsh index 4618ff9..902a6da 100644 --- a/external/zsh/profile.zsh +++ b/external/zsh/profile.zsh @@ -1,5 +1,5 @@ if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" = 1 ]; then - exec Hyprland + exec niri-session fi if [ -z "$KITTY_WINDOW_ID" ]; then diff --git a/home/modules/packages.nix b/home/modules/packages.nix index 121acc4..281781b 100644 --- a/home/modules/packages.nix +++ b/home/modules/packages.nix @@ -10,8 +10,6 @@ nerd-fonts.fira-code wl-clipboard - hyprpaper - hyprcursor grim slurp diff --git a/home/modules/programs/default.nix b/home/modules/programs/default.nix index fa5a2e7..9d99ca7 100644 --- a/home/modules/programs/default.nix +++ b/home/modules/programs/default.nix @@ -6,6 +6,7 @@ ./zoxide.nix ./neovim.nix + ./swww.nix ./rofi.nix ./kitty.nix ./dunst.nix diff --git a/home/modules/programs/kitty.nix b/home/modules/programs/kitty.nix index 0f7acae..eccb1fe 100644 --- a/home/modules/programs/kitty.nix +++ b/home/modules/programs/kitty.nix @@ -12,6 +12,7 @@ cursor_trail = 1; cursor_trail_decay = "0.05 0.2"; cursor_trail_start_threshold = 2; + enable_audio_bell = false; }; }; } diff --git a/home/modules/programs/swww.nix b/home/modules/programs/swww.nix new file mode 100644 index 0000000..a0d1a10 --- /dev/null +++ b/home/modules/programs/swww.nix @@ -0,0 +1,3 @@ +{ + services.swww.enable = true; +} diff --git a/home/modules/programs/waybar.nix b/home/modules/programs/waybar.nix index 4340891..6da3d94 100644 --- a/home/modules/programs/waybar.nix +++ b/home/modules/programs/waybar.nix @@ -14,7 +14,10 @@ in position = "top"; width = 1920; - modules-left = [ "hyprland/workspaces" ]; + modules-left = [ + "hyprland/workspaces" + "niri/workspaces" + ]; modules-center = [ "custom/music" ]; modules-right = [ "tray" @@ -23,6 +26,12 @@ in ]; "hyprland/workspaces" = { + disable-scroll = true; + sort-by-name = true; + format = "  "; + }; + + "niri/workspaces" = { disable-scroll = true; sort-by-name = true; format = " {icon} "; diff --git a/modules/base.nix b/modules/base.nix index eb52aea..d3dc941 100644 --- a/modules/base.nix +++ b/modules/base.nix @@ -43,10 +43,20 @@ environment = { localBinInPath = true; - systemPackages = with pkgs; [ htop ]; + systemPackages = with pkgs; [ + xwayland-satellite + htop + ]; }; programs.nano.enable = false; + programs.niri.enable = true; + + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + pinentryPackage = pkgs.pinentry-curses; + }; services.pipewire = { enable = true; @@ -69,17 +79,6 @@ }; }; - programs.gnupg.agent = { - enable = true; - enableSSHSupport = true; - pinentryPackage = pkgs.pinentry-curses; - }; - - programs.hyprland = { - enable = true; - xwayland.enable = true; - }; - nix.settings.experimental-features = [ "nix-command" "flakes" From df64f2485007914feb518818992031f5cadb8ca0 Mon Sep 17 00:00:00 2001 From: adam Date: Wed, 22 Oct 2025 23:51:08 +0200 Subject: [PATCH 02/17] better animations & organization --- external/config/niri/config.kdl | 40 +++++++++++++++++---------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/external/config/niri/config.kdl b/external/config/niri/config.kdl index 4d4dd9c..8893579 100644 --- a/external/config/niri/config.kdl +++ b/external/config/niri/config.kdl @@ -1,3 +1,16 @@ +spawn-at-startup "swww img ~/.wallpaper.jpg" +spawn-at-startup "waybar" +spawn-at-startup "vesktop" + +screenshot-path "~/screenshot_%Y-%m-%d_%H-%M-%S.png" + +prefer-no-csd + +cursor { + xcursor-theme "catppuccin-mocha-dark-cursors" + xcursor-size 24 +} + input { keyboard { xkb { @@ -19,8 +32,6 @@ input { accel-profile "flat" } - // Focus windows and outputs automatically when moving the mouse into them. - // Setting max-scroll-amount="0%" makes it work only on windows already fully on screen. focus-follows-mouse max-scroll-amount="0%" } @@ -59,25 +70,16 @@ overview { } } -spawn-at-startup "swww img ~/.wallpaper.jpg" -spawn-at-startup "waybar" -spawn-at-startup "vesktop" - -prefer-no-csd - -screenshot-path "~/screenshot_%Y-%m-%d_%H-%M-%S.png" - -cursor { - xcursor-theme "catppuccin-mocha-dark-cursors" - xcursor-size 24 -} - animations { - // Uncomment to turn off all animations. - // off + window-open { + duration-ms 400 + curve "cubic-bezier" 0.23 1 0.32 1 + } - // Slow down all animations by this factor. Values below 1 speed them up instead. - // slowdown 3.0 + window-close { + duration-ms 400 + curve "cubic-bezier" 0.23 1 0.32 1 + } } window-rule { From bd4ce185e9da93d278ce7ccb6188590666822294 Mon Sep 17 00:00:00 2001 From: adam Date: Thu, 23 Oct 2025 10:44:56 +0200 Subject: [PATCH 03/17] lil wallpaper fix still not working tho --- external/config/niri/config.kdl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/external/config/niri/config.kdl b/external/config/niri/config.kdl index 8893579..750429b 100644 --- a/external/config/niri/config.kdl +++ b/external/config/niri/config.kdl @@ -39,7 +39,6 @@ output "HDMI-A-1" { mode "1920x1080@60" scale 1 transform "normal" - backdrop-color "#11111b" // TODO: wait for next release and uncomment /-hot-corners { @@ -95,7 +94,7 @@ window-rule { } layer-rule { - match namespace="^wallpaper$" + match namespace="^swww-daemon$" place-within-backdrop true } From 626c75a733ac0417f334b0b1d8ceb766f259b0fb Mon Sep 17 00:00:00 2001 From: adam Date: Thu, 23 Oct 2025 13:08:00 +0200 Subject: [PATCH 04/17] switch to `niri-flake` --- external/config/niri/config.kdl | 208 ---------------------------- flake.lock | 94 +++++++++++++ flake.nix | 8 ++ home/modules/programs/default.nix | 2 + home/modules/programs/niri.nix | 217 ++++++++++++++++++++++++++++++ modules/base.nix | 5 +- 6 files changed, 325 insertions(+), 209 deletions(-) delete mode 100644 external/config/niri/config.kdl create mode 100644 home/modules/programs/niri.nix diff --git a/external/config/niri/config.kdl b/external/config/niri/config.kdl deleted file mode 100644 index 750429b..0000000 --- a/external/config/niri/config.kdl +++ /dev/null @@ -1,208 +0,0 @@ -spawn-at-startup "swww img ~/.wallpaper.jpg" -spawn-at-startup "waybar" -spawn-at-startup "vesktop" - -screenshot-path "~/screenshot_%Y-%m-%d_%H-%M-%S.png" - -prefer-no-csd - -cursor { - xcursor-theme "catppuccin-mocha-dark-cursors" - xcursor-size 24 -} - -input { - keyboard { - xkb { - layout "pl" - } - - repeat-delay 180 - repeat-rate 60 - - numlock - } - - // TODO: laptop - touchpad { - off - } - - mouse { - accel-profile "flat" - } - - focus-follows-mouse max-scroll-amount="0%" -} - -output "HDMI-A-1" { - mode "1920x1080@60" - scale 1 - transform "normal" - - // TODO: wait for next release and uncomment - /-hot-corners { - off - } -} - -layout { - gaps 8 - center-focused-column "never" - background-color "transparent" - - focus-ring { - off - } - - border { - width 2 - active-color "#b4befe" - inactive-color "#313244" - urgent-color "#cba6f7" - } -} - -overview { - workspace-shadow { - off - } -} - -animations { - window-open { - duration-ms 400 - curve "cubic-bezier" 0.23 1 0.32 1 - } - - window-close { - duration-ms 400 - curve "cubic-bezier" 0.23 1 0.32 1 - } -} - -window-rule { - clip-to-geometry true -} - -window-rule { - match title=r#"^(Picture-in-Picture|Discord Popout)$"# - default-column-width { fixed 800; } - default-window-height { fixed 450; } - default-floating-position x=0 y=0 relative-to="bottom-right" - open-floating true -} - -layer-rule { - match namespace="^swww-daemon$" - place-within-backdrop true -} - -layer-rule { - match namespace="rofi" -} - -binds { - Mod+Shift+Slash { show-hotkey-overlay; } - - Mod+Return { spawn "kitty"; } - Mod+Shift+Return { spawn "rofi -show drun"; } - Super+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; } - - Mod+Tab repeat=false { toggle-overview; } - - Mod+Shift+C repeat=false { 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; } - - Mod+Home { focus-column-first; } - Mod+End { focus-column-last; } - Mod+Shift+Home { move-column-to-first; } - Mod+Shift+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+Shift+Page_Down { move-column-to-workspace-down; } - Mod+Shift+Page_Up { move-column-to-workspace-up; } - Mod+Shift+U { move-column-to-workspace-down; } - Mod+Shift+I { move-column-to-workspace-up; } - - 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+Shift+1 { move-column-to-workspace 1; } - Mod+Shift+2 { move-column-to-workspace 2; } - Mod+Shift+3 { move-column-to-workspace 3; } - Mod+Shift+4 { move-column-to-workspace 4; } - Mod+Shift+5 { move-column-to-workspace 5; } - Mod+Shift+6 { move-column-to-workspace 6; } - Mod+Shift+7 { move-column-to-workspace 7; } - Mod+Shift+8 { move-column-to-workspace 8; } - Mod+Shift+9 { move-column-to-workspace 9; } - - Mod+BracketLeft { consume-or-expel-window-left; } - Mod+BracketRight { consume-or-expel-window-right; } - - Mod+R { switch-preset-column-width; } - Mod+F { maximize-column; } - Mod+Shift+F { fullscreen-window; } - - Mod+Ctrl+F { expand-column-to-available-width; } - - Mod+Minus { set-column-width "-10%"; } - Mod+Equal { set-column-width "+10%"; } - - Mod+Shift+Minus { set-window-height "-10%"; } - Mod+Shift+Equal { set-window-height "+10%"; } - - Mod+Space { toggle-window-floating; } - Mod+Shift+Space { switch-focus-between-floating-and-tiling; } - - Print { screenshot; } - Ctrl+Print { screenshot-screen; } - Shift+Print { screenshot-window; } - - Mod+Shift+Q { quit; } -} diff --git a/flake.lock b/flake.lock index 0141d05..3fc85f9 100644 --- a/flake.lock +++ b/flake.lock @@ -131,6 +131,66 @@ "type": "github" } }, + "niri": { + "inputs": { + "niri-stable": "niri-stable", + "niri-unstable": "niri-unstable", + "nixpkgs": [ + "nixpkgs-unstable" + ], + "nixpkgs-stable": [ + "nixpkgs" + ], + "xwayland-satellite-stable": "xwayland-satellite-stable", + "xwayland-satellite-unstable": "xwayland-satellite-unstable" + }, + "locked": { + "lastModified": 1761542689, + "narHash": "sha256-l4TQRcQyp6hoUVQL/R4UBHvYX9whHTntaz5NxHi0PH4=", + "owner": "sodiboo", + "repo": "niri-flake", + "rev": "75768e54ca2591bb0be17fa310992628e5efce2d", + "type": "github" + }, + "original": { + "owner": "sodiboo", + "repo": "niri-flake", + "type": "github" + } + }, + "niri-stable": { + "flake": false, + "locked": { + "lastModified": 1756556321, + "narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "ref": "v25.08", + "repo": "niri", + "type": "github" + } + }, + "niri-unstable": { + "flake": false, + "locked": { + "lastModified": 1761460429, + "narHash": "sha256-pJeM23DGMD5AK4gdNaDM1qsIv87NYQJgEh2E8tRd7es=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "e6f3c538da0c646bda43fcde7ef7dc3b771e0c8b", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "repo": "niri", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1736320768, @@ -183,6 +243,7 @@ "anvim": "anvim", "home-manager": "home-manager", "iamb": "iamb", + "niri": "niri", "nixpkgs": "nixpkgs_2", "nixpkgs-unstable": "nixpkgs-unstable", "spicetify-nix": "spicetify-nix", @@ -259,6 +320,39 @@ "repo": "default", "type": "github" } + }, + "xwayland-satellite-stable": { + "flake": false, + "locked": { + "lastModified": 1755491097, + "narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "388d291e82ffbc73be18169d39470f340707edaa", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "ref": "v0.7", + "repo": "xwayland-satellite", + "type": "github" + } + }, + "xwayland-satellite-unstable": { + "flake": false, + "locked": { + "lastModified": 1761422250, + "narHash": "sha256-+pN8VAh8OVUSj8zPoI8QfC93JMIKPaAOABrbeeiO/Hk=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "2dd40ecfe882c1659e0e46c761974702c7ab5fde", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 11b8a48..5e95e96 100644 --- a/flake.nix +++ b/flake.nix @@ -16,6 +16,12 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + niri = { + url = "github:sodiboo/niri-flake"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + inputs.nixpkgs-stable.follows = "nixpkgs"; + }; + iamb = { url = "github:ulyssa/iamb/v0.0.11-alpha.1"; inputs.nixpkgs.follows = "nixpkgs"; @@ -40,6 +46,7 @@ self, nixpkgs, home-manager, + niri, ... }@inputs: let @@ -55,6 +62,7 @@ ./modules/base.nix ./systems/${name} home-manager.nixosModules.home-manager + niri.nixosModules.niri ./modules/home.nix ]; }; diff --git a/home/modules/programs/default.nix b/home/modules/programs/default.nix index 9d99ca7..34beb2e 100644 --- a/home/modules/programs/default.nix +++ b/home/modules/programs/default.nix @@ -6,6 +6,8 @@ ./zoxide.nix ./neovim.nix + ./niri.nix + ./swww.nix ./rofi.nix ./kitty.nix diff --git a/home/modules/programs/niri.nix b/home/modules/programs/niri.nix new file mode 100644 index 0000000..0b4b1fb --- /dev/null +++ b/home/modules/programs/niri.nix @@ -0,0 +1,217 @@ +{ config, ... }: + +{ + programs.niri.settings = { + spawn-at-startup = [ + { argv = [ "swww img ~/.wallpaper.jpg" ]; } + { argv = [ "waybar" ]; } + ]; + + screenshot-path = "~/screenshots/%Y-%m-%d_%H-%M-%S.png"; + prefer-no-csd = true; + + cursor = { + theme = "catppuccin-mocha-dark-cursors"; + size = 24; + }; + + input = { + keyboard = { + xkb.layout = "pl"; + repeat-delay = 180; + repeat-rate = 60; + numlock = true; + }; + + mouse.accel-profile = "flat"; + + # TODO: laptop touchpad + + focus-follows-mouse = { + enable = true; + max-scroll-amount = "0%"; + }; + }; + + outputs.HDMI-A-1 = { + scale = 1; + mode = { + width = 1920; + height = 1080; + refresh = 60.0; + }; + + # TODO: uncomment on next niri release + # hot-corners.enable = false; + }; + + layout = { + gaps = 8; + center-focused-column = "never"; + background-color = "transparent"; + + focus-ring.enable = false; + border = { + enable = true; + width = 2; + active.color = "#b4befe"; + inactive.color = "#313244"; + urgent.color = "#cba6f7"; + }; + }; + + animations = { + window-open.kind.easing = { + duration-ms = 400; + curve = "cubic-bezier"; + curve-args = [ + 0.23 + 1 + 0.32 + 1 + ]; + }; + + window-close.kind.easing = { + duration-ms = 400; + curve = "cubic-bezier"; + curve-args = [ + 0.23 + 1 + 0.32 + 1 + ]; + }; + }; + + window-rules = [ + { + clip-to-geometry = true; + } + { + matches = [ { app-id = "^Rofi$"; } ]; + open-floating = true; + } + { + matches = [ { title = "^(Picture-in-Picture|Discord Popout)$"; } ]; + default-column-width.fixed = 800; + default-window-height.fixed = 450; + open-floating = true; + default-floating-position = { + x = 0; + y = 0; + relative-to = "bottom-right"; + }; + } + ]; + + layer-rules = [ + { + matches = [ { namespace = "^swww-daemon$"; } ]; + place-within-backdrop = true; + } + ]; + + binds = with config.lib.niri.actions; { + "Mod+Shift+Slash".action = show-hotkey-overlay; + + "Mod+Return".action = spawn "kitty"; + "Mod+Shift+Return".action.spawn = [ + "rofi" + "-show" + "drun" + ]; + + "Mod+Tab".action = toggle-overview; + "Mod+Shift+C".action = close-window; + + "Mod+Home".action = focus-column-first; + "Mod+End".action = focus-column-last; + "Mod+Shift+Home".action = move-column-to-first; + "Mod+Shift+End".action = move-column-to-last; + + # TODO: make a loop for these + "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+Left".action = focus-column-left; + "Mod+Down".action = focus-window-down; + "Mod+Up".action = focus-window-up; + "Mod+Right".action = focus-column-right; + + "Mod+Shift+H".action = move-column-left; + "Mod+Shift+J".action = move-window-down; + "Mod+Shift+K".action = move-window-up; + "Mod+Shift+L".action = move-column-right; + "Mod+Shift+Left".action = move-column-left; + "Mod+Shift+Down".action = move-window-down; + "Mod+Shift+Up".action = move-window-up; + "Mod+Shift+Right".action = move-column-right; + + "Mod+Ctrl+H".action = focus-monitor-left; + "Mod+Ctrl+J".action = focus-monitor-down; + "Mod+Ctrl+K".action = focus-monitor-up; + "Mod+Ctrl+L".action = focus-monitor-right; + "Mod+Ctrl+Left".action = focus-monitor-left; + "Mod+Ctrl+Right".action = focus-monitor-right; + "Mod+Ctrl+Up".action = focus-monitor-up; + "Mod+Ctrl+Down".action = focus-monitor-down; + + "Mod+I".action = focus-workspace-up; + "Mod+U".action = focus-workspace-down; + "Mod+Page_Up".action = focus-workspace-up; + "Mod+Page_Down".action = focus-workspace-down; + + "Mod+Shift+I".action = move-column-to-workspace-up; + "Mod+Shift+U".action = move-column-to-workspace-down; + "Mod+Shift+Page_Up".action = move-column-to-workspace-up; + "Mod+Shift+Page_Down".action = move-column-to-workspace-down; + + # TODO: make a loop for these + "Mod+1".action = focus-workspace 1; + "Mod+2".action = focus-workspace 2; + "Mod+3".action = focus-workspace 3; + "Mod+4".action = focus-workspace 4; + "Mod+5".action = focus-workspace 5; + "Mod+6".action = focus-workspace 6; + "Mod+7".action = focus-workspace 7; + "Mod+8".action = focus-workspace 8; + "Mod+9".action = focus-workspace 9; + + # the flake doesnt implement this (yet?) + # "Mod+Shift+1".action = move-column-to-workspace 1; + # "Mod+Shift+2".action = move-column-to-workspace 2; + # "Mod+Shift+3".action = move-column-to-workspace 3; + # "Mod+Shift+4".action = move-column-to-workspace 4; + # "Mod+Shift+5".action = move-column-to-workspace 5; + # "Mod+Shift+6".action = move-column-to-workspace 6; + # "Mod+Shift+7".action = move-column-to-workspace 7; + # "Mod+Shift+8".action = move-column-to-workspace 8; + # "Mod+Shift+9".action = move-column-to-workspace 9; + + "Mod+BracketLeft".action = consume-or-expel-window-left; + "Mod+BracketRight".action = consume-or-expel-window-right; + + "Mod+F".action = maximize-column; + "Mod+Shift+F".action = fullscreen-window; + "Mod+Ctrl+F".action = expand-column-to-available-width; + "Mod+R".action = switch-preset-column-width; + + "Mod+Minus".action = set-column-width "-10%"; + "Mod+Equal".action = set-column-width "+10%"; + "Mod+Shift+Minus".action = set-window-height "-10%"; + "Mod+Shift+Equal".action = set-window-height "+10%"; + + "Mod+Space".action = toggle-window-floating; + "Mod+Shift+Space".action = switch-focus-between-floating-and-tiling; + + # "Print".action = screenshot; + # "Shift+Print".action = screenshot-window; + # this doesnt work for some reason? + # "Ctrl+Print".action = screenshot-screen; + + "Mod+Shift+Q".action = quit; + }; + }; +} diff --git a/modules/base.nix b/modules/base.nix index d3dc941..f4d8310 100644 --- a/modules/base.nix +++ b/modules/base.nix @@ -37,21 +37,24 @@ system = prev.stdenv.hostPlatform.system; config = prev.config; }; + niri = inputs.niri.overlays.niri; }) ]; }; environment = { localBinInPath = true; + variables.NIXOS_OZONE_WL = "1"; systemPackages = with pkgs; [ xwayland-satellite htop ]; }; - programs.nano.enable = false; programs.niri.enable = true; + programs.nano.enable = false; + programs.gnupg.agent = { enable = true; enableSSHSupport = true; From 747c46cc9c1defcc98f12cb5ba5f78f80a0ee31c Mon Sep 17 00:00:00 2001 From: adam Date: Thu, 23 Oct 2025 13:56:55 +0200 Subject: [PATCH 05/17] bring back hyprland for now --- home/modules/programs/niri.nix | 7 +++++++ modules/base.nix | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/home/modules/programs/niri.nix b/home/modules/programs/niri.nix index 0b4b1fb..874284f 100644 --- a/home/modules/programs/niri.nix +++ b/home/modules/programs/niri.nix @@ -1,6 +1,13 @@ { config, ... }: { + home.sessionVariables = { + XDG_BACKEND = "wayland"; + NIXOS_OZONE_WL = "1"; + LIBVA_DRIVER_NAME = "nvidia"; + __GLX_VENDOR_LIBRARY_NAME = "nvidia"; + }; + programs.niri.settings = { spawn-at-startup = [ { argv = [ "swww img ~/.wallpaper.jpg" ]; } diff --git a/modules/base.nix b/modules/base.nix index f4d8310..6a18834 100644 --- a/modules/base.nix +++ b/modules/base.nix @@ -44,7 +44,6 @@ environment = { localBinInPath = true; - variables.NIXOS_OZONE_WL = "1"; systemPackages = with pkgs; [ xwayland-satellite htop @@ -53,6 +52,11 @@ programs.niri.enable = true; + programs.hyprland = { + enable = true; + xwayland.enable = true; + }; + programs.nano.enable = false; programs.gnupg.agent = { From cf765006f24e2af7b4c28bd3a7fff19c6a2a7eb3 Mon Sep 17 00:00:00 2001 From: adam Date: Thu, 23 Oct 2025 19:25:10 +0200 Subject: [PATCH 06/17] stuff --- home/modules/programs/niri.nix | 32 +++++++++++++++++++++++++++ home/modules/programs/waybar.nix | 37 +++++++++++++++++++++++++++----- 2 files changed, 64 insertions(+), 5 deletions(-) diff --git a/home/modules/programs/niri.nix b/home/modules/programs/niri.nix index 874284f..82a90d0 100644 --- a/home/modules/programs/niri.nix +++ b/home/modules/programs/niri.nix @@ -12,6 +12,8 @@ spawn-at-startup = [ { argv = [ "swww img ~/.wallpaper.jpg" ]; } { argv = [ "waybar" ]; } + { argv = [ "vesktop" ]; } + { sh = "sleep 10s; spotify"; } # delayed to let vesktop start first ]; screenshot-path = "~/screenshots/%Y-%m-%d_%H-%M-%S.png"; @@ -57,6 +59,8 @@ center-focused-column = "never"; background-color = "transparent"; + default-column-width.proportion = 0.5; + focus-ring.enable = false; border = { enable = true; @@ -68,6 +72,8 @@ }; animations = { + # TODO: better workspace switching when its 1 to 10 for example + window-open.kind.easing = { duration-ms = 400; curve = "cubic-bezier"; @@ -91,6 +97,19 @@ }; }; + workspaces = { + "1" = { }; + "2" = { }; + "3" = { }; + "4" = { }; + "5" = { }; + "6" = { }; + "7" = { }; + "8" = { }; + "9" = { }; + "social" = { }; + }; + window-rules = [ { clip-to-geometry = true; @@ -98,6 +117,17 @@ { matches = [ { app-id = "^Rofi$"; } ]; open-floating = true; + open-focused = true; + } + { + matches = [ { app-id = "^vesktop$"; } ]; + open-on-workspace = "social"; + default-column-width.proportion = 0.56; + } + { + matches = [ { app-id = "^spotify$"; } ]; + open-on-workspace = "social"; + default-column-width.proportion = 0.44; } { matches = [ { title = "^(Picture-in-Picture|Discord Popout)$"; } ]; @@ -185,6 +215,7 @@ "Mod+7".action = focus-workspace 7; "Mod+8".action = focus-workspace 8; "Mod+9".action = focus-workspace 9; + "Mod+0".action = focus-workspace "social"; # the flake doesnt implement this (yet?) # "Mod+Shift+1".action = move-column-to-workspace 1; @@ -196,6 +227,7 @@ # "Mod+Shift+7".action = move-column-to-workspace 7; # "Mod+Shift+8".action = move-column-to-workspace 8; # "Mod+Shift+9".action = move-column-to-workspace 9; + # "Mod+Shift+0".action = move-column-to-workspace "social"; "Mod+BracketLeft".action = consume-or-expel-window-left; "Mod+BracketRight".action = consume-or-expel-window-right; diff --git a/home/modules/programs/waybar.nix b/home/modules/programs/waybar.nix index 6da3d94..4fa5fda 100644 --- a/home/modules/programs/waybar.nix +++ b/home/modules/programs/waybar.nix @@ -28,17 +28,35 @@ in "hyprland/workspaces" = { disable-scroll = true; sort-by-name = true; - format = "  "; + format = " {icon} "; + format-icons = { + "default" = ""; + "9" = "󰓇"; + "10" = ""; + }; }; "niri/workspaces" = { disable-scroll = true; sort-by-name = true; - format = " {icon} "; + persistent-only = true; + persistent-workspaces = { + "1" = [ ]; + "2" = [ ]; + "3" = [ ]; + "4" = [ ]; + "5" = [ ]; + "6" = [ ]; + "7" = [ ]; + "8" = [ ]; + "9" = [ ]; + "10" = [ ]; + }; + format = "{icon}"; format-icons = { - "default" = ""; - "9" = "󰓇"; - "10" = ""; + "default" = "  "; + "social" = "  "; + "11" = ""; }; }; @@ -114,6 +132,15 @@ in color: @lavender; } + #workspaces button#niri-workspace-11 { + font-size: 0px; + border: none; + padding: 0px; + margin: 0px; + min-width: 0px; + min-height: 0px; + } + #workspaces button.active { color: @mauve; } From 9870dc6383408f9c484d56481158416775a22535 Mon Sep 17 00:00:00 2001 From: adam Date: Fri, 24 Oct 2025 19:38:25 +0200 Subject: [PATCH 07/17] 4 workspaces --- home/modules/programs/niri.nix | 22 ++-------------------- home/modules/programs/waybar.nix | 10 ++-------- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/home/modules/programs/niri.nix b/home/modules/programs/niri.nix index 82a90d0..aea5670 100644 --- a/home/modules/programs/niri.nix +++ b/home/modules/programs/niri.nix @@ -72,8 +72,6 @@ }; animations = { - # TODO: better workspace switching when its 1 to 10 for example - window-open.kind.easing = { duration-ms = 400; curve = "cubic-bezier"; @@ -101,12 +99,6 @@ "1" = { }; "2" = { }; "3" = { }; - "4" = { }; - "5" = { }; - "6" = { }; - "7" = { }; - "8" = { }; - "9" = { }; "social" = { }; }; @@ -209,24 +201,14 @@ "Mod+1".action = focus-workspace 1; "Mod+2".action = focus-workspace 2; "Mod+3".action = focus-workspace 3; - "Mod+4".action = focus-workspace 4; - "Mod+5".action = focus-workspace 5; - "Mod+6".action = focus-workspace 6; - "Mod+7".action = focus-workspace 7; - "Mod+8".action = focus-workspace 8; - "Mod+9".action = focus-workspace 9; + "Mod+4".action = focus-workspace "social"; "Mod+0".action = focus-workspace "social"; # the flake doesnt implement this (yet?) # "Mod+Shift+1".action = move-column-to-workspace 1; # "Mod+Shift+2".action = move-column-to-workspace 2; # "Mod+Shift+3".action = move-column-to-workspace 3; - # "Mod+Shift+4".action = move-column-to-workspace 4; - # "Mod+Shift+5".action = move-column-to-workspace 5; - # "Mod+Shift+6".action = move-column-to-workspace 6; - # "Mod+Shift+7".action = move-column-to-workspace 7; - # "Mod+Shift+8".action = move-column-to-workspace 8; - # "Mod+Shift+9".action = move-column-to-workspace 9; + # "Mod+Shift+4".action = move-column-to-workspace "social"; # "Mod+Shift+0".action = move-column-to-workspace "social"; "Mod+BracketLeft".action = consume-or-expel-window-left; diff --git a/home/modules/programs/waybar.nix b/home/modules/programs/waybar.nix index 4fa5fda..112b6e8 100644 --- a/home/modules/programs/waybar.nix +++ b/home/modules/programs/waybar.nix @@ -45,18 +45,12 @@ in "2" = [ ]; "3" = [ ]; "4" = [ ]; - "5" = [ ]; - "6" = [ ]; - "7" = [ ]; - "8" = [ ]; - "9" = [ ]; - "10" = [ ]; }; format = "{icon}"; format-icons = { "default" = "  "; "social" = "  "; - "11" = ""; + "5" = ""; }; }; @@ -132,7 +126,7 @@ in color: @lavender; } - #workspaces button#niri-workspace-11 { + #workspaces button#niri-workspace-5 { font-size: 0px; border: none; padding: 0px; From 9213ba01e13a30a56fe4bb268e9fe73288333c63 Mon Sep 17 00:00:00 2001 From: adam Date: Mon, 27 Oct 2025 14:59:27 +0100 Subject: [PATCH 08/17] xdg stuffs --- home/modules/programs/niri.nix | 2 ++ home/modules/xdg.nix | 32 +++++++++++++++++++++++++++----- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/home/modules/programs/niri.nix b/home/modules/programs/niri.nix index aea5670..7d09595 100644 --- a/home/modules/programs/niri.nix +++ b/home/modules/programs/niri.nix @@ -1,6 +1,8 @@ { config, ... }: { + services.gnome-keyring.enable = false; + home.sessionVariables = { XDG_BACKEND = "wayland"; NIXOS_OZONE_WL = "1"; diff --git a/home/modules/xdg.nix b/home/modules/xdg.nix index d9beb8a..3a3a286 100644 --- a/home/modules/xdg.nix +++ b/home/modules/xdg.nix @@ -1,11 +1,33 @@ +{ pkgs, ... }: + let configs = ../../external/config; in { - xdg.mimeApps.enable = true; + xdg = { + mimeApps.enable = true; + + configFile = builtins.mapAttrs (name: _: { + source = configs + "/${name}"; + recursive = true; + }) (builtins.readDir configs); + + portal = { + enable = true; + extraPortals = with pkgs; [ + xdg-desktop-portal-gtk + xdg-desktop-portal-gnome + ]; + + config.common = { + default = [ + "gtk" + "gnome" + ]; - xdg.configFile = builtins.mapAttrs (name: _: { - source = configs + "/${name}"; - recursive = true; - }) (builtins.readDir configs); + "org.freedesktop.impl.portal.Access" = [ "gtk" ]; + "org.freedesktop.impl.portal.Notification" = [ "gtk" ]; + }; + }; + }; } From c8a3eb9e6cd95d7c8d78f9d207c46e2274a5f8b4 Mon Sep 17 00:00:00 2001 From: adam Date: Thu, 30 Oct 2025 13:04:26 +0100 Subject: [PATCH 09/17] better window rules --- home/modules/programs/niri.nix | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/home/modules/programs/niri.nix b/home/modules/programs/niri.nix index 7d09595..0c23dac 100644 --- a/home/modules/programs/niri.nix +++ b/home/modules/programs/niri.nix @@ -109,22 +109,22 @@ clip-to-geometry = true; } { - matches = [ { app-id = "^Rofi$"; } ]; + matches = [ { app-id = "^Rofi"; } ]; open-floating = true; open-focused = true; } { - matches = [ { app-id = "^vesktop$"; } ]; + matches = [ { app-id = "^vesktop"; } ]; open-on-workspace = "social"; default-column-width.proportion = 0.56; } { - matches = [ { app-id = "^spotify$"; } ]; + matches = [ { app-id = "^spotify"; } ]; open-on-workspace = "social"; default-column-width.proportion = 0.44; } { - matches = [ { title = "^(Picture-in-Picture|Discord Popout)$"; } ]; + matches = [ { title = "^(Picture-in-Picture|Discord Popout)"; } ]; default-column-width.fixed = 800; default-window-height.fixed = 450; open-floating = true; @@ -134,11 +134,20 @@ relative-to = "bottom-right"; }; } + { + matches = [ { title = "^notificationtoast.*"; } ]; + open-floating = true; + default-floating-position = { + x = 0; + y = 0; + relative-to = "bottom-right"; + }; + } ]; layer-rules = [ { - matches = [ { namespace = "^swww-daemon$"; } ]; + matches = [ { namespace = "^swww-daemon"; } ]; place-within-backdrop = true; } ]; From 96d6766ad3654b9098b8b5c48993039e54e68438 Mon Sep 17 00:00:00 2001 From: adam Date: Mon, 3 Nov 2025 17:40:39 +0100 Subject: [PATCH 10/17] mhm --- home/modules/programs/niri.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/home/modules/programs/niri.nix b/home/modules/programs/niri.nix index 0c23dac..faba11e 100644 --- a/home/modules/programs/niri.nix +++ b/home/modules/programs/niri.nix @@ -124,7 +124,12 @@ default-column-width.proportion = 0.44; } { - matches = [ { title = "^(Picture-in-Picture|Discord Popout)"; } ]; + matches = [ { app-id = "^steam"; } ]; + open-on-workspace = "3"; + default-column-width.proportion = 0.6; + } + { + matches = [ { title = "^(Picture in picture|Picture-in-Picture|Discord Popout)"; } ]; default-column-width.fixed = 800; default-window-height.fixed = 450; open-floating = true; From 5cdd46aa02f718a3d8a040ff503e7f51b5f5a349 Mon Sep 17 00:00:00 2001 From: adam Date: Tue, 4 Nov 2025 23:26:38 +0100 Subject: [PATCH 11/17] stuffs --- home/modules/programs/iamb.nix | 1 + modules/base.nix | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/home/modules/programs/iamb.nix b/home/modules/programs/iamb.nix index ea41f0b..3ce4b7f 100644 --- a/home/modules/programs/iamb.nix +++ b/home/modules/programs/iamb.nix @@ -7,6 +7,7 @@ settings = { profiles.user.user_id = "@xx0a_q:matrix.org"; + dirs.downloads = "/tmp/downloads"; settings = { username_display = "displayname"; notifications.enabled = true; diff --git a/modules/base.nix b/modules/base.nix index 6a18834..6aac729 100644 --- a/modules/base.nix +++ b/modules/base.nix @@ -1,9 +1,16 @@ { pkgs, inputs, ... }: { - boot.loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; + boot = { + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + kernelParams = [ + "vt.default_red=30,243,166,249,137,245,148,186,88,243,166,249,137,245,148,166" + "vt.default_grn=30,139,227,226,180,194,226,194,91,139,227,226,180,194,226,173" + "vt.default_blu=46,168,161,175,250,231,213,222,112,168,161,175,250,231,213,200" + ]; }; networking = { From a55ea79c3e443428a49359eea92267457dbe9cda Mon Sep 17 00:00:00 2001 From: adam Date: Wed, 5 Nov 2025 19:13:04 +0100 Subject: [PATCH 12/17] updat --- flake.lock | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/flake.lock b/flake.lock index 3fc85f9..c1fa2b6 100644 --- a/flake.lock +++ b/flake.lock @@ -14,11 +14,11 @@ ] }, "locked": { - "lastModified": 1760836749, - "narHash": "sha256-wyT7Pl6tMFbFrs8Lk/TlEs81N6L+VSybPfiIgzU8lbQ=", + "lastModified": 1761656077, + "narHash": "sha256-lsNWuj4Z+pE7s0bd2OKicOFq9bK86JE0ZGeKJbNqb94=", "owner": "ryantm", "repo": "agenix", - "rev": "2f0f812f69f3eb4140157fe15e12739adf82e32a", + "rev": "9ba0d85de3eaa7afeab493fed622008b6e4924f5", "type": "github" }, "original": { @@ -145,11 +145,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1761542689, - "narHash": "sha256-l4TQRcQyp6hoUVQL/R4UBHvYX9whHTntaz5NxHi0PH4=", + "lastModified": 1762341801, + "narHash": "sha256-zx7UxreMz646qikxw+So7eGRQeWccKFZxuMvJowJuFs=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "75768e54ca2591bb0be17fa310992628e5efce2d", + "rev": "20aadad64b8b8cbebc71371713c141d91d7f8172", "type": "github" }, "original": { @@ -178,11 +178,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1761460429, - "narHash": "sha256-pJeM23DGMD5AK4gdNaDM1qsIv87NYQJgEh2E8tRd7es=", + "lastModified": 1762146685, + "narHash": "sha256-anRlNG6t7esBbF1+ALDeathVBSclA0PEL52Vo0WnN5g=", "owner": "YaLTeR", "repo": "niri", - "rev": "e6f3c538da0c646bda43fcde7ef7dc3b771e0c8b", + "rev": "a2ca2b3c866bc781b12c334a9f949b3db6d7c943", "type": "github" }, "original": { @@ -209,11 +209,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1761373498, - "narHash": "sha256-Q/uhWNvd7V7k1H1ZPMy/vkx3F8C13ZcdrKjO7Jv7v0c=", + "lastModified": 1762111121, + "narHash": "sha256-4vhDuZ7OZaZmKKrnDpxLZZpGIJvAeMtK6FKLJYUtAdw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6a08e6bb4e46ff7fcbb53d409b253f6bad8a28ce", + "rev": "b3d51a0365f6695e7dd5cdf3e180604530ed33b4", "type": "github" }, "original": { @@ -224,11 +224,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1761468971, - "narHash": "sha256-vY2OLVg5ZTobdroQKQQSipSIkHlxOTrIF1fsMzPh8w8=", + "lastModified": 1762233356, + "narHash": "sha256-cGS3lLTYusbEP/IJIWGgnkzIl+FA5xDvtiHyjalGr4k=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "78e34d1667d32d8a0ffc3eba4591ff256e80576e", + "rev": "ca534a76c4afb2bdc07b681dbc11b453bab21af8", "type": "github" }, "original": { @@ -278,11 +278,11 @@ ] }, "locked": { - "lastModified": 1761452941, - "narHash": "sha256-yy+9lSj40cWS4awLqjQ5H5/7/SOf9ZarOgTzH8GHkRk=", + "lastModified": 1762057664, + "narHash": "sha256-mdEEvepIi8ebpGP1WWOHNvNQyd8rF0mUrKAiU6mwHCk=", "owner": "Gerg-L", "repo": "spicetify-nix", - "rev": "20a56cfc4dc794ade2e8d4346cc4a5adcd1bb512", + "rev": "4aa6e43d29e3c8acf544aa6782a1963a11369208", "type": "github" }, "original": { @@ -341,11 +341,11 @@ "xwayland-satellite-unstable": { "flake": false, "locked": { - "lastModified": 1761422250, - "narHash": "sha256-+pN8VAh8OVUSj8zPoI8QfC93JMIKPaAOABrbeeiO/Hk=", + "lastModified": 1762302024, + "narHash": "sha256-F+4W0J5r7fbEl+VmATFqAA5+4dFSNAmLJB7tAtrTIkY=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "2dd40ecfe882c1659e0e46c761974702c7ab5fde", + "rev": "53b6072bd995b5b4017999cf247f9eb6660c72a2", "type": "github" }, "original": { From 4165a2d29690556fe30cefe899963bd584c4618e Mon Sep 17 00:00:00 2001 From: adam Date: Sun, 9 Nov 2025 21:14:30 +0100 Subject: [PATCH 13/17] colemak --- .gitignore | 1 + home/modules/packages.nix | 1 + home/modules/programs/iamb.nix | 2 +- home/modules/programs/niri.nix | 32 +++++++++++++++++++++++--------- home/modules/programs/zsh.nix | 2 ++ modules/base.nix | 2 +- systems/desktop/default.nix | 8 ++++++-- systems/laptop/default.nix | 6 +++++- 8 files changed, 40 insertions(+), 14 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1797b10 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +**/*.bak diff --git a/home/modules/packages.nix b/home/modules/packages.nix index 281781b..d69c0d1 100644 --- a/home/modules/packages.nix +++ b/home/modules/packages.nix @@ -13,6 +13,7 @@ grim slurp + cloudflared unstable.kitget ]; } diff --git a/home/modules/programs/iamb.nix b/home/modules/programs/iamb.nix index 3ce4b7f..bfa49b9 100644 --- a/home/modules/programs/iamb.nix +++ b/home/modules/programs/iamb.nix @@ -6,7 +6,7 @@ package = iamb.packages.${pkgs.stdenv.system}.default; settings = { - profiles.user.user_id = "@xx0a_q:matrix.org"; + profiles.user.user_id = "@adam:matrix.system72.dev"; dirs.downloads = "/tmp/downloads"; settings = { username_display = "displayname"; diff --git a/home/modules/programs/niri.nix b/home/modules/programs/niri.nix index faba11e..ec70d9c 100644 --- a/home/modules/programs/niri.nix +++ b/home/modules/programs/niri.nix @@ -28,7 +28,7 @@ input = { keyboard = { - xkb.layout = "pl"; + # xkb.layout = "pl"; repeat-delay = 180; repeat-rate = 60; numlock = true; @@ -44,16 +44,30 @@ }; }; - outputs.HDMI-A-1 = { - scale = 1; - mode = { - width = 1920; - height = 1080; - refresh = 60.0; + outputs = { + HDMI-A-1 = { + scale = 1; + mode = { + width = 1920; + height = 1080; + refresh = 60.0; + }; + + # TODO: uncomment on next niri release + # hot-corners.enable = false; }; - # TODO: uncomment on next niri release - # hot-corners.enable = false; + eDP-1 = { + scale = 1; + mode = { + width = 1920; + height = 1080; + refresh = 60.0; + }; + + # TODO: uncomment on next niri release + # hot-corners.enable = false; + }; }; layout = { diff --git a/home/modules/programs/zsh.nix b/home/modules/programs/zsh.nix index 4105084..c5eb092 100644 --- a/home/modules/programs/zsh.nix +++ b/home/modules/programs/zsh.nix @@ -27,6 +27,8 @@ nv = "nvim"; shred = "shred -uvz"; + car = "cat"; + nixrs = "sudo nixos-rebuild switch --flake ~/dotfiles\\#$(hostname)"; diff = "diff --color=auto"; diff --git a/modules/base.nix b/modules/base.nix index 6aac729..ec594ab 100644 --- a/modules/base.nix +++ b/modules/base.nix @@ -20,7 +20,7 @@ console = { font = "Lat2-Terminus16"; - useXkbConfig = false; + useXkbConfig = true; }; users.users.adam = { diff --git a/systems/desktop/default.nix b/systems/desktop/default.nix index e593333..29d5948 100644 --- a/systems/desktop/default.nix +++ b/systems/desktop/default.nix @@ -9,10 +9,14 @@ time.timeZone = "Europe/Warsaw"; i18n.defaultLocale = "en_US.UTF-8"; - console.keyMap = "pl"; hardware.graphics.enable = true; - services.xserver.videoDrivers = [ "nvidia" ]; + + services.xserver = { + xkb.layout = "us"; + xkbVariant = "colemak"; + videoDrivers = [ "nvidia" ]; + }; hardware.nvidia = { modesetting.enable = true; diff --git a/systems/laptop/default.nix b/systems/laptop/default.nix index fc5f052..66ed226 100644 --- a/systems/laptop/default.nix +++ b/systems/laptop/default.nix @@ -7,5 +7,9 @@ time.timeZone = "Europe/Warsaw"; i18n.defaultLocale = "en_US.UTF-8"; - console.keyMap = "pl"; + + services.xserver = { + xkb.layout = "us"; + xkbVariant = "colemak"; + }; } From 085fe22ca5b5c4e83f9657ce6dab784e7a5a4f2a Mon Sep 17 00:00:00 2001 From: Adam Perkowski Date: Sun, 9 Nov 2025 23:28:39 +0100 Subject: [PATCH 14/17] car --- external/zsh/prompt.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/zsh/prompt.zsh b/external/zsh/prompt.zsh index dcd25c4..6b7ecbe 100644 --- a/external/zsh/prompt.zsh +++ b/external/zsh/prompt.zsh @@ -38,7 +38,7 @@ function precmd() { local baseprompt="${reset}${dim}%n${reset}${accent}@${reset}${dim}%m${reset}:${accent}%l${reset} ${dim}->${reset} ${cwd} ${dim}(${reset}%?${dim})${reset}${newline}" - if [[ "$last_command" == 'cat' || "$last_command" == 'head' || "$last_command" == 'tail' || "$last_command" == 'tac' || "$last_command" == 'nc' || "$last_command" == 'ncat' || "$last_command" == 'netcat' || "$last_command" == 'kitget' ]]; then + if [[ "$last_command" == 'car' || "$last_command" == 'cat' || "$last_command" == 'head' || "$last_command" == 'tail' || "$last_command" == 'tac' || "$last_command" == 'nc' || "$last_command" == 'ncat' || "$last_command" == 'netcat' || "$last_command" == 'kitget' ]]; then baseprompt+='😻' elif [[ "$last_command" == 'sudo' ]]; then baseprompt+='🙀' From a245c09a787e69004de50ef2a557fb5f4a1caa2e Mon Sep 17 00:00:00 2001 From: Adam Perkowski Date: Mon, 10 Nov 2025 18:23:51 +0100 Subject: [PATCH 15/17] wakatime --- .gitattributes | 1 + home/adam.nix | 4 ++++ home/modules/programs/chromium.nix | 13 ++++--------- home/modules/programs/neovim.nix | 13 ++++++++++++- secrets/chromium.sh.age | Bin 505 -> 512 bytes secrets/secrets.nix | 1 + secrets/wakatime.cfg.age | 5 +++++ 7 files changed, 27 insertions(+), 10 deletions(-) create mode 100644 .gitattributes create mode 100644 secrets/wakatime.cfg.age diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..ad48a77 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.age binary diff --git a/home/adam.nix b/home/adam.nix index 97a0a57..335ee6c 100644 --- a/home/adam.nix +++ b/home/adam.nix @@ -1,3 +1,5 @@ +{ config, ... }: + { home = { username = "adam"; @@ -5,6 +7,8 @@ stateVersion = "25.05"; }; + age.identityPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ]; + imports = [ ./modules/scripts.nix ./modules/xdg.nix diff --git a/home/modules/programs/chromium.nix b/home/modules/programs/chromium.nix index 10b6fd0..edcc593 100644 --- a/home/modules/programs/chromium.nix +++ b/home/modules/programs/chromium.nix @@ -14,15 +14,10 @@ ]; }; - age = { - identityPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ]; - secrets = { - chromium = { - file = ../../../secrets/chromium.sh.age; - mode = "0500"; - path = "${config.home.homeDirectory}/.local/bin/chromium"; - }; - }; + age.secrets.chromium = { + file = ../../../secrets/chromium.sh.age; + mode = "0500"; + path = "${config.home.homeDirectory}/.local/bin/chromium"; }; home.sessionVariables.DEFAULT_BROWSER = "chromium"; diff --git a/home/modules/programs/neovim.nix b/home/modules/programs/neovim.nix index 1e7223a..de4466f 100644 --- a/home/modules/programs/neovim.nix +++ b/home/modules/programs/neovim.nix @@ -1,4 +1,9 @@ -{ pkgs, anvim, ... }: +{ + pkgs, + config, + anvim, + ... +}: { imports = [ anvim.homeManagerModules.default ]; @@ -12,4 +17,10 @@ bash-language-server nixd ]; + + age.secrets.wakatime = { + file = ../../../secrets/wakatime.cfg.age; + mode = "0500"; + path = "${config.home.homeDirectory}/.wakatime.cfg"; + }; } diff --git a/secrets/chromium.sh.age b/secrets/chromium.sh.age index ba885f452c0aa6b782da592ee52c768bc5348fa3..618dfb963844317436d397766017b3fdba40940b 100644 GIT binary patch delta 478 zcmV<40U`eR1AqjOEPq35RW&b5M^i6iF*h|)c{OTONMuD?LsK?#M@BhtXE1PQYG!RK zMRaLHMG9(bGfy-zMQ286LN|G5X;@`zZZ%3(Q!7nDX-GydOgA$|c|vA6MKL*XI0`K- zEg(xtS7B#QN>5WnGc;>4Y-DIkYG+Mnc0*G&L2NT~HCIqqV}E#0ZB;l(bVUlX<=7jO za#s=0h}(s#`%x>)Sm-{}su%m7vGVp=CE1xKkE_{1D14yIVi~e9sjcjX5f;P|w~X=8^IQHk8^`j@CRbbi@nvQjDeRUtIz93*V3qx@WXKy$FP@0jHrWy z62j$t$5p-1l5vp&sjNiQdby_h2PYZj&=lQJ9nBxRJ{b0 z5J$%G!O$X)wka1V^dC&PPO@>+u|9gPsaZ>Cj5{ipvQXlmtjHx(dmE8i$slROia5o# UQo{wd7ShjE>0Do6g1h%Tx`AWZ`2YX_ delta 471 zcmV;|0Vw`}1o;DyEPrxAICw}+V@FAKN>OoWS4S{#GDb*rT1jO`LQZB+R(3g8cTP@7 zGSxIahZ#a&|Z|cM2^n zEg(T?d3j7)IBzgXHEnWZS1>m?ZbU|COHx&5WqN3KNib_qO@DS#W;jK3G)W3G#L7Kg zVyQBJqE}ovhV0*CQ}Jv6N(g{Pa=AqNv>(e9U{$Zs4v0TK~Mq zDfw6AeP-7v_UU{57E${ZjT6^1tVX0A z(iDMy%+eKgU4Jio8Zj(El7Xp&Wwv6=Jv2)X$FeZWE~(YsDN5`;sqwFuU;;6=l?A_- z=)IZ;J!BCPpRs^JZkDKC6{E|yi_;ApSwAujw{ZlxURN0IMQ%rYCEL9>cyIP!^21MJ zF7D=i&tXQO!d4w#B!N2UmO=DWi*5E`f59JN5hR;}I7a~Z|8p;Q#DVp(1%Js?Nsv@k ssh-ed25519 IU0gwQ tiPC/5hn2voHevystFJAlzr4Wd5k5pQzBLUQgkGA0DQ +uz/ertXNfuDu9+TA+7RS7YyfeyJu2sPXOHvMLHuKxSg +--- g2buoSZZ7FczgKkr6EnyBUQaqo0gdtXiH5OCZ56JxYM +׿( )n9*:V o$E,ߟ:2Rv\g,u1J)᜻U-# k5^%F'u@UY(R/Byj^ƽ4yVl5تC͆rʛGZ~ m}1vsZa+/rKA*[,{8F \ No newline at end of file From c05b2f42072b40cfeba7db80a7919119c2fd2d0f Mon Sep 17 00:00:00 2001 From: Adam Perkowski Date: Tue, 11 Nov 2025 13:42:54 +0100 Subject: [PATCH 16/17] o --- systems/laptop/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/systems/laptop/default.nix b/systems/laptop/default.nix index 66ed226..d0bcda3 100644 --- a/systems/laptop/default.nix +++ b/systems/laptop/default.nix @@ -1,3 +1,5 @@ +{ pkgs, ... }: + { imports = [ ./hardware-configuration.nix @@ -12,4 +14,8 @@ xkb.layout = "us"; xkbVariant = "colemak"; }; + + environment.systemPackages = with pkgs; [ + brightnessctl + ]; } From f8c1f0fe393c391644c1a66c67ad06231aa76b38 Mon Sep 17 00:00:00 2001 From: adam Date: Tue, 11 Nov 2025 22:13:38 +0100 Subject: [PATCH 17/17] a --- flake.lock | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/flake.lock b/flake.lock index c1fa2b6..6f5532d 100644 --- a/flake.lock +++ b/flake.lock @@ -14,11 +14,11 @@ ] }, "locked": { - "lastModified": 1761656077, - "narHash": "sha256-lsNWuj4Z+pE7s0bd2OKicOFq9bK86JE0ZGeKJbNqb94=", + "lastModified": 1762618334, + "narHash": "sha256-wyT7Pl6tMFbFrs8Lk/TlEs81N6L+VSybPfiIgzU8lbQ=", "owner": "ryantm", "repo": "agenix", - "rev": "9ba0d85de3eaa7afeab493fed622008b6e4924f5", + "rev": "fcdea223397448d35d9b31f798479227e80183f6", "type": "github" }, "original": { @@ -34,11 +34,11 @@ ] }, "locked": { - "lastModified": 1761512417, - "narHash": "sha256-dyX4Q16kLkYF07XJTIsT5FFCoxPGpnSlSwOJBdl+h4c=", + "lastModified": 1762900424, + "narHash": "sha256-RwmJNXP+sdZrSyDh0p5zVGgxyMN8WUpvJaA/wu/qZOw=", "owner": "adamperkowski", "repo": "anvim", - "rev": "67f281743fa296aea3386d1a6e598464f2986bb6", + "rev": "96546094ef0bb5bab92414a041668a4a4f96ca98", "type": "github" }, "original": { @@ -145,11 +145,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1762341801, - "narHash": "sha256-zx7UxreMz646qikxw+So7eGRQeWccKFZxuMvJowJuFs=", + "lastModified": 1762886612, + "narHash": "sha256-gaPe/qkI4C9KyT8IZMvS9rXCWn2klxCC+MjXFU+jvqk=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "20aadad64b8b8cbebc71371713c141d91d7f8172", + "rev": "4efef728e910bb8f009fa2db143baeacaa3466ec", "type": "github" }, "original": { @@ -178,11 +178,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1762146685, - "narHash": "sha256-anRlNG6t7esBbF1+ALDeathVBSclA0PEL52Vo0WnN5g=", + "lastModified": 1762881062, + "narHash": "sha256-j0Gxopn4jGYQae/90V2v4u4+Ec+gFLq3UbSaGfczpOM=", "owner": "YaLTeR", "repo": "niri", - "rev": "a2ca2b3c866bc781b12c334a9f949b3db6d7c943", + "rev": "5b77107161c504376b962107913bf74b575703e7", "type": "github" }, "original": { @@ -209,11 +209,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1762111121, - "narHash": "sha256-4vhDuZ7OZaZmKKrnDpxLZZpGIJvAeMtK6FKLJYUtAdw=", + "lastModified": 1762596750, + "narHash": "sha256-rXXuz51Bq7DHBlfIjN7jO8Bu3du5TV+3DSADBX7/9YQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b3d51a0365f6695e7dd5cdf3e180604530ed33b4", + "rev": "b6a8526db03f735b89dd5ff348f53f752e7ddc8e", "type": "github" }, "original": { @@ -224,11 +224,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1762233356, - "narHash": "sha256-cGS3lLTYusbEP/IJIWGgnkzIl+FA5xDvtiHyjalGr4k=", + "lastModified": 1762756533, + "narHash": "sha256-HiRDeUOD1VLklHeOmaKDzf+8Hb7vSWPVFcWwaTrpm+U=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ca534a76c4afb2bdc07b681dbc11b453bab21af8", + "rev": "c2448301fb856e351aab33e64c33a3fc8bcf637d", "type": "github" }, "original": { @@ -278,11 +278,11 @@ ] }, "locked": { - "lastModified": 1762057664, - "narHash": "sha256-mdEEvepIi8ebpGP1WWOHNvNQyd8rF0mUrKAiU6mwHCk=", + "lastModified": 1762718300, + "narHash": "sha256-oOQimZTaV1jCw0OBmmK2g7Rdj3E8YGVpkJYD32BWKRQ=", "owner": "Gerg-L", "repo": "spicetify-nix", - "rev": "4aa6e43d29e3c8acf544aa6782a1963a11369208", + "rev": "c7175bd485ed5052df5075fcdde395b631316e94", "type": "github" }, "original": { @@ -341,11 +341,11 @@ "xwayland-satellite-unstable": { "flake": false, "locked": { - "lastModified": 1762302024, - "narHash": "sha256-F+4W0J5r7fbEl+VmATFqAA5+4dFSNAmLJB7tAtrTIkY=", + "lastModified": 1762747449, + "narHash": "sha256-Z1TKiux8K09a93w4PFDFsj8HFugXNy3iCC3Z8MpR5Rk=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "53b6072bd995b5b4017999cf247f9eb6660c72a2", + "rev": "6338574bc5c036487486acde264f38f39ea15fad", "type": "github" }, "original": {