Replaced waybar and swaync with Hyprpanel and dunst

This commit is contained in:
Martin Berg Alstad 2025-01-09 19:52:08 +01:00
parent 89265aef48
commit 914c25808f
Signed by: martials
GPG Key ID: A3824877B269F2E2
10 changed files with 208 additions and 23 deletions

View File

@ -1,9 +1,9 @@
rec {
default = {
browser = "io.github.zen_browser.zen.desktop";
browser = "io.github.zen_browser.zen";
calculator = "gnome-calculator";
fileManager = "nautilus";
imageViewer = "org.gnome.Loupe.desktop";
imageViewer = "loupe";
lockScreen = "hyprlock";
terminal = "kitty";
};

66
flake.lock generated
View File

@ -1,5 +1,49 @@
{
"nodes": {
"ags": {
"inputs": {
"astal": "astal",
"nixpkgs": [
"hyprpanel",
"nixpkgs"
]
},
"locked": {
"lastModified": 1735485506,
"narHash": "sha256-7CWr3Q83KnGiLUn0oaboafLMOXQ0X9/fjFRVY1xopbM=",
"owner": "aylur",
"repo": "ags",
"rev": "251d39413543264361898b02035775aa3e46fe52",
"type": "github"
},
"original": {
"owner": "aylur",
"repo": "ags",
"type": "github"
}
},
"astal": {
"inputs": {
"nixpkgs": [
"hyprpanel",
"ags",
"nixpkgs"
]
},
"locked": {
"lastModified": 1735172721,
"narHash": "sha256-rtEAwGsHSppnkR3Qg3eRJ6Xh/F84IY9CrBBLzYabalY=",
"owner": "aylur",
"repo": "astal",
"rev": "6c84b64efc736e039a8a10774a4a1bf772c37aa2",
"type": "github"
},
"original": {
"owner": "aylur",
"repo": "astal",
"type": "github"
}
},
"base16": {
"inputs": {
"fromYaml": "fromYaml"
@ -375,6 +419,27 @@
"type": "github"
}
},
"hyprpanel": {
"inputs": {
"ags": "ags",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1736315488,
"narHash": "sha256-XKQT7ZY+0q3CHncCQ5QvSq8inG44A0ReokqYjieL1Z4=",
"owner": "Jas-SinghFSU",
"repo": "HyprPanel",
"rev": "9663d2f6b74df8476feb87b3b09e998c8ef87ac8",
"type": "github"
},
"original": {
"owner": "Jas-SinghFSU",
"repo": "HyprPanel",
"type": "github"
}
},
"ixx": {
"inputs": {
"flake-utils": [
@ -510,6 +575,7 @@
"root": {
"inputs": {
"home-manager": "home-manager",
"hyprpanel": "hyprpanel",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable",
"nixvim": "nixvim",

View File

@ -9,6 +9,10 @@
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprpanel = {
url = "github:Jas-SinghFSU/HyprPanel";
inputs.nixpkgs.follows = "nixpkgs";
};
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs-unstable";
@ -25,39 +29,40 @@
nixpkgs,
nixpkgs-unstable,
home-manager,
hyprpanel,
stylix,
...
}:
let
system = "x86_64-linux";
inherit (self) outputs;
common = import ./common.nix;
in
{
defaultPackage.${system} = home-manager.defaultPackage.${system};
# Adds the nix fmt command to format nix files
formatter.${system} = nixpkgs.legacyPackages.${system}.nixfmt-rfc-style;
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
system = system;
specialArgs = { inherit outputs; }; # Pass args to modules
specialArgs = { inherit outputs inputs; }; # Pass args to modules
modules = [
./configuration.nix
home-manager.nixosModules.home-manager
{
home-manager =
let
common = import ./common.nix;
in
{
# Backups conflicting files in case of error
backupFileExtension = "bkp";
useGlobalPkgs = true;
useUserPackages = true;
# Passes inputs as an argument to home-manager
extraSpecialArgs = { inherit inputs; };
users.${common.username} = import ./home-manager;
};
home-manager = {
# Backups conflicting files in case of error
backupFileExtension = "bkp";
useGlobalPkgs = true;
useUserPackages = true;
# Passes inputs as an argument to home-manager
extraSpecialArgs = { inherit inputs; };
users.${common.username} = import ./home-manager;
};
}
stylix.nixosModules.stylix
./overlays.nix
];
};

View File

@ -6,6 +6,7 @@
./waybar
./hypridle
./hyprlock
./hyprpanel
./hyprshot.nix
./settings.nix
./swaync

View File

@ -0,0 +1,110 @@
{ inputs, ... }:
let
common = import ../../../common.nix;
theme = import ../../../theme.nix;
in
{
imports = [ inputs.hyprpanel.homeManagerModules.hyprpanel ];
programs.hyprpanel = {
enable = true;
# Automatically restart HyprPanel with systemd.
systemd.enable = true;
# Add hyprpanel to the Hyprland config 'exec-once'.
hyprland.enable = true;
# Fix the overwrite issue with HyprPanel.
overwrite.enable = true;
# Import a theme from './themes/*.json'.
theme = "";
# Override the final config with an arbitrary set.
# Useful for overriding colors in your selected theme.
# Default: {}
override = {
theme.bar.menus.text = "#123ABC";
};
# Configure bar layouts for monitors.
layout = {
"bar.layouts" = {
"*" = {
left = [
"dashboard"
"workspaces"
"windowtitle"
];
middle = [ "media" ];
right = [
"kbinput"
"volume"
"network"
"systray"
"clock"
"notifications"
];
};
};
};
# Configure and theme almost all options from the GUI.
# Options that require '{}' or '[]' are not yet implemented,
# except for the layout above.
# See 'https://hyprpanel.com/configuration/settings.html'.
# Default: <same as gui>
settings = {
bar = {
clock.format = "%a %b %d %H:%M";
customModules.kbLayout.leftClick = "hyprctl switchxkblayout keychron-keychron-k8-pro next";
launcher.autoDetectIcon = true;
network.label = false;
workspaces = {
show_icons = false;
show_numbered = true;
};
};
menus.clock = {
time = {
military = true;
hideSeconds = true;
};
weather = {
unit = "metric";
location = "Bergen, Norway"; # TODO not working
};
};
menus.dashboard = {
directories.enabled = false;
shortcuts.left = {
shortcut1 = {
command = common.default.browser;
icon = ""; # TODO replace with Zen icon
tooltip = "Zen";
};
shortcut2 = {
command = "spotify";
icon = "";
tooltip = "Spotify";
};
## shortcut3 === discord
## shortcut4 === rofi -show drun
};
stats.enable_gpu = true;
};
scalingPriority = "hyprland";
theme = {
bar.transparent = true;
font = {
name = "${theme.nerdFont} NF";
size = "16px";
};
};
wallpaper.enable = true;
};
};
}

View File

@ -18,8 +18,7 @@ in
"${app.terminal}"
"hypridle"
"systemctl --user start hyprpolkitagent"
"swaync"
"waybar"
# "waybar"
"waypaper --restore"
];

View File

@ -3,9 +3,8 @@ let
theme = import ../../../theme.nix;
in
{
# TODO inject font
services.swaync = {
enable = true;
enable = false;
style = lib.mkDefault ''
* {
all: unset;

View File

@ -1,5 +1,3 @@
{ ... }:
{
home.file.".config/waybar" = {
source = ./config;

View File

@ -10,7 +10,7 @@
xdg-desktop-portal-hyprland
hyprpolkitagent # Auth deamon providing modals for password auth
hyprshot # Screenshots
waybar
# waybar
];
programs = {

7
overlays.nix Normal file
View File

@ -0,0 +1,7 @@
{ inputs, ... }:
{
nixpkgs.overlays = with inputs; [
hyprpanel.overlay
];
}