From b72bbb412079dffb96671e618e61ac159eaf0f14 Mon Sep 17 00:00:00 2001 From: veneficium Date: Mon, 10 Nov 2025 19:38:38 +0100 Subject: [PATCH 1/6] initial quickshell config --- modules/home/niri/niri.nix | 8 ++ modules/home/niri/shell.qml | 159 ++++++++++++++++++++++++++++++++++++ 2 files changed, 167 insertions(+) create mode 100644 modules/home/niri/shell.qml diff --git a/modules/home/niri/niri.nix b/modules/home/niri/niri.nix index 85838a8..cf2d1b2 100644 --- a/modules/home/niri/niri.nix +++ b/modules/home/niri/niri.nix @@ -20,6 +20,14 @@ settings = builtins.fromJSON (builtins.readFile ./swaylock.json); }; + programs.quickshell = { + enable = true; + configs = { + "default" = ./shell.qml; + }; + activeConfig = "default"; + }; + services.mako = { enable = true; settings = { diff --git a/modules/home/niri/shell.qml b/modules/home/niri/shell.qml new file mode 100644 index 0000000..4171e28 --- /dev/null +++ b/modules/home/niri/shell.qml @@ -0,0 +1,159 @@ +import Quickshell +import QtQuick +import QtQuick.Layouts +import Quickshell.Widgets +import Quickshell.Services.SystemTray +import Quickshell.Services.Pipewire +import Quickshell.Io + +PanelWindow { + component Pill: Rectangle { + default property alias data: inner.data + color: Qt.rgba(0.6,0.6,0.6,0.4) + radius: height / 2.0 - 2.0 + implicitWidth: inner.implicitWidth + 8.0 * 2 + implicitHeight: inner.implicitHeight + 3.0 * 2 + Item { + id: inner + anchors.centerIn: parent + implicitWidth: inner.childrenRect.width + implicitHeight: inner.childrenRect.height + } + } + + component Tray: WrapperItem { + implicitWidth: inner.implicitWidth + implicitHeight: inner.implicitHeight + RowLayout { + id: inner + Repeater { + model: SystemTray.items.values + IconImage { + id: tray_item + required property SystemTrayItem modelData + source: modelData.icon + visible: !modelData.icon.includes("?path=") + implicitSize: 22.5 + + PopupWindow { + id: label + visible: hover_handler.hovered && hover_text.width + implicitWidth: hover_text.width + implicitHeight: hover_text.height + 2.0 + anchor.item: tray_item + anchor.rect.y: tray_item.height + 2.0 + anchor.rect.x: (tray_item.width - this.width) / 2.0 + color: "black" + Text { + id: hover_text + text: tray_item.modelData.tooltipTitle || tray_item.modelData.title + color: "white" + } + } + + HoverHandler { + id: hover_handler + } + + TapHandler { + onTapped: (eventPoint, button) => { + if (button == 1) { + tray_item.modelData.activate(); + } else { + tray_item.modelData.display(label, 0, 0); + } + } + } + } + } + } + } + + anchors { + top: true + left: true + right: true + } + + implicitHeight: 35 + + color: "transparent" + + Rectangle { + color: Qt.rgba(0.3,0.3,0.3,0.5) + anchors.fill: parent + anchors.leftMargin: 11 + anchors.rightMargin: 11 + radius: 11 + } + + SystemClock { + id: clock + precision: SystemClock.Seconds + } + + Pill { + Text { + text: Qt.formatDateTime(clock.date, "hh:mm dd-MM") + color: "white" + } + anchors.centerIn: parent + } + + Pill { + anchors.horizontalCenter: parent.left + anchors.horizontalCenterOffset: (width / 2.0) + 30.0 + anchors.verticalCenter: parent.verticalCenter + Text { + text: "left" + color: "white" + } + } + + Item { + anchors.horizontalCenter: parent.right + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenterOffset: -((width / 2.0) + 30.0) + RowLayout { + id: right_row + anchors.centerIn: parent + anchors.horizontalCenterOffset: -(width / 2.0) + + PwObjectTracker {objects: [Pipewire.defaultAudioSink]} + + FileView { + id: batteryFile + path: "/sys/class/power_supply/BAT1/capacity" + watchChanges: true + onFileChanged: this.reload() + blockLoading: true + } + + Pill { + Text { + color: "white" + text: `bat: ${batteryFile.text().slice(0,2)}%` + } + } + + Pill { + Text { + text: `vol: ${Math.round(Pipewire.defaultAudioSink.audio.volume * 100)}%` + color: "white" + } + } + + Pill { + Text { + color: "white" + text: Pipewire.defaultAudioSink.description.slice(0, 15) + } + } + + Pill { + Tray {} + } + } + } + +} From c9991f04a3bb01e74e263408d4cfd0ab5b06231c Mon Sep 17 00:00:00 2001 From: veneficium Date: Mon, 10 Nov 2025 19:40:08 +0100 Subject: [PATCH 2/6] use fast ghostty new-window --- modules/home/niri/niri.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/home/niri/niri.nix b/modules/home/niri/niri.nix index cf2d1b2..984560e 100644 --- a/modules/home/niri/niri.nix +++ b/modules/home/niri/niri.nix @@ -201,7 +201,10 @@ allow-when-locked = true; }; - "Mod+T".action.spawn = "ghostty"; + "Mod+T".action.spawn = [ + "ghostty" + "+new-window" + ]; "Mod+D".action.spawn = "fuzzel"; "Mod+Q".action = close-window; From 849dd1f8d48da6964c6c9692b34d5c78455761cf Mon Sep 17 00:00:00 2001 From: veneficium Date: Mon, 10 Nov 2025 19:40:30 +0100 Subject: [PATCH 3/6] update tuigreet to use new package --- modules/nixos/programs/tuigreet.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/nixos/programs/tuigreet.nix b/modules/nixos/programs/tuigreet.nix index 1ba0afb..f35aed1 100644 --- a/modules/nixos/programs/tuigreet.nix +++ b/modules/nixos/programs/tuigreet.nix @@ -12,9 +12,10 @@ config = lib.mkIf config.settings.programs.tuigreet.enable { services.greetd = { enable = true; + useTextGreeter = true; settings = { default_session = { - command = "${pkgs.greetd.tuigreet}/bin/tuigreet -t -g \"Haii! :3\" --theme \"container=black;input=lightBlue;prompt=green;greet=magenta;border=blue\""; + command = "${pkgs.tuigreet}/bin/tuigreet -t -g \"Haii! :3\" --theme \"container=black;input=lightBlue;prompt=green;greet=magenta;border=blue\""; user = "greeter"; }; }; From 01efc056e46f95b8ddcbb3680db08e46446a3842 Mon Sep 17 00:00:00 2001 From: veneficium Date: Mon, 10 Nov 2025 19:41:36 +0100 Subject: [PATCH 4/6] use new git email and hm options --- modules/home/cliPrograms/git.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/home/cliPrograms/git.nix b/modules/home/cliPrograms/git.nix index 34059f3..92894ea 100644 --- a/modules/home/cliPrograms/git.nix +++ b/modules/home/cliPrograms/git.nix @@ -7,11 +7,13 @@ config = lib.mkIf config.settings.programs.git.enable { programs.git = { enable = true; - userEmail = "85629831+veneficium42@users.noreply.github.com"; - userName = "Veneficium"; - extraConfig = { + settings = { + user = { + email = "veneficium@linuxposting.xyz"; + name = "veneficium"; + }; init.defaultBranch = "main"; - credential.credentialStore = "gpg"; + # credential.credentialStore = "gpg"; }; }; }; From b4bcf9f5d7a961f56d398e9f769146d6f66c2369 Mon Sep 17 00:00:00 2001 From: veneficium Date: Mon, 10 Nov 2025 19:42:14 +0100 Subject: [PATCH 5/6] remove unused packages --- hosts/main-laptop/home.nix | 7 ------- 1 file changed, 7 deletions(-) diff --git a/hosts/main-laptop/home.nix b/hosts/main-laptop/home.nix index b9dcb45..9934aef 100644 --- a/hosts/main-laptop/home.nix +++ b/hosts/main-laptop/home.nix @@ -65,9 +65,7 @@ home.packages = with pkgs; [ prismlauncher - foliate impression - chatterino2 qbittorrent nixd nixpkgs-fmt @@ -75,23 +73,18 @@ powertop vesktop libreoffice - valent zapzap kicad-small freecad-wayland resources pmbootstrap celluloid - fractal yazi nautilus - tuba eza bat gitui wleave - wl-gammarelay-rs - wl-gammarelay-applet ]; home.stateVersion = "23.11"; # DO NOT CHANGE From 8e7eea9b80abb4a907d3af85e93675178fb5f02d Mon Sep 17 00:00:00 2001 From: veneficium Date: Mon, 10 Nov 2025 19:44:52 +0100 Subject: [PATCH 6/6] move nix config to flake --- flake.nix | 17 +++++++++++++++++ hosts/main-laptop/configuration.nix | 9 --------- scripts/rebuild.sh | 2 +- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/flake.nix b/flake.nix index 152224a..0605c5a 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,23 @@ { description = "Veneficium's amazing fantastic mindblowingly stupid nixOS configuration! :3"; + nixConfig = { + experimental-features = "nix-command flakes"; + substitute = "true"; + extra-substituters = [ + "https://cache.nixos.org" + "https://nix-community.cachix.org" + "https://niri.cachix.org" + ]; + trusted-public-keys = [ + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964=" + ]; + cores = 0; + max-jobs = 2; + }; + inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; diff --git a/hosts/main-laptop/configuration.nix b/hosts/main-laptop/configuration.nix index c99b110..b55e412 100644 --- a/hosts/main-laptop/configuration.nix +++ b/hosts/main-laptop/configuration.nix @@ -19,15 +19,6 @@ users.extraGroups.vboxusers.members = [ "fedfer" ]; - nix.settings = { - substituters = [ - "https://nix-community.cachix.org" - ]; - trusted-public-keys = [ - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - ]; - }; - stylix.enable = true; stylix.autoEnable = true; stylix = { diff --git a/scripts/rebuild.sh b/scripts/rebuild.sh index 9ce096b..3368372 100755 --- a/scripts/rebuild.sh +++ b/scripts/rebuild.sh @@ -1,2 +1,2 @@ #! /bin/sh -sudo nixos-rebuild switch --flake . \ No newline at end of file +sudo nixos-rebuild switch --accept-flake-config --flake .