Compare commits

..

3 commits

Author SHA1 Message Date
00bb0ea051
treewide: remove ironbar 2024-11-21 09:57:08 +01:00
c2d17ef3e8
home/programs/niri: remove ironbar 2024-11-21 09:51:49 +01:00
8358a2ba12
treewide: configure waybar
commit fce8d778d5
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Thu Nov 21 09:49:00 2024 +0100

    treewide: add waybar configuration

commit 858431bc35
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Thu Nov 21 09:48:51 2024 +0100

    system/programs/fonts: add nerd fonts symbols only

commit 8a225b4763
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Thu Nov 21 09:47:00 2024 +0100

    modules: add a theme enable option
2024-11-21 09:49:45 +01:00
10 changed files with 297 additions and 172 deletions

View file

@ -84,21 +84,6 @@
} }
}, },
"crane": { "crane": {
"locked": {
"lastModified": 1730060262,
"narHash": "sha256-RMgSVkZ9H03sxC+Vh4jxtLTCzSjPq18UWpiM0gq6shQ=",
"owner": "ipetkov",
"repo": "crane",
"rev": "498d9f122c413ee1154e8131ace5a35a80d8fa76",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"crane_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"lanzaboote", "lanzaboote",
@ -455,32 +440,9 @@
"type": "github" "type": "github"
} }
}, },
"ironbar": {
"inputs": {
"crane": "crane",
"naersk": "naersk",
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1731790092,
"narHash": "sha256-qO4282Y6iw5z37LuQQ8P5LVy7ZOZFFE7Ch/tP8Y/mWw=",
"owner": "JakeStanger",
"repo": "ironbar",
"rev": "42e25f5ef2ce9886d8fafb42aff9ced7ef183726",
"type": "github"
},
"original": {
"owner": "JakeStanger",
"repo": "ironbar",
"type": "github"
}
},
"lanzaboote": { "lanzaboote": {
"inputs": { "inputs": {
"crane": "crane_2", "crane": "crane",
"flake-compat": "flake-compat_3", "flake-compat": "flake-compat_3",
"flake-parts": "flake-parts_2", "flake-parts": "flake-parts_2",
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_2",
@ -488,7 +450,7 @@
"nixpkgs" "nixpkgs"
], ],
"pre-commit-hooks-nix": "pre-commit-hooks-nix", "pre-commit-hooks-nix": "pre-commit-hooks-nix",
"rust-overlay": "rust-overlay_2" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1718178907, "lastModified": 1718178907,
@ -538,24 +500,6 @@
} }
}, },
"naersk": { "naersk": {
"inputs": {
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1721727458,
"narHash": "sha256-r/xppY958gmZ4oTfLiHN0ZGuQ+RSTijDblVgVLFi1mw=",
"owner": "nix-community",
"repo": "naersk",
"rev": "3fb418eaf352498f6b6c30592e3beb63df42ef11",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "naersk",
"type": "github"
}
},
"naersk_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"neovim-flake", "neovim-flake",
@ -611,7 +555,7 @@
"nvf", "nvf",
"nixpkgs" "nixpkgs"
], ],
"rust-overlay": "rust-overlay_3" "rust-overlay": "rust-overlay_2"
}, },
"locked": { "locked": {
"lastModified": 1714571717, "lastModified": 1714571717,
@ -631,7 +575,7 @@
"inputs": { "inputs": {
"niri-stable": "niri-stable", "niri-stable": "niri-stable",
"niri-unstable": "niri-unstable", "niri-unstable": "niri-unstable",
"nixpkgs": "nixpkgs_7", "nixpkgs": "nixpkgs_6",
"nixpkgs-stable": "nixpkgs-stable_2", "nixpkgs-stable": "nixpkgs-stable_2",
"xwayland-satellite-stable": "xwayland-satellite-stable", "xwayland-satellite-stable": "xwayland-satellite-stable",
"xwayland-satellite-unstable": "xwayland-satellite-unstable" "xwayland-satellite-unstable": "xwayland-satellite-unstable"
@ -790,22 +734,6 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_10": {
"locked": {
"lastModified": 1726871744,
"narHash": "sha256-V5LpfdHyQkUF7RfOaDPrZDP+oqz88lTJrMT1+stXNwo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a1d92660c6b3b7c26fb883500a80ea9d33321be2",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1715266358, "lastModified": 1715266358,
@ -839,20 +767,6 @@
} }
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": {
"lastModified": 1730272153,
"narHash": "sha256-B5WRZYsRlJgwVHIV6DvidFN7VX7Fg9uuwkRW9Ha8z+w=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2d2a9ddbe3f2c00747398f3dc9b05f7f2ebb0f53",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1726871744, "lastModified": 1726871744,
"narHash": "sha256-V5LpfdHyQkUF7RfOaDPrZDP+oqz88lTJrMT1+stXNwo=", "narHash": "sha256-V5LpfdHyQkUF7RfOaDPrZDP+oqz88lTJrMT1+stXNwo=",
@ -868,7 +782,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_6": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1656753965, "lastModified": 1656753965,
"narHash": "sha256-BCrB3l0qpJokOnIVc3g2lHiGhnjUi0MoXiw6t1o8H1E=", "narHash": "sha256-BCrB3l0qpJokOnIVc3g2lHiGhnjUi0MoXiw6t1o8H1E=",
@ -884,7 +798,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_7": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1731676054, "lastModified": 1731676054,
"narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=", "narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=",
@ -900,7 +814,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_8": { "nixpkgs_7": {
"locked": { "locked": {
"lastModified": 1731319897, "lastModified": 1731319897,
"narHash": "sha256-PbABj4tnbWFMfBp6OcUK5iGy1QY+/Z96ZcLpooIbuEI=", "narHash": "sha256-PbABj4tnbWFMfBp6OcUK5iGy1QY+/Z96ZcLpooIbuEI=",
@ -916,7 +830,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_9": { "nixpkgs_8": {
"locked": { "locked": {
"lastModified": 1731531548, "lastModified": 1731531548,
"narHash": "sha256-sz8/v17enkYmfpgeeuyzniGJU0QQBfmAjlemAUYhfy8=", "narHash": "sha256-sz8/v17enkYmfpgeeuyzniGJU0QQBfmAjlemAUYhfy8=",
@ -932,6 +846,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_9": {
"locked": {
"lastModified": 1726871744,
"narHash": "sha256-V5LpfdHyQkUF7RfOaDPrZDP+oqz88lTJrMT1+stXNwo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a1d92660c6b3b7c26fb883500a80ea9d33321be2",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nmd": { "nmd": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -954,7 +884,7 @@
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_3",
"mnw": "mnw", "mnw": "mnw",
"nil": "nil", "nil": "nil",
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_4",
"nmd": "nmd", "nmd": "nmd",
"plugin-alpha-nvim": "plugin-alpha-nvim", "plugin-alpha-nvim": "plugin-alpha-nvim",
"plugin-bufdelete-nvim": "plugin-bufdelete-nvim", "plugin-bufdelete-nvim": "plugin-bufdelete-nvim",
@ -2733,7 +2663,7 @@
}, },
"portfolio": { "portfolio": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_9", "nixpkgs": "nixpkgs_8",
"sam-zola": "sam-zola" "sam-zola": "sam-zola"
}, },
"locked": { "locked": {
@ -2779,8 +2709,8 @@
}, },
"rnix-lsp": { "rnix-lsp": {
"inputs": { "inputs": {
"naersk": "naersk_2", "naersk": "naersk",
"nixpkgs": "nixpkgs_6", "nixpkgs": "nixpkgs_5",
"utils": "utils_2" "utils": "utils_2"
}, },
"locked": { "locked": {
@ -2805,13 +2735,12 @@
"deploy-rs": "deploy-rs", "deploy-rs": "deploy-rs",
"firefox-addons": "firefox-addons", "firefox-addons": "firefox-addons",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"ironbar": "ironbar",
"lanzaboote": "lanzaboote", "lanzaboote": "lanzaboote",
"neovim-flake": "neovim-flake", "neovim-flake": "neovim-flake",
"niri": "niri", "niri": "niri",
"nix-index-db": "nix-index-db", "nix-index-db": "nix-index-db",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_8", "nixpkgs": "nixpkgs_7",
"plasma-manager": "plasma-manager", "plasma-manager": "plasma-manager",
"portfolio": "portfolio", "portfolio": "portfolio",
"systems": "systems_6", "systems": "systems_6",
@ -2820,27 +2749,6 @@
} }
}, },
"rust-overlay": { "rust-overlay": {
"inputs": {
"nixpkgs": [
"ironbar",
"nixpkgs"
]
},
"locked": {
"lastModified": 1730341826,
"narHash": "sha256-RFaeY7EWzXOmAL2IQEACbnrEza3TgD5UQApHR4hGHhY=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "815d1b3ee71716fc91a7bd149801e1f04d45fbc5",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"rust-overlay_2": {
"inputs": { "inputs": {
"flake-utils": [ "flake-utils": [
"lanzaboote", "lanzaboote",
@ -2865,7 +2773,7 @@
"type": "github" "type": "github"
} }
}, },
"rust-overlay_3": { "rust-overlay_2": {
"inputs": { "inputs": {
"flake-utils": [ "flake-utils": [
"neovim-flake", "neovim-flake",
@ -2894,7 +2802,7 @@
"type": "github" "type": "github"
} }
}, },
"rust-overlay_4": { "rust-overlay_3": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"wezterm", "wezterm",
@ -3038,7 +2946,7 @@
}, },
"treefmt-nix": { "treefmt-nix": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_10" "nixpkgs": "nixpkgs_9"
}, },
"locked": { "locked": {
"lastModified": 1730321837, "lastModified": 1730321837,
@ -3096,7 +3004,7 @@
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"rust-overlay": "rust-overlay_4", "rust-overlay": "rust-overlay_3",
"zlib": "zlib" "zlib": "zlib"
}, },
"locked": { "locked": {

View file

@ -58,10 +58,6 @@
ags.url = "github:Aylur/ags"; ags.url = "github:Aylur/ags";
basix.url = "github:notashelf/basix"; basix.url = "github:notashelf/basix";
deploy-rs.url = "github:serokell/deploy-rs"; deploy-rs.url = "github:serokell/deploy-rs";
ironbar = {
url = "github:JakeStanger/ironbar";
inputs.nixpkgs.follows = "nixpkgs";
};
firefox-addons = { firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";

View file

@ -1,36 +0,0 @@
{inputs, ...}: {
imports = [inputs.ironbar.homeManagerModules.default];
programs.ironbar = {
enable = true;
systemd = true;
config = {
position = "top";
anchor_to_edges = true;
center = [
{
type = "focused";
show_icon = true;
show_title = true;
icon_size = 20;
truncate = "end";
}
];
end = [
{type = "volume";}
{type = "clock";}
{type = "tray";}
];
};
style = ''
.tray {
margin-top: 5px;
padding: 10px;
border-radius: 50px;
}
.tray .item {
border-radius: 50px;
min-height: 25px;
padding: 0;
'';
};
}

View file

@ -95,10 +95,6 @@ in {
"DISPLAY" = ":0"; "DISPLAY" = ":0";
"_JAVA_AWT_WM_NONREPARENTING" = "1"; # https://wiki.archlinux.org/title/Sway#Java_applications "_JAVA_AWT_WM_NONREPARENTING" = "1"; # https://wiki.archlinux.org/title/Sway#Java_applications
}; };
spawn-at-startup = [
(mkIf config.programs.ironbar.enable {command = [(getExe inputs.ironbar.packages.${pkgs.system}.default)];})
];
}; };
}; };

View file

@ -0,0 +1,148 @@
{
osConfig,
pkgs,
lib,
...
}: let
inherit (lib) getExe;
in {
imports = [./style.nix];
programs.waybar = {
enable = true;
systemd.enable = true;
settings = {
mainBar = {
layer = "top";
position = "top";
height = 30;
margin-top = 6;
margin-left = 6;
margin-right = 6;
margin-bottom = 0;
modules-left = ["niri/workspaces" "niri/window"];
modules-center = ["group/clock"];
modules-right = ["tray" "group/status" "group/power"];
battery = {
interval = 60;
states = {
warning = 30;
critical = 15;
};
format = "{icon} {capacity}%";
format-icons = [
""
""
""
""
""
];
max-length = 25;
};
"niri/window" = {
icon = true;
};
"pulseaudio" = {
format = "{icon} {volume}%";
format-bluetooth = "{icon} {volume}%";
format-muted = " ";
format-icons = {
"alsa_output.pci-0000_00_1f.3.analog-stereo" = "";
"alsa_output.pci-0000_00_1f.3.analog-stereo-muted" = "";
headphone = "";
hands-free = "";
headset = "";
phone = "";
phone-muted = "";
portable = "";
car = "";
default = [
""
""
];
};
scroll-step = 1;
on-click = "pavucontrol";
ignored-sinks = [
"Easy Effects Sink"
];
};
"power-profiles-daemon" = {
format-icons = {
default = "";
performance = "";
balanced = "";
power-saver = "";
};
};
"group/status" = {
orientation = "inherit";
modules = [
"pulseaudio"
"power-profiles-daemon"
"network"
"battery"
];
};
"group/power" = {
orientation = "inherit";
modules = [
"custom/power"
];
};
"group/clock" = {
orientation = "inherit";
modules = [
"clock#time"
"clock#date"
];
};
"custom/power" = {
format = "";
tooltip = false;
on-click = getExe pkgs.wlogout;
};
"clock#date" = {
format = "{:%D}";
tooltip-format = "<tt><big>{calendar}</big></tt>";
};
"clock#time" = {
format = "{:%H:%M}";
tooltip-format = "{tz_list}";
timezones = [
osConfig.time.timeZone
"US/Eastern"
];
};
network = {
interface = "wlp1s0";
format = "{ifname}";
format-wifi = "({signalStrength}%) ";
format-ethernet = "{ipaddr}/{cidr} 󰊗";
format-disconnected = "";
tooltip-format = "{ifname} via {gwaddr} 󰊗";
tooltip-format-wifi = "{essid} ({signalStrength}%) ";
tooltip-format-ethernet = "{ifname} ";
tooltip-format-disconnected = "Disconnected";
max-length = 50;
};
};
};
};
home.packages = [
pkgs.pavucontrol
];
}

View file

@ -0,0 +1,111 @@
{
inputs,
lib,
osConfig,
...
}: let
inherit (inputs.basix.schemeData.base16.${osConfig.theme.scheme}) palette;
inherit (builtins) concatStringsSep;
inherit (lib) mapAttrsToList;
generateGtkColors = palette: (concatStringsSep "\n"
(mapAttrsToList
(name: color: "@define-color ${name} ${color};")
palette));
in {
programs.waybar.style = ''
${
if osConfig.theme.enable
then generateGtkColors palette
else ""
}
* {
/* `otf-font-awesome` is required to be installed for icons */
border: none;
border-radius: 0px;
min-height: 0;
}
window#waybar {
border-radius: 2em;
font-family: "Symbols Nerd Font", Inter, sans-serif;
font-size: 16px;
font-style: normal;
background: alpha(
@base00,
0.9999999
); /* niri issue workaround, thanks https://github.com/oatmealine/nix-config/blob/bfdddd2cb36ef659bcddc28e0dbb542b6db8b3bc/modules/desktop/themes/catppuccin/waybar.css#L14 */
color: @base05;
}
#workspaces,
.modules-right box {
background: @base02;
padding: 0.15em 0.25em;
border-radius: 1em;
margin: 0 0.25em;
}
#workspaces {
padding: 0;
background: @base02;
}
#workspaces button:nth-child(1) {
border-top-left-radius: 1em;
border-bottom-left-radius: 1em;
}
#workspaces button:nth-last-child(1) {
border-top-right-radius: 1em;
border-bottom-right-radius: 1em;
}
#workspaces button {
padding: 0 0.5em;
background-color: transparent;
}
#workspaces button:hover {
background: rgba(255, 255, 255, 0.1);
box-shadow: none;
}
#workspaces button.active {
background: @base0E;
color: @base02;
}
#workspaces button.urgent {
background: @base08;
}
#window {
margin-left: 1em;
}
.modules-left,
.modules-right {
margin: 0.4em 0.5em;
}
#battery,
#clock,
#pulseaudio,
#tray,
#power-profiles-daemon {
padding: 0 0.8em;
}
.modules-left,
.modules-right {
margin: 0.4em 0.5em;
}
#custom-power {
padding: 0 1.2em;
color: @base08;
}
'';
}

View file

@ -34,7 +34,7 @@ in {
"${home}/services/udiskie.nix" "${home}/services/udiskie.nix"
"${home}/programs/niri" "${home}/programs/niri"
"${home}/programs/ironbar" "${home}/programs/waybar"
"${home}/programs/fuzzel.nix" "${home}/programs/fuzzel.nix"
"${home}/programs/swaybg.nix" "${home}/programs/swaybg.nix"
"${home}/programs/swaylock.nix" "${home}/programs/swaylock.nix"

View file

@ -1,5 +1,6 @@
{pkgs, ...}: { {pkgs, ...}: {
theme = { theme = {
enable = true;
wallpaper = pkgs.fetchurl { wallpaper = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/e0cf0eb237dc5baba86661a3572b20a6183c1876/wallpapers/nix-wallpaper-nineish-catppuccin-frappe.png?raw=true"; url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/e0cf0eb237dc5baba86661a3572b20a6183c1876/wallpapers/nix-wallpaper-nineish-catppuccin-frappe.png?raw=true";
hash = "sha256-/HAtpGwLxjNfJvX5/4YZfM8jPNStaM3gisK8+ImRmQ4="; hash = "sha256-/HAtpGwLxjNfJvX5/4YZfM8jPNStaM3gisK8+ImRmQ4=";

View file

@ -3,11 +3,12 @@
pkgs, pkgs,
... ...
}: let }: let
inherit (lib) mkOption; inherit (lib) mkEnableOption mkOption;
inherit (lib.types) string path package; inherit (lib.types) string path package;
in { in {
imports = [./gtk.nix]; imports = [./gtk.nix];
options.theme = { options.theme = {
enable = mkEnableOption "theme";
scheme = mkOption { scheme = mkOption {
description = '' description = ''
Name of the tinted-scheming color scheme to use. Name of the tinted-scheming color scheme to use.

View file

@ -14,7 +14,7 @@
pkgs.noto-fonts-extra pkgs.noto-fonts-extra
pkgs.intel-one-mono pkgs.intel-one-mono
inputs.self.packages.${pkgs.system}.apple-emoji-color inputs.self.packages.${pkgs.system}.apple-emoji-color
(pkgs.nerdfonts.override {fonts = ["IntelOneMono"];}) (pkgs.nerdfonts.override {fonts = ["IntelOneMono" "NerdFontsSymbolsOnly"];})
]; ];
enableDefaultPackages = false; enableDefaultPackages = false;